Zebrad: add rollback tip height command - #28
endophysics wants to merge 5 commits into
Conversation
3dea123 to
35a1f92
Compare
35a1f92 to
c9c4ee9
Compare
|
Swap-and-restore instead of in-place finalized mutation is the right call. Two on the staking replay:
|
|
Nice, this looks like it addresses the staking replay concerns from my earlier comment. The one test gap I still see is checkpoint replay end-to-end: the new test covers the helper path, but not a staking block driven through both non-finalized and checkpoint/finalized replay with equal bond rewards/value pools. I think that would be worth adding. One separate rollback edge: Testing: |
e1ca96c to
e7c5e70
Compare
e7c5e70 to
c78ac72
Compare
Adds
zebrad rollback-tip-height --height <height>to safely roll back local state by rebuilding a bounded copy through verified block replay, then atomically swapping it into place while keeping the previous state as a backup.Added it because during sync I would sometimes get stuck on a local branch when mining was enabled, which would then force me to restart the process.
Also invalidates tip-dependent GUI wallet/Zaino caches after rollback and fixes staking/delegation replay during checkpoint copying so rebuilt state preserves accounting correctly.