-
Notifications
You must be signed in to change notification settings - Fork 2.7k
frame: GenesisBuild::build allowed in no_std #14107
frame: GenesisBuild::build allowed in no_std #14107
Conversation
i`GenesisBuild::build` function will be required for no_std in no native runtime world. `GenesisBuild::build` macro generated function allows to build the runtime GenesisConfig assembled from all pallets' GenesisConfigs.
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.
I'm not sure we should already do this? I mean we can probably get rid off this trait entirely when we just write all genesis values to the state and on the node side, after calling the runtime api, taking the OverlayedChanges
to fetch all the state changes. Then we basically achieve the same as currently is being achieved by this trait.
Get rid of the trait?! I know that we normally use it in tests to write a genesis config to storage. |
Good point, I forgot about tests! Still doesn't mean we need it in |
We need a function that calls the So the idea is to use this generated function from new The storage part can be removed later. |
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.
Good points @michalkucharczyk!
- #[cfg(feature = "std")] is not longer added to GenesisBuild implementation.
substrate/frame/elections-phragmen/src/lib.rs Lines 748 to 750 in 14855e6
What would be your preference to solve this? Changing bounds of substrate/frame/system/src/lib.rs Lines 278 to 284 in 14855e6
|
Huh, so |
Actually it is not about the Adding |
Just use debug printing? |
Ah ok, yes, the |
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: |
As soon as CI is green, I believe this is ready to merge. |
bot rebase |
Rebased |
cargo update -p frame-support-test-pallet -p frame-support-test
bot rebase |
Rebased |
I've added requried companions, some pallets in |
bot rebase |
Rebased |
bot rebase |
Rebased |
bot merge |
* frame: GenesisBuild::build allowed in no_std i`GenesisBuild::build` function will be required for no_std in no native runtime world. `GenesisBuild::build` macro generated function allows to build the runtime GenesisConfig assembled from all pallets' GenesisConfigs. * fixes * GenesisBuild::build avaiable in no-std - #[cfg(feature = "std")] is not longer added to GenesisBuild implementation. * system: hash69 available for no-std * elections-phragmen: panic message fixed for no_std * frame::suport: doc updated * test-runtime: default for GenesisConfig * frame::test-pallet: serde/std added to std feature deps * Cargo.toml: deps sorted * Cargo.lock update cargo update -p frame-support-test-pallet -p frame-support-test * frame ui tests: cleanup --------- Co-authored-by: parity-processbot <>
* frame: GenesisBuild::build allowed in no_std i`GenesisBuild::build` function will be required for no_std in no native runtime world. `GenesisBuild::build` macro generated function allows to build the runtime GenesisConfig assembled from all pallets' GenesisConfigs. * fixes * GenesisBuild::build avaiable in no-std - #[cfg(feature = "std")] is not longer added to GenesisBuild implementation. * system: hash69 available for no-std * elections-phragmen: panic message fixed for no_std * frame::suport: doc updated * test-runtime: default for GenesisConfig * frame::test-pallet: serde/std added to std feature deps * Cargo.toml: deps sorted * Cargo.lock update cargo update -p frame-support-test-pallet -p frame-support-test * frame ui tests: cleanup --------- Co-authored-by: parity-processbot <>
GenesisBuild::build
function will be required for no_std in no native runtime world.GenesisBuild::build
macro generated function allows to build the runtimeGenesisConfig
assembled from all pallets'GenesisConfig
s.build
for runtime will be implemented in follow-up.Step towards: paritytech/polkadot-sdk#25
polkadot companion: paritytech/polkadot#7271
cumulus companion: paritytech/cumulus#2624