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

Commit 3c5079f

Browse files
Szegoogpestana
authored andcommitted
Improve try-state docs (#13967)
* Improve Try-State docs * fmt * fixes
1 parent aa50d06 commit 3c5079f

File tree

1 file changed

+18
-11
lines changed
  • utils/frame/try-runtime/cli/src

1 file changed

+18
-11
lines changed

utils/frame/try-runtime/cli/src/lib.rs

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@
248248
//! # assuming there's `./substrate --dev --tmp --ws-port 9999` or similar running.
249249
//! ./substrate-try-runtime \
250250
//! try-runtime \
251-
//! --runtime kitchensink_runtime.wasm \
251+
//! --runtime runtime-try-runtime.wasm \
252252
//! -lruntime=debug \
253253
//! on-runtime-upgrade \
254254
//! live --uri ws://localhost:9999
@@ -260,7 +260,7 @@
260260
//! ```bash
261261
//! ./substrate-try-runtime \
262262
//! try-runtime \
263-
//! --runtime kitchensink_runtime.wasm \
263+
//! --runtime runtime-try-runtime.wasm \
264264
//! -lruntime=debug \
265265
//! on-runtime-upgrade \
266266
//! live --uri ws://localhost:9999 \
@@ -295,7 +295,7 @@
295295
//! Then, we can use it to have the same command as before, `on-runtime-upgrade`
296296
//!
297297
//! ```bash
298-
//! try-runtime \
298+
//! ./substrate-try-runtime try-runtime \
299299
//! --runtime runtime-try-runtime.wasm \
300300
//! -lruntime=debug \
301301
//! on-runtime-upgrade \
@@ -309,7 +309,7 @@
309309
//! --runtime runtime-try-runtime.wasm \
310310
//! -lruntime=debug \
311311
//! execute-block live \
312-
//! --uri ws://localhost:999
312+
//! --uri ws://localhost:9999
313313
//! ```
314314
//!
315315
//! This can still be customized at a given block with `--at`. If you want to use a snapshot, you
@@ -320,15 +320,22 @@
320320
//!
321321
//! ```bash
322322
//! ./substrate-try-runtime try-runtime \
323-
//! --runtime runtime-try-runtime.wasm \
324-
//! -lruntime=debug \
325-
//! execute-block live \
326-
//! --try-state System,Staking \
327-
//! --uri ws://localhost:999
323+
//! --runtime runtime-try-runtime.wasm \
324+
//! -lruntime=debug \
325+
//! execute-block \
326+
//! --try-state System,Staking \
327+
//! live \
328+
//! --uri ws://localhost:9999 \
329+
//! --pallet System Staking
328330
//! ```
329331
//!
330-
//! Will only run the `try-state` of the two given pallets. See
331-
//! [`frame_try_runtime::TryStateSelect`] for more information.
332+
//! Will only run the `try-state` of the two given pallets. When running `try-state` against
333+
//! some real chain data it can take a long time for the command to execute since it has to
334+
//! query all the key-value pairs. In scenarios like above where we only want to run the
335+
//! `try-state` for some specific pallets, we can use the `--pallet` option to specify from
336+
//! which pallets we want to query the state. This will greatly decrease the execution time.
337+
//!
338+
//! See [`frame_try_runtime::TryStateSelect`] for more information.
332339
//!
333340
//! * Follow our live chain's blocks using `follow-chain`, whilst running the try-state of 3 pallets
334341
//! in a round robin fashion

0 commit comments

Comments
 (0)