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).
Sudois compiled only with thedev-runtimefeature. Thedevelopmentgenesis preset keeps Alice as sudo for local chains.pallet-whitelistnow 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.
NodeIdentityandIdentityNodealways agree. Deleting a node removes its identity. - Only the Scope owner manages identity. The new calls are
set_identityandclear_identity.Writeaccess does not allow them. - Consent via permit. If the identity is not the caller, the identity account signs a permit:
A permit is valid for at most 1 day ((b"robonomics:cps:node-identity:v1", genesis_hash, scope_id, valid_until)MaxIdentityPermitTtl). Replacing the Scope invalidates all of its permits. create_nodecan 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 aNodeId. - 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-metadataalways requests V16, and the build fails if the runtime does not support it.subxt-apigenerates 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-nodeandframe-omni-bencherin the docs and CI are updated to match. - The custom
pallet-robonomics-parachain-infois replaced by the upstreamstaging-parachain-info.RelayNetworkis 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:
This builds the runtime with the
nix develop -c ./scripts/development-chain.sh run
dev-runtimefeature, generates a spec (para id2000, relaywestend-local) and startspolkadot-omni-node --dev. - Local Docker image:
./scripts/development-chain.sh docker, based onparity/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::devandnative_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_nodehas a new fourth argument,identity: Option<NodeIdentityAssignment>. PassNoneto keep the old behavior.- New calls:
set_identity(call index 8) andclear_identity(call index 9). pallet-robonomics-cps-runtime-api/CpsApiare removed. Use the view functions (api.view.cps.*in polkadot.js,api::view_functions().cps()in subxt).has_capabilitynow returnsResult<bool, Error>. A missing node givesNodeNotFoundinstead offalse.
- XCM:
RelayNetworkis now the constantPolkadotinstead ofParachainInfostorage. - Integrators: regenerate clients against the new V16 metadata, and use the
robonomics-runtime-metadata/subxt-api52.x crates. - Local development:
scripts/build-development-spec.shis replaced byscripts/development-chain.sh. The dev para id changed from2048to2000, and the relay fromrococo-localtowestend-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