Robonomics: replacing Sudo with a two-track OpenGov sized for a small community

Hi all, Sergei from Robonomics, a parachain on Polkadot for IoT and cyber-physical systems. This follows our Tech Talk thread on Robonomics 5.0, part one (the runtime-only repo on polkadot-omni-node).

Runtime 50 is now live on Polkadot, and the next step of our 5.0 roadmap is governance. Today every privileged action on Robonomics goes through Sudo, held by a developer multisig. The network is in early production now, and a cloud for IoT that calls itself open can’t be steered by a developer key. So in version 5.1 we replace Sudo with standard OpenGov.

What we ship. pallet-referenda, pallet-conviction-voting, pallet-whitelist, pallet-preimage and pallet-scheduler, stock Polkadot SDK, benchmarked. We keep the mechanism and drop most of the structure around it: no Council, no Fellowship, no treasury tracks. Two tracks only:

Track Decision Approval Support Deciding at once
Root up to 14 days 90% → 51% 50% → 15% 1
Whitelisted Caller up to 3 days 99% → 80% 2% → 1% 10

Anyone can open a Root referendum, and XRT holders vote with conviction (1x for 7 days up to 6x for 224 days). The fast track is for reviewed technical fixes: a core-team collective of up to 7 members, with half of them agreeing, can whitelist the hash of one exact call. That executes nothing by itself. The call still needs a public referendum with at least 1% of all XRT voting aye.

Handover in two steps. First the pallets ship while the multisig keeps Sudo as a safety net. Then the first real referendum is a runtime upgrade that removes Sudo. If it passes, it also proves that governance can upgrade the chain without developer access.

Questions for other parachain teams:

  1. Has anyone removed Sudo by referendum? Anything you wish you had kept as a recovery path?
  2. The old 4.x governance pallets (Democracy, Preimage, Scheduler) left storage behind under the same names. Did you clean it up with killPrefix before reusing the names, or with a migration?

Full write-up: Robonomics 5.0: handing the keys to XRT holders
Code: Introduced governance pallets by akru · Pull Request #652 · airalab/robonomics · GitHub

Update: the OpenGov stack is in release 51 “Governance” (spec_version 51). It is built and published, not enacted yet: Polkadot still runs 50.

What landed, as described above:

  • pallet-preimage, pallet-scheduler, pallet-referenda, pallet-conviction-voting, pallet-whitelist, pallet-collective (#652).
  • Two tracks only. Root for runtime upgrades and any privileged call. Whitelisted Caller as a fast track: the Core Team collective can only whitelist a call hash, and a public XRT-holder referendum still decides.
  • No Council, no developer Root key. This is stage A: Sudo stays only as a recovery path. The next step is the runtime upgrade that removes Sudo, submitted and enacted through OpenGov itself (#633).

The same release moves our CPS pallet to a Scope / Access authority model ([#653]): a Scope is the boundary of a subtree with its own owner, Access grants Write or CreateScope inside it, a node’s parent never changes, and changing the owner starts a new Scope generation, so old grants stop working at once. Clients get the effective owner through CpsApi::resolve_scope on the standard runtime API, no custom RPC. This part is breaking for integrators: move_node, transfer_ownership, accept_ownership, delete_scope are gone.

Next release: Sudo removal through OpenGov, and Subscription with Scope-funded transactions, so an owner-funded device can send its first transaction without holding XRT.

I’ll post the Sudo-removal referendum here when it goes up. The questions above on support thresholds and on removing Sudo by referendum are still open, and experience from other small parachains is very welcome.

Update: runtime 51 is enacted on Robonomics (Polkadot), block #5,545,191. OpenGov is live: Root and Whitelisted Caller tracks are open, Sudo stays only as a recovery path. The Sudo-removal referendum is next — I’ll post it here when it goes up.

An update on the plan from this thread: it is done. Sudo is gone from Robonomics on Polkadot.

Runtime 52 went live on 15 October, and it no longer contains pallet-sudo. The upgrade that removed it went through OpenGov itself: the Core Team whitelisted the exact runtime, and XRT holders approved it in a Whitelisted Caller referendum. Nobody, the development team included, holds a privileged key any more.

How changes are made now

  • Root track. Anyone can submit a referendum, no permission from the team needed. XRT holders decide.
  • Whitelisted Caller track, for urgent technical fixes. The Core Team can only whitelist one specific call. It cannot dispatch anything by itself, and the call still needs a public referendum.
  • The Core Team’s membership, track parameters and the rest of the governance setup can only be changed by referendum too.

How to take part

  1. Discuss the idea first, in a GitHub issue in airalab/robonomics or here on the forum.
  2. Submit the referendum in Polkadot.js, on the Robonomics network.
  3. Vote with XRT held in your own wallet on the Robonomics parachain. Conviction voting and delegation both work.

Runtime 52 also adds node identity to the CPS device tree and moves the runtime to Polkadot SDK stable2609. That completes phase one of the Robonomics 5.0 roadmap.

Release notes: github.com/airalab/robonomics/releases/tag/v52
Referendum that authorized the upgrade: #2 on the Whitelisted Caller track, enacted in block 5,748,501 (Polkadot.js, wss://polkadot.rpc.robonomics.network)
Blog post: robonomics.network/blog/robonomics-5-0-sudo-removed/

An update from this thread: the milestone that carried this plan is closed. M0 — Governance & Finish-off of Robonomics 5.0 has no open tasks left (github.com/airalab/robonomics/milestone/2).

What it covered:

  • the governance stack, origins and the two referenda tracks discussed above;
  • protocol constants and emergency controls moved under governance;
  • Sudo removal (runtime 52, live since 15 October);
  • the runtime split into its own repository, with CI, a weight policy and the 5.0 spec kept in-repo;
  • simpler CPS trees and data operations charged by actual payload size.

One change of plan: the old RWS pallet stays as it is for now and will be removed later. The new subscription pallet is developed separately, and its first PR is in review.

Thx for the updates

An update on the subscription mentioned above: its first PR is in review (github.com/airalab/robonomics/pull/685), and akru recorded a short demo on a local dev chain.

In the demo an account with zero XRT gets a subscription from governance and then sends a transaction, picking “Pay with a subscription” in the signing dialog. No fee is withdrawn, and the block shows a SubscriptionTransactionPaid event. A transaction signed for a stale subscription generation is rejected.

How it works, briefly:

  • A subscription is a time-limited allowance of network resources. Transactions are the first resource; storage and compute will follow through the same accounting.
  • The allowance refills over time, like a token bucket. A subscription transaction is charged its baseline cost without the congestion multiplier, and it gets priority in the pool.
  • Devices in an owner’s CPS tree can spend the owner’s subscription, with optional limits per Scope, so a sensor doesn’t need to hold XRT.
  • There are two ways to get one: allocation by governance, or buying a fixed plan with USDT sent from Asset Hub over XCM. Total capacity is capped, and expired subscriptions release it automatically.

It reaches the live network only through a runtime upgrade and an XRT-holder referendum. I’ll post here when the referendum is up.

Demo video: x.com/AIRA_Robonomics/status/2114666193281835094

Separately, for device builders: portable nightly builds of our toolbox are out (cps, the edge gateway and an MQTT bridge) for Linux x86_64 and aarch64 and for macOS. They embed the smoldot light client and come with a book on running a CPS tree from zero (airalab.github.io/robins). Light-client startup is next, following the advice from the smoldot issue: fresh checkpoints and a persisted finalized database (github.com/airalab/robins/issues/21).