Skip to main content
7 votes
Accepted

Testing a migration with `try-runtime`

Good question! try-runtime is the right idea indeed. (Note for Parity devs at the end) Currently the try-runtime CLI scraps the chain state from the an RPC node. Using the public node is probably ...
Oliver Tale-Yazdi's user avatar
5 votes
Accepted

trait bounds not satisfied with Executive::try_runtime_upgrade()

You are missing features on the pallet crates. The following patch fixed this: diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 9a8d59f..4eebddd 100644 --- a/runtime/Cargo.toml +++ b/runtime/...
Oliver Tale-Yazdi's user avatar
5 votes
Accepted

Problem when running try-state

This is a typo in the docs. live belongs before --uri, not after execute-block. Try this: ./target/release/polkadot try-runtime \ --runtime ./target/release/wbuild/polkadot-runtime/...
liamaharon's user avatar
5 votes
Accepted

Potential storage issue with try-runtime tool

There is no magic involved here. The key of the storage location is Twox128(Prefix::pallet_prefix()) ++ Twox128(Prefix::STORAGE_PREFIX) (explained here) In your case the old storage hash and the new ...
Oliver Tale-Yazdi's user avatar
5 votes
Accepted

AllPalletsWithSystem trait not implemented for Executive when running tests

You are probably not passing the try-runtime feature down to all the pallets in your runtime. The feature needs to be propagated to all pallets (Example) and ideally also dependencies, otherwise the ...
Oliver Tale-Yazdi's user avatar
4 votes
Accepted

Polkadot 29 update - try-runtime feature (trait bounds error)

The auto-generated implementation for the TryState trait is feature gated behind try-runtime. This requires all pallets to support try-runtime as well. You can try it out for a single pallet by ...
Oliver Tale-Yazdi's user avatar
4 votes
Accepted

How to log in try-runtime?

I missed the --checks for the subcommand on-runtime-upgrade. So, there were no checks running. In the past, the checks were run by default. Now they don't. The command should be: RUST_LOG=runtime=...
AurevoirXavier's user avatar
  • 10.6k
4 votes
Accepted

Runtime upgrade for `ParachainSystem::HostConfiguration`

The error is "expected". When async backing was merged, the HostConfiguration type changed. The AbridgedHostConfiguration is, as the name suggests, an abridged version of the ...
bkchr's user avatar
  • 11.5k
3 votes
Accepted

How to use the follow-chain subcommand in try-runtime?

Clone repo: git clone https://github.com/paritytech/substrate cd substrate Run a dev chain locally. This is the chain that I want to "follow": cargo b -r cp target/release/node-template . ./...
Bruno's user avatar
  • 8,315
3 votes
Accepted

Running try-runtime with try-state option doesn't fail

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 ...
liamaharon's user avatar
3 votes
Accepted

Getting 'Bad input data provided to execute_block' when running try-runtime's follow-chain

This appears to be a bug and an issue has been opened. I'm not sure if this is the SE etiquette is for these scenarios (or what is), but I will keep this answer updated as progress is made on the ...
liamaharon's user avatar
3 votes
Accepted

What is a good use-case for using try-runtime with follow-chain and fork-off-substrate?

try-runtime::follow-chain allows you to follow a chain's finalized blocks and apply the same extrinsics on top of a new WASM runtime. Indeed, because the :CODE: is different, and won't expect the ...
kianenigma's user avatar
  • 2,799
3 votes
Accepted

"wasm32-unknown-unknown target is not supported"-error while integrating try-runtime

It looks like the latest Rust nightly has broken our Wasm builds. There have been other reports of this issue here: https://github.com/paritytech/substrate/issues/10767 And the fix is coming in here: ...
Shawn Tabrizi's user avatar
  • 16.1k
2 votes
Accepted

Removal of storage prefix from database

Using the frame support iterators on pallet maps when available could be the better approach. If not using frame support (or storage structure do not allow iteration), one can use sp_io primitives (...
cheme's user avatar
  • 456
2 votes

try-runtime no output

As my comments is saying, you need to pin tracing-core to 0.1.26.
bkchr's user avatar
  • 11.5k
2 votes

try-runtime: Found argument 'ws://localhost:9944' which wasn't expected

As the help message says: USAGE: substrate try-runtime on-runtime-upgrade live [OPTIONS] --uri <URI> use the --uri flag: cargo run --release --features=try-runtime try-runtime on-runtime-...
Bruno's user avatar
  • 8,315
2 votes

try-runtime fails with error RestartNeeded - Invalid request ID

What also has helped me, is pallet option of a live subcommand (uploads only a state of a pallet). Since my test was requiring only a state of a particular pallet, with the option I could do that.
muharem's user avatar
  • 419
2 votes

try-runtime fails with error RestartNeeded - Invalid request ID

The underlying reason for this error is the target not not being able to send back large payloads. You need to run against nodes that execute with: --rpc-max-request-size 100000 --rpc-max-response-...
kianenigma's user avatar
  • 2,799
2 votes

try-runtime fails with error RestartNeeded - Invalid request ID

You are using the public Kusama endpoint; this will not work. The node times out before the batch which tries to download all the state can complete. Please follow this description about how to use it:...
Oliver Tale-Yazdi's user avatar
2 votes

Getting 'Bad input data provided to execute_block' when running try-runtime's follow-chain

This is a typical error and it means that the "block format" (encoding/decoding) between the chain that's currently running (remove or local) and the new runtime that you compiled and passed ...
kianenigma's user avatar
  • 2,799
2 votes
Accepted

try-runtime polkadot version 36 .. execution flag removed

What is the CLI version that you are using? The documentation of the latest try-runtime CLI is a good resource, unfortunately the Substrate docs are out of date with the newer version of try-runtime ...
gpestana's user avatar
  • 263
2 votes
Accepted

How to debug try-runtime with the new try-runtime client?

I solved this problem by chaining the point of view. It is possible to attach a debugger to the try-runtime project and treat the chain code as a black box. Observing the input and the output gave me ...
Simson's user avatar
  • 1,201
2 votes

How to debug try-runtime with the new try-runtime client?

Not without significant change to try-runtime-cli. Suggest using logging for your debug.
Alex Sed's user avatar
  • 590
2 votes
Accepted

try-runtime error exceeded max limit of 15728640

Try running your node with flags --rpc-max-request-size 1000 and --rpc-max-response-size 1000
liamaharon's user avatar
2 votes
Accepted

Try-runtime error, runtime is NOT compiled with try-runtime feature

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! { ...
Klapeyron's user avatar
  • 136
2 votes
Accepted

Do I need to run a pallet storage migrations even when I'm just adding the pallet to the runtime for the first time?

It varies depending on the pallet. For certain pallets, you must configure the genesis data. If there is no genesis data that needs to be set, you can disregard the migration and manually set the ...
AurevoirXavier's user avatar
  • 10.6k
2 votes
Accepted

Integrating storage migration for pallet-contracts

These are multi-blocks migrations. You don't need to add all of them to the Executive. You should add pallet_contracts::Migration to the Executive and configure: impl pallet_contracts::Config { ...
AurevoirXavier's user avatar
  • 10.6k
2 votes

pallet storage migration fails try-runtime idempotent test

There is a new pattern where migrations do not need to check the pre- and post-version anymore. Doing this manually is error-prone, hence there is now a VersionedMigration wrapper that can be used lik:...
Oliver Tale-Yazdi's user avatar
1 vote
Accepted

Try runtime failed to generate compact proof: TrieError(InvalidStateRoot

try-runtime on-runtime-upgrade --help suggests: "Performing any checks will potentially invalidate the measured PoV/Weight." Suggest running it separately with --checks=none to check the POV/...
Alex Sed's user avatar
  • 590
1 vote
Accepted

How to use try-runtime when upgrading a chain/parachain to latest substrate release?

Bruno gave a good overview of the practical part; I will focus a bit on the theoretical part of your questions. So now we have a try-runtime step in CI, but what output from try-runtime requires ...
Oliver Tale-Yazdi's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible