-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Conversation
The CI pipeline was cancelled due to failure one of the required jobs. |
#[cfg(feature = "std")] | ||
/// A trait to define functions to build the storage for a genesis config, T and I are placeholder | ||
/// for pallet trait and pallet instance. | ||
pub trait GenesisBuildStorage<T, I = ()>: GenesisBuild<T, I> { |
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 don't really understand, you but in another trait these method so you can implement GenesisBuild
on RuntimeGenesisConfig
?
I'm not sure it worth it, why not create a new trait for RuntimeGenesisConfig
specifically, GenesisBuild
was meant for pallets and thus the signature is quite specific with <T, I>
, I think it is better to keep traits and implementation of RuntimeGenesisConfig
apart, no ?
Creating a new trait RuntimeGenesisBuild
, maybe merged with BuildStorage
should be better IMO
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.
Sorry for my bad suggestion, I agree what other said in the other PR, maybe this PR improve on the situation with a unique proper GenesisBuild, we could eventually get rid of the generics once with have decl_storage removed (is it already ?) and we can keep the other method for not breaking peoples tests in another trait or another way
This PR removes the storage building part from the
GenesisBuild
trait.assimilate_storage
andbuild_storage
methods were moved to newGenesisBuildStorage
trait which is implemented only for palletsGenesisConfig
(and notRuntimeGenesisConfig
).PalletGenesisConfig
marker trait was added to facilitate this.The rationale behind this is as follows: since #14306
GenesisBuild
is implemented forRuntimeGenesisConfig
. As theBuildStorage
is also implemented forRuntimeGenesisConfig
there was is duality now -RuntiemGenesisConfig
had twobulid_storage
implementations.Trait split is implemented in 13d66fd, renaming in ad3b7df.
Step towards: paritytech/polkadot-sdk#25
cumulus companion: paritytech/cumulus#2720