-
Notifications
You must be signed in to change notification settings - Fork 2.6k
test-runtime
: GenesisBuilder
runtime API impl + tests
#14310
test-runtime
: GenesisBuilder
runtime API impl + tests
#14310
Conversation
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 <[email protected]>
Co-authored-by: Davide Galassi <[email protected]>
Co-authored-by: Davide Galassi <[email protected]>
Co-authored-by: Davide Galassi <[email protected]>
GenesisBuilder
runtime API impl + teststest-runtime
: GenesisBuilder
runtime API impl + tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
GenesisBuilder
API (proposed here: #14131) forsubstrate-test-runtime
, can be considered as reference imiplementation for other runtimes.The
GenesisBuilder
implementation is gated bygensis-builder
feature.A small crate (
sc-genesis-builder
) was added. Its purpose is to provide the implementation ofGenesisBuilder API
in the form of reusable helper.Tested scenarios:
GenesisConfig
to JSON blob,GenesisConfig
from custom JSON, and storing its keys into the Storage (genesis storage creation).Step towards: paritytech/polkadot-sdk#25