Skip to content

Commit fa18358

Browse files
committed
Update docs to show comma-separated --uri syntax
1 parent 939e2d9 commit fa18358

2 files changed

Lines changed: 28 additions & 15 deletions

File tree

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,21 +184,29 @@ cargo build --features try-runtime --release && cp target/release/substrate .
184184

185185
```bash
186186
# Assuming local nodes are running (e.g., `./substrate --dev --tmp --ws-port 9999`).
187-
# Multiple --uri flags can be provided for parallel state download.
187+
# Multiple URIs can be provided for parallel state download, either
188+
# comma-separated or via repeated --uri flags.
188189
try-runtime \
189190
--runtime /path-to-substrate/target/release/wbuild/my-runtime.wasm \
190191
on-runtime-upgrade \
191192
--disable-mbm-checks \
192193
live \
193-
--uri ws://localhost:9999 \
194-
--uri ws://localhost:9998
194+
--uri ws://localhost:9999,ws://localhost:9998
195195
...
196196
```
197197

198198
To speed up state download, you can provide multiple URIs for parallel fetching:
199199

200200
```bash
201201
# assuming multiple substrate nodes running on ports 9999, 9998, 9997
202+
# comma-separated:
203+
try-runtime \
204+
--runtime /path-to-substrate/target/release/wbuild/my-runtime.wasm \
205+
on-runtime-upgrade \
206+
live \
207+
--uri ws://localhost:9999,ws://localhost:9998,ws://localhost:9997
208+
209+
# or repeated flags:
202210
try-runtime \
203211
--runtime /path-to-substrate/target/release/wbuild/my-runtime.wasm \
204212
on-runtime-upgrade \
@@ -210,8 +218,8 @@ try-runtime \
210218

211219
* Same as the previous example, but run it at specific block number's state and using the live
212220
polkadot network. This means that this block hash's state should not yet have been pruned by
213-
the node running at `rpc.polkadot.io`. Multiple `--uri` flags can be provided for parallel
214-
state download.
221+
the node running at `rpc.polkadot.io`. Multiple URIs can be provided for parallel
222+
state download (comma-separated or via repeated `--uri` flags).
215223

216224
```bash
217225
try-runtime \
@@ -236,8 +244,7 @@ For faster snapshot creation with large state, use multiple RPC endpoints:
236244

237245
```bash
238246
try-runtime --runtime existing create-snapshot \
239-
--uri ws://localhost:9999 \
240-
--uri ws://localhost:9998 \
247+
--uri ws://localhost:9999,ws://localhost:9998 \
241248
-- my-snapshot.snap
242249
```
243250

cli/main.rs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,21 +200,28 @@
200200
//!
201201
//! ```bash
202202
//! # Assuming local nodes are running (e.g., `./substrate --dev --tmp --ws-port 9999`).
203-
//! # Multiple --uri flags can be provided for parallel state download.
203+
//! # Multiple URIs can be provided for parallel state download, either
204+
//! # comma-separated or via repeated --uri flags.
204205
//! try-runtime \
205206
//! --runtime /path-to-substrate/target/release/wbuild/my-runtime.wasm \
206207
//! on-runtime-upgrade \
207208
//! --disable-mbm-checks \
208209
//! live \
209-
//! --uri ws://localhost:9999 \
210-
//! --uri ws://localhost:9998
210+
//! --uri ws://localhost:9999,ws://localhost:9998
211211
//! ...
212212
//! ```
213213
//!
214214
//! To speed up state download, you can provide multiple URIs for parallel fetching:
215215
//!
216216
//! ```bash
217-
//! # assuming multiple substrate nodes running on ports 9999, 9998, 9997
217+
//! # comma-separated:
218+
//! try-runtime \
219+
//! --runtime /path-to-substrate/target/release/wbuild/my-runtime.wasm \
220+
//! on-runtime-upgrade \
221+
//! live \
222+
//! --uri ws://localhost:9999,ws://localhost:9998,ws://localhost:9997
223+
//!
224+
//! # or repeated flags:
218225
//! try-runtime \
219226
//! --runtime /path-to-substrate/target/release/wbuild/my-runtime.wasm \
220227
//! on-runtime-upgrade \
@@ -226,8 +233,8 @@
226233
//!
227234
//! * Same as the previous example, but run it at specific block number's state and using the live
228235
//! polkadot network. This means that this block hash's state should not yet have been pruned by
229-
//! the node running at `rpc.polkadot.io`. Multiple `--uri` flags can be provided for parallel
230-
//! state download.
236+
//! the node running at `rpc.polkadot.io`. Multiple URIs can be provided for parallel state
237+
//! download (comma-separated or via repeated `--uri` flags).
231238
//!
232239
//! ```bash
233240
//! try-runtime \
@@ -252,8 +259,7 @@
252259
//!
253260
//! ```bash
254261
//! try-runtime --runtime existing create-snapshot \
255-
//! --uri ws://localhost:9999 \
256-
//! --uri ws://localhost:9998 \
262+
//! --uri ws://localhost:9999,ws://localhost:9998 \
257263
//! -- my-snapshot.snap
258264
//! ```
259265
//!

0 commit comments

Comments
 (0)