substrate-docs
substrate-docs copied to clipboard
Upgrade the runtime binary first to introduce new host functions
To perform a runtime upgrade between two versions, update the node binary so that it could support the new wasm function introduced by the new version of the runtime.
Troubleshooting:
the node logs would show:
1 2022-05-31 17:53:47 Unable to author block in slot 1654030427,. `can_author_with` returned: Failed to get runtime version at `BlockId::Hash(0xc383d9dae4d5c3494198c4ec670733a455fac3d8a04f7fbc1ec1917f32479d5d)` and will disable authoring. Error: VersionInvalid("RuntimeConstruction(Other(\"host doesn't provide such function: env:ext_storage_root_version_2\"))") Probably a node update is required!
The solution was to simply update the node binary so that it could support the new wasm function introduced by the runtime.
TODO: There are hints about this in the Executor (execution strategies/build process) and Upgrade (forkless upgrades) sections. But the relationship is more clearly described in the academy Substrate module