Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Support using the extensions in the genesis build #14541

Open
2 tasks done
liuchengxu opened this issue Jul 9, 2023 · 0 comments
Open
2 tasks done

Support using the extensions in the genesis build #14541

liuchengxu opened this issue Jul 9, 2023 · 0 comments
Labels
J0-enhancement An additional feature request.

Comments

@liuchengxu
Copy link
Contributor

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Motivation

We would like to use sp_io::misc::read_version to read the runtime version from the wasm blob in the genesis build, which unfortunately runs into an error that the extension is unavailable at that time. It turns out BasicExternality which has no extensions registered is used in the genesis build. The workaround for now is to avoid using any extension functionality at genesis, but it's a generally nice-to-have feature that will be beneficial to the entire community IMO.

#scrate::BasicExternalities::execute_with_storage(storage, || {

Request

Use a more proper externality with all extensions registered in the production env for the genesis build. The alternative is to add a way to allow users to register the extension as needed on their own.

Solution

No response

Are you willing to help with this request?

Yes!

@liuchengxu liuchengxu added the J0-enhancement An additional feature request. label Jul 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J0-enhancement An additional feature request.
Projects
None yet
Development

No branches or pull requests

1 participant