test-runtime: GenesisBuilder runtime API impl + tests#14310
test-runtime: GenesisBuilder runtime API impl + tests#14310paritytech-processbot[bot] merged 51 commits intomasterfrom
test-runtime: GenesisBuilder runtime API impl + tests#14310Conversation
This PR provides implementation of `GenesisBuilder` API for `substrate-test-runtime`, can be considered as reference imiplementation for other runtimes. The `GenesisBuilder` implementation is gated by `gensis-config` feature. Tested scenarios: - default `GenesisConfig` to JSON blob, - deserialization of `GenesisConfig` from custom JSON, and storing its keys into the Storage (genesis storage creation). - creation of genesis storage using partial JSON definition, - checking if invalid/renamed JSON files causes the runtime to panic,
GenesisBuilder runtime API impl + tests
Co-authored-by: Davide Galassi <davxy@datawok.net>
Co-authored-by: Davide Galassi <davxy@datawok.net>
Co-authored-by: Davide Galassi <davxy@datawok.net>
Co-authored-by: Davide Galassi <davxy@datawok.net>
GenesisBuilder runtime API impl + teststest-runtime: GenesisBuilder runtime API impl + tests
skunert
left a comment
There was a problem hiding this comment.
Looks Good!
I am also not sure if the genesis-builder feature is useful, but leave it up to you.
|
bot rebase |
…-implemented-for-test-runtime
|
Rebased |
kianenigma
left a comment
There was a problem hiding this comment.
LGTM other than a grumble about naming which I hope to see fixed before this is stabilized.
|
bot fmt |
|
@michalkucharczyk https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3240071 was started for your command Comment |
|
@michalkucharczyk Command |
Created issue for cleaning up naming: paritytech/polkadot-sdk#150 |
…-implemented-for-test-runtime
|
bot merge |
This PR provides implementation of
GenesisBuilderAPI (proposed here: #14131) forsubstrate-test-runtime, can be considered as reference imiplementation for other runtimes.The
GenesisBuilderimplementation is gated bygensis-builderfeature.A small crate (
sc-genesis-builder) was added. Its purpose is to provide the implementation ofGenesisBuilder APIin the form of reusable helper.Tested scenarios:
GenesisConfigto JSON blob,GenesisConfigfrom custom JSON, and storing its keys into the Storage (genesis storage creation).Step towards: paritytech/polkadot-sdk#25