ChainSafe / ChainSafe/gossamer

read runtime version from code wasm custom sections

Open
#2,758 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
454
Forks
144
PR merge metrics
No merged PRs in 30d

Description

For newer runtimes, the runtime version can now be obtained from the WASM custom sections from the wasm code, and there is no longer a need to instantiate the full runtime to check its version.

For context:

- https://github.com/w3f/polkadot-spec/issues/524
- https://github.com/paritytech/substrate/issues/7327
- https://github.com/paritytech/substrate/pull/8688

Note reading the runtime version by instantiating it and calling `Core_version` still need to be supported for older runtimes.

So the process should be:

1. try to find versions from the wasm custom section
2. fallback to instantiating + calling `Core_version` on the instance

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.