Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Improve try-state docs #13967

Merged
merged 6 commits into from
May 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 18 additions & 11 deletions utils/frame/try-runtime/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@
//! # assuming there's `./substrate --dev --tmp --ws-port 9999` or similar running.
//! ./substrate-try-runtime \
//! try-runtime \
//! --runtime kitchensink_runtime.wasm \
//! --runtime runtime-try-runtime.wasm \
//! -lruntime=debug \
//! on-runtime-upgrade \
//! live --uri ws://localhost:9999
Expand All @@ -260,7 +260,7 @@
//! ```bash
//! ./substrate-try-runtime \
//! try-runtime \
//! --runtime kitchensink_runtime.wasm \
//! --runtime runtime-try-runtime.wasm \
//! -lruntime=debug \
//! on-runtime-upgrade \
//! live --uri ws://localhost:9999 \
Expand Down Expand Up @@ -295,7 +295,7 @@
//! Then, we can use it to have the same command as before, `on-runtime-upgrade`
//!
//! ```bash
//! try-runtime \
//! ./substrate-try-runtime try-runtime \
//! --runtime runtime-try-runtime.wasm \
//! -lruntime=debug \
//! on-runtime-upgrade \
Expand All @@ -309,7 +309,7 @@
//! --runtime runtime-try-runtime.wasm \
//! -lruntime=debug \
//! execute-block live \
//! --uri ws://localhost:999
//! --uri ws://localhost:9999
//! ```
//!
//! This can still be customized at a given block with `--at`. If you want to use a snapshot, you
Expand All @@ -320,15 +320,22 @@
//!
//! ```bash
//! ./substrate-try-runtime try-runtime \
//! --runtime runtime-try-runtime.wasm \
//! -lruntime=debug \
//! execute-block live \
//! --try-state System,Staking \
//! --uri ws://localhost:999
//! --runtime runtime-try-runtime.wasm \
//! -lruntime=debug \
//! execute-block \
//! --try-state System,Staking \
//! live \
//! --uri ws://localhost:9999 \
//! --pallet System Staking
//! ```
//!
//! Will only run the `try-state` of the two given pallets. See
//! [`frame_try_runtime::TryStateSelect`] for more information.
//! Will only run the `try-state` of the two given pallets. When running `try-state` against
//! some real chain data it can take a long time for the command to execute since it has to
//! query all the key-value pairs. In scenarios like above where we only want to run the
//! `try-state` for some specific pallets, we can use the `--pallet` option to specify from
//! which pallets we want to query the state. This will greatly decrease the execution time.
//!
//! See [`frame_try_runtime::TryStateSelect`] for more information.
//!
//! * Follow our live chain's blocks using `follow-chain`, whilst running the try-state of 3 pallets
//! in a round robin fashion
Expand Down