ChainSafe / ChainSafe/gossamer
read runtime version from code wasm custom sections
- 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
Assessment
This issue has not been assessed yet.