Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rejig block selection to properly respect --at #55

Merged
merged 9 commits into from Nov 10, 2023

Conversation

liamaharon
Copy link
Member

Closes #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

@liamaharon liamaharon added the bug Something isn't working label Nov 9, 2023
@liamaharon liamaharon changed the title Respect --at Rejig block selection to better respect --at Nov 9, 2023
@liamaharon liamaharon changed the title Rejig block selection to better respect --at Rejig block selection to properly respect --at Nov 9, 2023
core/src/state.rs Outdated Show resolved Hide resolved
core/src/commands/execute_block.rs Outdated Show resolved Hide resolved
core/src/state.rs Outdated Show resolved Hide resolved
@liamaharon liamaharon merged commit fd0ec95 into main Nov 10, 2023
4 checks passed
@liamaharon liamaharon deleted the liam-fix-execute-block-executing-wrong-block branch February 8, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check if try-runtime execute-block respects --at
3 participants