Skip to content

Conversation

@ipapandinas
Copy link
Contributor

@ipapandinas ipapandinas commented Dec 29, 2025

Comment on lines +50 to 57
// Set the current block number in storage to be exactly 1 less than target
// This satisfies the runtime's assertion: current_block + 1 == new_block
await astar.dev.setStorage({
system: {
number: targetBlockHeight - 1,
},
})
await astar.dev.newBlock({ count: 1, unsafeBlockHeight: targetBlockHeight })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised that .newBlock doesn't handle this update since it will fail otherwise (except if advancing to the next consecutive block).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me too, even when using the latest chopstick version. The new assert check in the frame system code is new (1month old) and the issue is happening when using unsafeBlockHeight so maybe it has not been patched yet? I will consider open an issue later to flag it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newBlock doesn't handle it because there's no assertion, or at least there was not

@ipapandinas ipapandinas merged commit ef924f5 into master Dec 29, 2025
1 check passed
@ipapandinas ipapandinas deleted the fix/uplift branch December 29, 2025 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants