Zebra v5.0.0-rc.0 rollback utility build
Pre-releaseRollback utility build based on Zebra v5.0.0 with finalized-state rollback support.
Assets
The Linux x86_64 archive contains both binaries:
zebra- the standard Zebra node binaryzebra-rollback-state- standalone finalized-state rollback utility
Rollback performance
For modern v5 rollback targets, zebra-rollback-state no longer replays note
commitment trees from genesis when the removed block range did not change the
Sprout tree. It loads the target Sapling and Orchard roots from the existing
height-indexed state and rebuilds only the history tree from the active network
upgrade activation height.
If any rolled-back block contains Sprout commitments, rollback deliberately uses
the full tree rebuild path so the Sprout tip tree is reset to the target height
instead of being left at the pre-rollback tip.
Using zebra-rollback-state
Stop Zebra before rolling back the state database.
Download and unpack the archive:
curl -L -O https://github.com/valargroup/zebra/releases/download/v5.0.0-rc.0/zebra-v5.0.0-rc.0-x86_64-unknown-linux-gnu.tar.gz
curl -L -O https://github.com/valargroup/zebra/releases/download/v5.0.0-rc.0/zebra-v5.0.0-rc.0-x86_64-unknown-linux-gnu.tar.gz.sha256
sha256sum -c zebra-v5.0.0-rc.0-x86_64-unknown-linux-gnu.tar.gz.sha256
tar -xzf zebra-v5.0.0-rc.0-x86_64-unknown-linux-gnu.tar.gzPreview the rollback plan without changing state:
./zebra-rollback-state \
--network mainnet \
--cache-dir "$HOME/.cache/zebra" \
--height <HEIGHT> \
--dry-runApply the rollback by omitting --dry-run:
./zebra-rollback-state \
--network mainnet \
--cache-dir "$HOME/.cache/zebra" \
--height <HEIGHT>Use --network testnet for Testnet. Pass the root Zebra cache directory,
usually $HOME/.cache/zebra on Linux, not the nested state/vN/mainnet or
state/vN/testnet directory.
To preserve rolled-back finalized blocks in the non-finalized backup cache, add:
--keep-rolled-back-blocksFull help:
./zebra-rollback-state --help