Our goal is to migrate code to the newer substrate version and keep the block history. My old running node substrate version is tag = 'monthly-2021-09+1' -> New substrate version is branch = "polkadot-v0.9.19" So for this updated the entire code as per the requrement of branch = "polkadot-v0.9.19". In local it is working fine, on upgrade on local new instance there is no issue.
But when I have tried to upgrade the running runtime, node with (tag = 'monthly-2021-09+1' ) following command System->setcode, Got the event Sudo -> DispatchResult -> Ok. But when I have checked the log following error are present.
**Unknown error: Client(Application(VersionInvalid("RuntimeConstruction(Other(\"host doesn't provide such function: env:ext_storage_root_version_2\"))")))
2022-05-12 08:08:40 💤 Idle (2 peers), best: #447165 (0x0432…f858), finalized #419084 (0x8e60…80d9), ⬇ 293.4kiB/s ⬆ 0.1kiB/s
2022-05-12 08:08:40 Unsupported Offchain Worker API version: (Err(Application(VersionInvalid("RuntimeConstruction(Other(\"host doesn't provide such function: env:ext_storage_root_version_2\"))"))), Err(Application(VersionInvalid("RuntimeConstruction(Other(\"host doesn't provide such function: env:ext_storage_root_version_2\"))")))). Consider turning off offchain workers if they are not part of your runtime..**
Got the above error in log, and the node are not producing the blocks.
Can anyone tell me what is the difference in upgrade, what mistake I have done.
Or After changing the version of substrate need to upgarde in a different way?.
can_author_with returned: Failed to get runtime version at BlockId::Hash(0x...) and will disable authoring. Error: VersionInvalid("RuntimeConstruction(Other(\"host doesn't provide such function: env:ext_storage_root_version_2\"))")