paritytech / try-runtime-cli

Substrate's programatic testing framework.
https://paritytech.github.io/try-runtime-cli/try_runtime
GNU General Public License v3.0
14 stars 13 forks source link

Rejig block selection to properly respect `--at` #55

Closed liamaharon closed 12 months ago

liamaharon commented 12 months ago

Closes https://github.com/paritytech/try-runtime-cli/issues/26

execute-block and offchain-worker commands currently executes the nth + 1 block extrinsics on top of the state of the nth block.

Instead, we should execute the nth block extrinsics on top of the state of the nth - 1 block.

This not only is a more clear API, but fixes an issue where the CLI tries to fetch state for a block that does not exist (encountered this here: https://github.com/paritytech/polkadot-sdk/actions/runs/6796531510/job/18476812057?pr=1938#step:7:98)

cc @ggwpez @Szegoo