You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the debug_unwind and reset_to_download commands in staged_pipeline utility, you can simulate any reorg over the block snapshots by repeatedly advancing the execution pipeline to some target block (--height) and then going some steps behind (--step), e.g.
Even though the blocks in snapshots are canonical by definition and hence such reorgs cannot happen in practice, this approach is still extremely useful to debug the unwind procedure.
The first block where you encounter the dreaded wrong state root error is 694'128 (very early in the chain):
% ./cmd/dev/staged_pipeline --exclusive --datadir /Users/tullio/Library/Silkworm debug_unwind --height 694128 --stop_before_stage HistoryIndex --step 1 --force
INFO [12-08|19:12:56.504 UTC] Debug unwind datadir: /Users/tullio/Library/Silkworm
INFO [12-08|19:13:05.167 UTC] Reopen snapshot repository folder: /Users/tullio/Library/Silkworm/snapshots
INFO [12-08|19:13:08.651 UTC] Total reopened bundles: 72 max block available: 20'474'999
INFO [12-08|19:13:08.651 UTC] Debug unwind: forward to=694'128 START
...
INFO [12-08|19:13:20.829 UTC] Debug unwind: forward to=694'128 END
INFO [12-08|19:13:20.829 UTC] Debug unwind: unwind down to block=694'127 START
INFO [12-08|19:13:20.829 UTC] ExecutionPipeline Unwind start
INFO [12-08|19:13:20.829 UTC] [7/13 HashState] op=kUnwind from=694128 to=694127 span=1
INFO [12-08|19:13:20.829 UTC] [8/13 IntermediateHashes] begin op=kUnwind from=694128 to=694127 span=1
INFO [12-08|19:13:20.829 UTC] [8/13 IntermediateHashes] clearing=TrieAccount
INFO [12-08|19:13:20.829 UTC] [8/13 IntermediateHashes] clearing=TrieStorage
ERROR [12-08|19:13:20.992 UTC] [8/13 IntermediateHashes] function=regenerate_intermediate_hashes exception=expected 0xa1d37be94ad1f837c5c07eb22e37fc0fdd3148c68e8a7ff713bb0cb3a3ee945d got 0x1669df5b4a59509cf11e4f8dcd0133c2738dc8151061e0d76c1c4002f2c83e64
ERROR [12-08|19:13:20.992 UTC] [8/13 IntermediateHashes] function=unwind exception=kWrongStateRoot
ERROR [12-08|19:13:20.992 UTC] [8/13 IntermediateHashes] op=Unwind returned=kWrongStateRoot
ERROR [12-08|19:13:20.992 UTC] ExecutionPipeline Unwind interrupted due to stage IntermediateHashes failure
Error: unwind failed: kWrongStateRoot
Running standalone Silkworm at commit 5059a5f an unexpected wrong state root error occurred after a reorg while following the chain tip:
The text was updated successfully, but these errors were encountered: