-
Notifications
You must be signed in to change notification settings - Fork 2.6k
try-runtime
- support all state versions
#12089
try-runtime
- support all state versions
#12089
Conversation
Ok(0) => Ok(StateVersion::V0), | ||
Ok(1) => Ok(StateVersion::V1), | ||
Ok(_) => Err("State version not supported."), | ||
_ => Err("State version couldn't have been parsed."), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_ => Err("State version couldn't have been parsed."), | |
_ => Err("Invalid state version."), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reworded
also, would you @bkchr / @ggwpez / @kianenigma support either of these two ideas?
When the blocktime is long, it makes sense obviously. However, for a short period (like we have in Aleph and possibly in Polkadot) it would probably be better to keep a single connection for the whole interaction. However, I'm not so sure whether this is feasible / worth doing. of course I'm willing to take up any related tasks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think both of your ideas makes sense, but they can and should be follow-up PRs.
@pmikolajczyk41 polkadot address for tip? |
bot merge |
@kianenigma I have added to the PR description, thank you! |
/tip medium |
@kianenigma A medium tip was successfully submitted for pmikolajczyk41 (15fdtPm7jNN9VZk5LokKcmBVfmYZkCXdjPpaPVL2w7WgCgRY on polkadot). https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/treasury/tips |
* Add argument * Apply * More verbose parsing * fmt * fmt again * Invalid state version * reuse parsing * type mismatch
Currently, every subcommand of
try-runtime
operates on externalities withStateVersion(1)
(which is the default forRemoteExternalities
- https://github.com/paritytech/substrate/blob/master/utils/frame/remote-externalities/src/lib.rs#L269). Although it will work with any remote chain without any warning or check, some problems may rise if chain uses another state version. For example, Polkadot (afaik) and AlephZero useStateVersion(0)
.This PR introduces new CLI option which enables user to specify target state version. By default it is
StateVersion::1
.cc: @kianenigma
Polkadot address: 15fdtPm7jNN9VZk5LokKcmBVfmYZkCXdjPpaPVL2w7WgCgRY