0

I am running the node-template on ws://localhost:9944 and I am running the following command on Substrate:

cargo run --release --features=try-runtime try-runtime on-runtime-upgrade live -u ws://localhost:9944

I get the error:

Version: 3.0.0-dev-34a0621761c

   0: backtrace::capture::Backtrace::new
   1: sp_panic_handler::set::{{closure}}
   2: std::panicking::rust_panic_with_hook
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:702:17
   3: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:588:13
   4: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:138:18
   5: rust_begin_unwind
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5
   6: core::panicking::panic_fmt
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14
   7: core::panicking::panic_display
   8: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
   9: try_runtime_cli::TryRuntimeCmd::run::{{closure}}
  10: sc_cli::runner::main::{{closure}}::{{closure}}::{{closure}}
  11: <futures_util::future::poll_fn::PollFn<F> as core::future::future::Future>::poll
  12: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  13: std::thread::local::LocalKey<T>::with
  14: tokio::park::thread::CachedParkThread::block_on
  15: tokio::runtime::thread_pool::ThreadPool::block_on
  16: tokio::runtime::Runtime::block_on
  17: sc_cli::runner::Runner<C>::async_run
  18: node_cli::command::run
  19: std::sys_common::backtrace::__rust_begin_short_backtrace
  20: std::rt::lang_start::{{closure}}
  21: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/ops/function.rs:280:13
      std::panicking::try::do_call
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:492:40
      std::panicking::try
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:456:19
      std::panic::catch_unwind
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panic.rs:137:14
      std::rt::lang_start_internal::{{closure}}
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/rt.rs:128:48
      std::panicking::try::do_call
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:492:40
      std::panicking::try
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:456:19
      std::panic::catch_unwind
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panic.rs:137:14
      std::rt::lang_start_internal
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/rt.rs:128:20
  22: _main


Thread 'main' panicked at 'version mismatch: remote spec name: 'node-template', expected (local chain spec, aka. `--chain`): 'node'', /Users/bruno/src/substrate/utils/frame/try-runtime/cli/src/lib.rs:647

What am I missing?

1 Answer 1

0

Specifically, notice this line in your error message:

Thread 'main' panicked at 'version mismatch: remote spec name: 'node-template', expected (local chain spec, aka. `--chain`): 'node'', /Users/bruno/src/substrate/utils/frame/try-runtime/cli/src/lib.rs:647

your node-template is running with this spec name:

spec_name: create_runtime_str!("node-template"),

try-runtime is running with this spec name:

spec_name: create_runtime_str!("node"),

And therefore there is a mismatch.

In this case you want to use the try-runtime flag --no-spec-name-check:

--no-spec-name-check
            When enabled, the spec name check will not panic, and instead only show a warning

So your command should be:

cargo run --release --features=try-runtime try-runtime --no-spec-name-check on-runtime-upgrade live -u ws://localhost:9944

This will run nicely and you will see a warning message like the following:

2022-09-06 12:11:25 version mismatch: remote spec name: 'node-template', expected (local chain spec, aka. `--chain`): 'node'    
2022-09-06 12:11:25 spec version mismatch (local 268 != remote 100). This could cause some issues.

.. which is expected.

Your Answer

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

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