Enum try_runtime_cli::Command
source · pub enum Command {
OnRuntimeUpgrade(OnRuntimeUpgradeCmd),
ExecuteBlock(ExecuteBlockCmd),
OffchainWorker(OffchainWorkerCmd),
FollowChain(FollowChainCmd),
FastForward(FastForwardCmd),
CreateSnapshot(CreateSnapshotCmd),
}
Expand description
Possible commands of try-runtime
.
Variants§
OnRuntimeUpgrade(OnRuntimeUpgradeCmd)
Execute the migrations of the given runtime
This uses a custom runtime api call, namely “TryRuntime_on_runtime_upgrade”. The code path
only triggers all of the on_runtime_upgrade
hooks in the runtime, and optionally
try_state
.
See frame_try_runtime::TryRuntime
and
commands::on_runtime_upgrade::OnRuntimeUpgradeCmd
for more information.
ExecuteBlock(ExecuteBlockCmd)
Executes the given block against some state.
This uses a custom runtime api call, namely “TryRuntime_execute_block”. Some checks, such
as state-root and signature checks are always disabled, and additional checks like
try-state
can be enabled.
See frame_try_runtime::TryRuntime
and commands::execute_block::ExecuteBlockCmd
for
more information.
OffchainWorker(OffchainWorkerCmd)
Executes the offchain worker hooks of a given block against some state.
This executes the same runtime api as normal block import, namely
OffchainWorkerApi_offchain_worker
.
See frame_try_runtime::TryRuntime
and commands::offchain_worker::OffchainWorkerCmd
for more information.
FollowChain(FollowChainCmd)
Follow the given chain’s finalized blocks and apply all of its extrinsics.
This is essentially repeated calls to Command::ExecuteBlock
.
This allows the behavior of a new runtime to be inspected over a long period of time, with realistic transactions coming as input.
NOTE: this does NOT execute the offchain worker hooks of mirrored blocks. This might be added in the future.
This does not support snapshot states, and can only work with a remote chain. Upon first connections, starts listening for finalized block events. Upon first block notification, it initializes the state from the remote node, and starts applying that block, plus all the blocks that follow, to the same growing state.
This can only work if the block format between the remote chain and the new runtime being tested has remained the same, otherwise block decoding might fail.
FastForward(FastForwardCmd)
Produce a series of empty, consecutive blocks and execute them one-by-one.
To compare it with Command::FollowChain
:
- we don’t have the delay of the original blocktime (for Polkadot 6s), but instead, we execute every block immediately
- the only data that will be put into blocks are pre-runtime digest items and inherent extrinsics; both things should be defined in your node CLI handling level
CreateSnapshot(CreateSnapshotCmd)
Create a new snapshot file.
Trait Implementations§
source§impl FromArgMatches for Command
impl FromArgMatches for Command
source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Self, Error>
source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error>
ArgMatches
to self
.source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>
ArgMatches
to self
.source§impl Subcommand for Command
impl Subcommand for Command
source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
source§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self
can parse a specific subcommandAuto Trait Implementations§
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
Blanket Implementations§
source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere Self: UniqueSaturatedFrom<T>,
source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere Self: UniqueSaturatedInto<T>,
T
. Read moresource§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.source§impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.