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.
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.
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
GenesisBuildtrait.assimilate_storageandbuild_storagemethods were moved to newGenesisBuildStoragetrait which is implemented only for palletsGenesisConfig(and notRuntimeGenesisConfig).PalletGenesisConfigmarker trait was added to facilitate this.The rationale behind this is as follows: since #14306
GenesisBuildis implemented forRuntimeGenesisConfig. As theBuildStorageis also implemented forRuntimeGenesisConfigthere was is duality now -RuntiemGenesisConfighad twobulid_storageimplementations.Trait split is implemented in 13d66fd, renaming in ad3b7df.
Step towards: paritytech/polkadot-sdk#25
cumulus companion: paritytech/cumulus#2720