Skip to content
Verified Commit 037c5ae0 authored by Michal Kucharczyk's avatar Michal Kucharczyk
Browse files

polkadot: chain-specs getting ready for non-native world

- all references to `RuntimeGenesisConfig` in node/service are removed,
- `RococoGenesisExt` is removed. It was the hack to allow overwriting
  `EpochDurationInBlocks`. Removal of `RococGenesisExt` prevents from
manipulating the state to change the runtime constants, what allows to
keep metadata const.
- all `(kusama|polkadot|versi|rococo|wococo)_(staging|dev)_genesis_config`
functions now return the JSON patch for default runtime `GenesisConfig`,
- `ChainSpecBuilder` is used, ChainSpec::from_genesis is removed,
- rococo-runtime changes:
  -- Explicit building of fast-runtime version of rococo-runtime is no longer done.
  -- Environment variables which control the time::EpochDurationInBlocks value were added:
    `ROCOCO_FAST_RUNTIME` - enables the fast runtime version of
    runtime with default value of EpochDurationInBlocks set to 10. Value of
    env does 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).

    Examples:
    - to build runtime for `versi_staging_testnet_config which had
      EpochDurationInBlocks set to 100:
    ```
    ROCOCO_EPOCH_DURATION=100 cargo build -p rococo
    ```
    - to build runtime for `versi_staging_testnet_config which had
      EpochDurationInBlocks set to 100:
    ```
    ROCOCO_EPOCH_DURATION=100 cargo build -p rococo-runtime
    ```
    - to build runtime for `wococo_development`
    ```
    ROCOCO_EPOCH_DURATION=10 cargo build -p rococo-runtime
    or
    ROCOCO_FAST_RUNTIME=1 cargo build -p rococo-runtime
    ```
- ChainSpec: tests against legacy added
parent 1446ea32
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment