I have a slightly custom chain spec that makes regular chain spec serializable with serde to/from JSON.

In the impl of sp_runtime::BuildStorage I just forward assimilate_storage call to the underlying chain spec:

impl<GenesisConfig, Extensions> BuildStorage for SerializableChainSpec<GenesisConfig, Extensions>
    GenesisConfig: RuntimeGenesis,
    fn assimilate_storage(&self, storage: &mut Storage) -> Result<(), String> {

This worked great until I tried to run benchmarks, when it failed with:

Error: SubstrateCli(Input("`assimilate_storage` not implemented for `ChainSpec`."))

Not 100% sure what this means and what implementation should have looked like instead, any suggestions?

1 Answer 1


The implementation of BuildStorage for ChainSpec was implementing assimilate_storage by returning the error you mentioned. It seems that back in the days I didn't implemented this function properly, but don't ask me why...

Nevertheless, after this pr it will be fixed.

  • Lovely, thanks!
    – nazar-pc
    Nov 16, 2022 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.