-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Unsafe revert in sc_client_api::backend::Backend
doesn't revert finalized blocks
#14194
Comments
The backend will not revert to blocks for which it doesn't have state, so if pruning is enabled it won't revert past the latest finalized block. I wrote a test and it worked when state was available. Try re-running with |
@andresilva I have an additional question now.
I see, thank you so much for the explanation! |
This could continue as a Stack Exchange question |
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Description of bug
Unsafe revert in
sc_client_api::backend::Backend
doesn't work as expected.It is described in the doc that "If
revert_finalized
is set it will attempt to revert past any finalized block".However, providing
true
as its second arg doesn't revert finalized blocks.Background
For local contract development node, we'd like to have revert RPC feature (not cli subcommand) for convenience.
However, it doesn't revert finalized blocks. https://github.com/AstarNetwork/swanky-node/pull/68/files#r1200247675
In below image case, finalized block # 100, and attempted to revert to block # 50 via RPC.
The diff number is 50 but they aren't reverted.
Steps to reproduce
No response
The text was updated successfully, but these errors were encountered: