polkadot-omni-node: add GetParachainInfo runtime api #8651
polkadot-omni-node: add GetParachainInfo runtime api #8651iulianbarbu merged 91 commits intoparitytech:masterfrom
GetParachainInfo runtime api #8651Conversation
|
User @Stephenlawrence00, please sign the CLA here. |
GetParachainIdentity runtime api
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
GetParachainIdentity runtime api GetParachainIdentity runtime api
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
The extra runtime API is not the problem. But if you export a chain-spec with this new node, the
|
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
Very true, missed this. Will add a note in the prdoc about the fact chain specs generate with |
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
GetParachainIdentifier runtime api GetParachainInfo runtime api
|
/cmd fmt |
Signed-off-by: Iulian Barbu <iulian.barbu@parity.io>
764976b
# Description Closes #7384 Closes #75 Closes #8692 Closes #8739 ## Integration Node developers, node operators & runtime developers will not need to generate chain specs that contain a `para_id` field starting with this PR, but they'll have to implement the `cumulus_primitives_core::GetParachainInfo` runtime API once they drop the `para_id` field, so that new nodes versions will be able to query the runtime for the parachain id. Starting with `2512` the nodes will not support anymore reading the parachain id from chain specs `para_id` field, so it will be mandatory for runtime to implement the `cumulus_primitives_core::GetParachainInfo` trait and be upgraded. ## Review Notes This PR is based on prior work here: #7546. It delivers the following: ### Deprecated `para_id` chain spec extension - nodes like `polkadot-omni-node`/`polkadot-parachain`) will still support running chainspecs with `para_id` extension for a while (until stable2512) - nodes like `test-parachain`/`parachain-template-node` are supporting only runtimes that implement the new runtime API. - `chain-spec-builder` will display that `para_id` is deprecated when calling `help`, or when using the flag. ### Additional cleanup/changes - fixed & renabled some omni-node/parachain-template-node tests from `polkadot-sdk-docs` & `templates/zombienet`, which rely on the newly added runtime API as wellI. Tests based on the `para_id` chain spec extension are not present anymore, since omni-node will favour taking the para id based on the runtime API if present. - removed the concept of running `minimal` with omni-node. I returned to an old idea of a few of us. At this moment we can't support it anymore with omni-node since we'd need to add `parachain_info` to `minimal-template-runtime`, which doesn't make much sense. - most of the parachains runtimes (hope I haven't missed any relevant) that run by using `polkadot-parachain/polkadot-omni-node/test-parachain/parachain-template-node` should fail to work with the previous nodes (that support them) after `stable2512`. Probably that will be caught in the CI if I missed them during this PR, but I doubt it. ## Reviewers request - if there are other nodes used to run parachains runtimes, this is a good moment to highlight them so that I can update them if needed in terms of picking up the `parachain_id` from the runtime. --------- Signed-off-by: Iulian Barbu <iulian.barbu@parity.io> Co-authored-by: Steven <stevenlawrence13e@gmail.com> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
Description
Closes #7384
Closes #75
Closes #8692
Closes #8739
Integration
Node developers, node operators & runtime developers will not need to generate chain specs that contain a
para_idfield starting with this PR, but they'll have to implement thecumulus_primitives_core::GetParachainInforuntime API once they drop thepara_idfield, so that new nodes versions will be able to query the runtime for the parachain id.Starting with
2512the nodes will not support anymore reading the parachain id from chain specspara_idfield, so it will be mandatory for runtime to implement thecumulus_primitives_core::GetParachainInfotrait and be upgraded.Review Notes
This PR is based on prior work here: #7546. It delivers the following:
Deprecated
para_idchain spec extensionpolkadot-omni-node/polkadot-parachain) will still support running chainspecs withpara_idextension for a while (until stable2512)test-parachain/parachain-template-nodeare supporting only runtimes that implement the new runtime API.chain-spec-builderwill display thatpara_idis deprecated when callinghelp, or when using the flag.Additional cleanup/changes
fixed & renabled some omni-node/parachain-template-node tests from
polkadot-sdk-docs&templates/zombienet, which rely on the newly added runtime API as wellI. Tests based on thepara_idchain spec extension are not present anymore, since omni-node will favour taking the para id based on the runtime API if present.removed the concept of running
minimalwith omni-node. I returned to an old idea of a few of us. At this moment we can't support it anymore with omni-node since we'd need to addparachain_infotominimal-template-runtime, which doesn't make much sense.most of the parachains runtimes (hope I haven't missed any relevant) that run by using
polkadot-parachain/polkadot-omni-node/test-parachain/parachain-template-nodeshould fail to work with the previous nodes (that support them) afterstable2512. Probably that will be caught in the CI if I missed them during this PR, but I doubt it.Reviewers request
parachain_idfrom the runtime.