polkadot
polkadot copied to clipboard
`chain-spec`: support for `json` config/patch (and `GenesisBuilder` API)
This PR is a step towards adding support of RuntimeGenesisConfig into the wasm runtime:
In this PR:
-
all references to
RuntimeGenesisConfiginnode/serviceare removed, -
RococoGenesisExtis removed. It was the hack to allow overwritingEpochDurationInBlocks. Removal ofRococGenesisExtprevents from manipulating the state to change the runtime constants, what allows to keep metadata const. -
all
(kusama|polkadot|versi|rococo|wococo)_(staging|dev)_genesis_configfunctions now return the JSON patch for default runtimeGenesisConfig, -
ChainSpecBuilderis used,ChainSpec::from_genesisis removed, -
rococo-runtimechanges:- Explicit building of fast-runtime version of
rococo-runtimeis no longer done. - Environment variables which control the
time::EpochDurationInBlocksvalue were added:ROCOCO_FAST_RUNTIME- enables the fast runtime version of runtime with default value of EpochDurationInBlocks set to 10. Value ofenvdoes not matter.ROCOCO_EPOCH_DURATION- enables the fast runtime version with provided value of EpochDurationInBlocks (epoch duration will be set to the value of env).
rococo-runtimebuilding examples:- to build runtime for
versi_staging_testnetwhich had EpochDurationInBlocks set to 100:ROCOCO_EPOCH_DURATION=100 cargo build -p rococo-runtime - to build runtime for
wococo_developmentROCOCO_EPOCH_DURATION=10 cargo build -p rococo-runtime or ROCOCO_FAST_RUNTIME=1 cargo build -p rococo-runtime - to build
versi-stagingchain spec:ROCOCO_EPOCH_DURATION=100 cargo run -p polkadot -- build-spec --chain versi-staging --raw - to build
wococo-devchain spec:ROCOCO_EPOCH_DURATION=10 cargo run -p polkadot -- build-spec --chain wococo-dev --raw
- Explicit building of fast-runtime version of
Companion for: paritytech/substrate#14562 cumulus companion: paritytech/cumulus#2936
Step towards: https://github.com/paritytech/polkadot-sdk/issues/25
bot rebase
Rebased
bot rebase
Rebased
bot rebase
Rebased
The CI pipeline was cancelled due to failure one of the required jobs. Job name: test-linux-stable Logs: https://gitlab.parity.io/parity/mirrors/polkadot/-/jobs/3322577
@paritytech/devrel , @the-right-joyce
I wanted to give you a heads-up about some changes that have just been made in this PR. I've modified the default EpochDurationInBlocks for several ChainSpecs, namely: versi-local, wococo-local, rococo-local, wococo-dev, versi-dev, rococo-dev (where duration was previously set to 10), and versi-staging (where duration was previously set to 100).
You can find additional details in the PR description.
This change could affect tutorials (and docs maybe?) that rely on timing within these runtimes. Therefore, I request you to please review and update them accordingly, and include information on how to adjust timings based on these changes.
Thank you for your attention.