From e85188b800c63ca3be545c1a43a0927fe0b6fd11 Mon Sep 17 00:00:00 2001 From: Sergej Sakac <73715684+Szegoo@users.noreply.github.com> Date: Sun, 21 May 2023 23:30:49 +0200 Subject: [PATCH] Improve try-state docs (#13967) * Improve Try-State docs * fmt * fixes --- utils/frame/try-runtime/cli/src/lib.rs | 29 ++++++++++++++++---------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/utils/frame/try-runtime/cli/src/lib.rs b/utils/frame/try-runtime/cli/src/lib.rs index 9268ef2edba8b..4893c464be516 100644 --- a/utils/frame/try-runtime/cli/src/lib.rs +++ b/utils/frame/try-runtime/cli/src/lib.rs @@ -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 @@ -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 \ @@ -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 \ @@ -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 @@ -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