1

When running the following command the try-state fails as it should(I purposefully made the try-state for the Collective pallet incorrect so that it fails):

./substrate-try-runtime try-runtime \
    --runtime runtime-try-runtime.wasm \
    -lruntime=debug \
    execute-block \
    live --uri ws://localhost:9944

The output (just the error message):

2023-04-04 21:32:07.443 ERROR main runtime::executive: failure: "The member count is greater than `MaxMembers`."    
2023-04-04 21:32:07.443 ERROR main runtime: panicked at 'called `Result::unwrap()` on an `Err` value: "The member count is greater than `MaxMembers`."', /Users/sergejsakac/substrate-try-state/bin/node/runtime/src/lib.rs:2362:92    
Error: Input("failed to execute TryRuntime_execute_block: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\nerror while executing at wasm backtrace:\n    0: 0x60116b - <unknown>!rust_begin_unwind\n    1: 0xd570 - <unknown>!core::panicking::panic_fmt::h78a1ce1c13a708f9\n    2: 0xd904 - <unknown>!core::result::unwrap_failed::he4f8c27dd4e34635\n    3: 0x169e2e - <unknown>!TryRuntime_execute_block\nnote: using the `WASMTIME_BACKTRACE_DETAILS=1` environment variable may show more debugging information")  

But when running try-state for a specific pallet, in this case the Collective pallet, it doesn't fail:

./substrate-try-runtime try-runtime \
    --runtime runtime-try-runtime.wasm \
    -lruntime=debug \
    execute-block \
    --try-state Collective \      
    live --uri ws://localhost:9944

The output - no errors even though it should error:

2023-04-04 21:34:24.986  INFO main remote-ext: since no at is provided, setting it to latest finalized head, 0x6a5aebcbc8c318095aa9b2c21c276c5532e487c22ccdc7ab431d258d186c81f6    
2023-04-04 21:34:24.986  INFO main remote-ext: since no prefix is filtered, the data for all pallets will be downloaded    
2023-04-04 21:34:24.992  INFO main remote-ext: scraping key-pairs from remote at block height 0x6a5aebcbc8c318095aa9b2c21c276c5532e487c22ccdc7ab431d258d186c81f6    
2023-04-04 21:34:24.993  INFO main remote-ext: Querying a total of 325 keys from prefix , splitting among 8 threads, 41 keys per thread    
2023-04-04 21:34:25.025  INFO main remote-ext: adding data for hashed prefix: , took 0s    
2023-04-04 21:34:25.025  INFO main remote-ext: adding data for hashed key: 3a636f6465    
2023-04-04 21:34:25.047  INFO main remote-ext: adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef7f9cce9c888469bb1a0dceaa129672ef8    
2023-04-04 21:34:25.047  INFO main remote-ext: adding data for hashed key: 26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac    
2023-04-04 21:34:25.048  INFO main remote-ext: initialized state externalities with storage root 0xb155aa408e5275c188dab0d4f701af8c2ed1abd66b0fc21f21e750bf23ea1d3f and state_version V1    
2023-04-04 21:34:25.151  INFO main try-runtime::cli: original spec: RuntimeString::Owned("node")-268, code hash: 6ee5db9e3ab54621fddeb77d9e2c81f278c293c6ef082bb1689744985cf42806    
2023-04-04 21:34:25.232  INFO main try-runtime::cli: new spec: RuntimeString::Owned("node")-268, code hash: 90b9555868002db9d1aac9a46da4323ed10ac1ee21f5f2787b50c939577e620a    
2023-04-04 21:34:25.308  INFO main try-runtime::cli: fetching next block: 0xe6ac87d01558e96981deb788784ef69b5ddf3edccde48d48b29e4b10a05f0fea     
2023-04-04 21:34:26.623  INFO main runtime::executive: try-runtime: executing block #148 / state root check: false / signature check: false / try-state-select: Only(["Collective"])    
2023-04-04 21:34:26.624 DEBUG main runtime::mmr::offchain: offchain db set: pos 290 parent_hash 0x6a5aebcbc8c318095aa9b2c21c276c5532e487c22ccdc7ab431d258d186c81f6 key [12, 109, 109, 114, 34, 1, 0, 0, 0, 0, 0, 0, 106, 90, 235, 203, 200, 195, 24, 9, 90, 169, 178, 194, 28, 39, 108, 85, 50, 228, 135, 194, 44, 205, 199, 171, 67, 29, 37, 141, 24, 108, 129, 246]    
2023-04-04 21:34:26.624 DEBUG main runtime::mmr::offchain: offchain db set: pos 291 parent_hash 0x6a5aebcbc8c318095aa9b2c21c276c5532e487c22ccdc7ab431d258d186c81f6 key [12, 109, 109, 114, 35, 1, 0, 0, 0, 0, 0, 0, 106, 90, 235, 203, 200, 195, 24, 9, 90, 169, 178, 194, 28, 39, 108, 85, 50, 228, 135, 194, 44, 205, 199, 171, 67, 29, 37, 141, 24, 108, 129, 246]    
2023-04-04 21:34:26.624 DEBUG main runtime::mmr::offchain: offchain db set: pos 292 parent_hash 0x6a5aebcbc8c318095aa9b2c21c276c5532e487c22ccdc7ab431d258d186c81f6 key [12, 109, 109, 114, 36, 1, 0, 0, 0, 0, 0, 0, 106, 90, 235, 203, 200, 195, 24, 9, 90, 169, 178, 194, 28, 39, 108, 85, 50, 228, 135, 194, 44, 205, 199, 171, 67, 29, 37, 141, 24, 108, 129, 246]    
2023-04-04 21:34:26.625 DEBUG main runtime::system: [148] 0 extrinsics, length: 11 (normal 0%, op: 0%, mandatory 0%) / normal weight:Weight(ref_time: 0, proof_size: 0) (0%) op weight Weight(ref_time: 0, proof_size: 0) (0%) / mandatory weight Weight(ref_time: 2997764131, proof_size: 142024) (0%)

Isn't the latter command supposed to fail also?

4
  • Can you run with runtime=debug and paste the output?
    – kianenigma
    Apr 4 at 18:40
  • The second should also fail, if everything is correct.
    – kianenigma
    Apr 4 at 18:40
  • @kianenigma I have added the output logs.
    – Szegoo
    Apr 4 at 19:36
  • 1
    This appears to be a bug. I've created an issue (github.com/paritytech/substrate/issues/13837) and will try to resolve it some time this or next week.
    – liamaharon
    Apr 6 at 9:03

1 Answer 1

3

There is no pallet named Collective defined in construct_runtime!.

The pallets implementing pallet_collective are named Council, TechnicalCommittee and AllianceMotion.

Try using a name from construct_runtime!, e.g.

./substrate-try-runtime try-runtime \
    --runtime runtime-try-runtime.wasm \
    -lruntime=debug \
    execute-block \
    --try-state Council \      
    live --uri ws://localhost:9944

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.