github airalab/robonomics v52
Robonomics v52 :: Renounce sudo

2 hours ago

runtime spec_version: 52.

This release completes Phase 1: Sudo is gone from the production runtime, and CPS gets node identity: nodes can be addressed by account. The release also moves to the Polkadot SDK stable2609 and replaces the custom CPS runtime API with pallet view functions (metadata V16). See docs/robonomics-5.0-roadmap.md.

Highlights

1. Sudo removed

pallet-sudo is no longer part of the production runtime (#680). After this upgrade, all privileged calls go through OpenGov: the Root track, or Whitelisted Caller for technical fixes. XRT holders control the network, and the Stage A handover started in v51 is complete (#633).

  • Sudo is compiled only with the dev-runtime feature. The development genesis preset keeps Alice as sudo for local chains.
  • pallet-whitelist now supports deferred dispatch: a whitelisted call can be scheduled before it is whitelisted. A deferred dispatch expires after 3 days (DeferredDispatchExpiration).

2. CPS v1.1: node identity

A node can now have an identity: an AccountId bound to it 1:1. Clients can address the tree by account, while the tree, Scope resolution and storage keys stay in NodeId space (#677, #678, #679):

NodeIdentity  NodeId    -> AccountId
IdentityNode  AccountId -> NodeId
  • Identity is optional. A node without one works exactly as before.
  • One account, one node. NodeIdentity and IdentityNode always agree. Deleting a node removes its identity.
  • Only the Scope owner manages identity. The new calls are set_identity and clear_identity. Write access does not allow them.
  • Consent via permit. If the identity is not the caller, the identity account signs a permit:
    (b"robonomics:cps:node-identity:v1", genesis_hash, scope_id, valid_until)
    
    A permit is valid for at most 1 day (MaxIdentityPermitTtl). Replacing the Scope invalidates all of its permits.
  • create_node can bind an identity in the same call. A new root node accepts only the caller as identity, because the Scope a permit has to name does not exist yet.
  • Weights follow the path. Self-assignment and delegated assignment (with signature verification) are benchmarked separately.

3. View functions instead of a runtime API

The CPS read API now uses pallet view functions, described in runtime metadata V16 and executed through the generic RuntimeViewFunction runtime API. The pallet-robonomics-cps-runtime-api crate and CpsApi are removed.

  • NodeId-based views: resolve_scope, has_capability, identity_of, node_by_identity.
  • Address-oriented views: parent, children, meta, payload, scope_of, address_capability. They take accounts and never return a NodeId.
  • Strict projection. If a result would include a node without identity, the call fails as a whole with MissingProjectedIdentity. Nodes are never silently omitted.
  • robonomics-runtime-metadata always requests V16, and the build fails if the runtime does not support it. subxt-api generates typed calls:
    api::view_functions().cps().resolve_scope(NodeId(0))

4. Polkadot SDK stable2609

  • All FRAME, Cumulus and XCM dependencies are uplifted to polkadot-stable2609. polkadot-omni-node and frame-omni-bencher in the docs and CI are updated to match.
  • The custom pallet-robonomics-parachain-info is replaced by the upstream staging-parachain-info. RelayNetwork is now a constant, NetworkId::Polkadot.
  • All runtime weights are re-benchmarked on the new SDK (#681).

5. Developer experience

  • Local dev chain in one line:
    nix develop -c ./scripts/development-chain.sh run
    This builds the runtime with the dev-runtime feature, generates a spec (para id 2000, relay westend-local) and starts polkadot-omni-node --dev.
  • Local Docker image: ./scripts/development-chain.sh docker, based on parity/polkadot-omni-node.
  • All scripts check for required binaries and print how to install them.
  • The dev runtime is a separate build (--features dev-runtime) instead of a second embedded WASM. robonomics_runtime::dev and native_version() are removed.

Where we are on the roadmap

Phase 1  Runtime, Governance, CPS foundation      done
   runtime separation (v50)                   done
   OpenGov stack (v51)                        done
   Sudo removal                               done  <- this release
   CPS node model, Scope / Access (v51)       done
   CPS node identity, view functions          done  <- this release

Phase 2  Subscription and Transactions        in progress
   account-scoped generations,
   XRT-denominated transaction budget         design ready (#657)
   port of pallet-subscription (#381)         almost done (#635)
   runtime integration, governance params,
   runtime API and tooling                    open (#636, #638, #639)
   embedded clients:
     runtime metadata crate (V16)             done
     scale-embed C codec                      done (#664)
     embed-api / embed-codegen / fingerprints open (#662, #666, #667)

Phase 3  Storage (Bulletin Chain)             planned
Phase 4  Compute (RISC Zero)                  research (#659)
Phase 5  Programmable CPS (Policy)            planned

Next release: Subscription with Scope-funded transactions, so that a device with a CPS identity can send its first transaction without holding XRT.

Upgrade notes

  • Governance: Sudo is no longer available. Every privileged call, including runtime upgrades, needs a Root or Whitelisted Caller referendum.
  • CPS (breaking):
    • create_node has a new fourth argument, identity: Option<NodeIdentityAssignment>. Pass None to keep the old behavior.
    • New calls: set_identity (call index 8) and clear_identity (call index 9).
    • pallet-robonomics-cps-runtime-api / CpsApi are removed. Use the view functions (api.view.cps.* in polkadot.js, api::view_functions().cps() in subxt).
    • has_capability now returns Result<bool, Error>. A missing node gives NodeNotFound instead of false.
  • XCM: RelayNetwork is now the constant Polkadot instead of ParachainInfo storage.
  • Integrators: regenerate clients against the new V16 metadata, and use the robonomics-runtime-metadata / subxt-api 52.x crates.
  • Local development: scripts/build-development-spec.sh is replaced by scripts/development-chain.sh. The dev para id changed from 2048 to 2000, and the relay from rococo-local to westend-local.

Full Changelog: v51...v52

Runtime Info

🏋️  Runtime size:		1.271 MB (1,332,245 bytes)
🗜  Compressed:			Yes, 84.11%
✨ Reserved meta:		OK - [6D, 65, 74, 61]
#️⃣  Blake2-256 hash:	0x5db0f07920526a4f2add64abaecf2072f8caed29d260889c9f006d6094ddbfc9

Don't miss a new robonomics release

NewReleases is sending notifications on new releases.