I am struggling with following error, any thoughts what can cause it? I am compiling WASM blob with following command:

cargo build --release --features try-runtime --package frontier-template-runtime    

Here is execution of the try-runtime binary:

     Running `target/release/frontier-template-node try-runtime --runtime target/release/wbuild/frontier-template-runtime/frontier_template_runtime.compact.compressed.wasm on-runtime-upgrade live --uri 'ws://localhost:9944'`
2023-09-18 10:40:08 since no at is provided, setting it to latest finalized head, 0x692d7800220955d1c4d12465b1089a3e047e249ba6233f62979969856f37bc79    
2023-09-18 10:40:08 since no prefix is filtered, the data for all pallets will be downloaded    
2023-09-18 10:40:08 scraping key-pairs from remote at block height 0x692d7800220955d1c4d12465b1089a3e047e249ba6233f62979969856f37bc79    
2023-09-18 10:40:08 Querying a total of 587 keys from prefix , splitting among 10 threads, 59 keys per thread    
2023-09-18 10:40:08 adding data for hashed prefix: , took 0s    
2023-09-18 10:40:08 adding data for hashed key: 3a636f6465    
2023-09-18 10:40:08 adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8    
2023-09-18 10:40:08 adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac    
2023-09-18 10:40:08 initialized state externalities with storage root 0xfb8262147a2cd552fc2df2b136c085bc81068a62569ea365eb9542a0788bd57c and state_version V1    
2023-09-18 10:40:08 original spec: RuntimeString::Owned("Frontier Node")-2, code hash: a3b1ff254b152844bbda18d12b3d4507d8530a59d9a1127e10d2bc59af2d3f40    
2023-09-18 10:40:08 new spec: RuntimeString::Owned("Frontier Node")-2, code hash: 6552cf3323ecf6230ec62fd93f8db67aea59172ea7c92bf976ac58b157e50111    
Error: Input("given runtime is NOT compiled with try-runtime feature!")

1 Answer 1


Ok, I guess I found a solution. Implementation of frame_try_runtime::TryRuntime<Block> was outside of impl_runtime_apis! section, so it was not detected, now it is moved:

impl_runtime_apis! {
    #[cfg(feature = "try-runtime")]
    impl frame_try_runtime::TryRuntime<Block> for Runtime {
        fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
            let weight = Executive::try_runtime_upgrade(checks).unwrap();
            (weight, BlockWeights::get().max_block)

        fn execute_block(
            block: Block,
            state_root_check: bool,
            checks: bool,
            select: frame_try_runtime::TryStateSelect,
        ) -> Weight {
            Executive::try_execute_block(block, state_root_check, checks, select).unwrap()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.