Add rollback script, fix deadline non-determinism#169
Merged
raymondjacobson merged 8 commits intomainfrom Mar 30, 2026
Merged
Conversation
During block sync, FinalizeBlock re-validates attestations by calling isValidAttestation, which queries the current validator set to compute attestor rendezvous. Nodes that state-synced have a validator set from a later height, causing the rendezvous to diverge and attestation validation to fail. This produces a different ExecTxResult code than the original validators computed, breaking the LastResultsHash check in the next block header and halting the syncing node. Scoped to registration/deregistration attestations and misbehavior deregistrations — the tx types where this divergence has been observed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
a7cdd22 to
e8820b4
Compare
…e handlers" This reverts commit e8820b4.
Adds cmd/rollback which rolls back CometBFT state by one block and cleans up the corresponding PG rows so the block can be replayed with corrected code. Used to recover nodes that got stuck at block 21941479 due to the RSize 10→15 upgrade causing attestation re-validation failures in FinalizeBlock. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Build rollback binary alongside openaudio and include it in the image with a dedicated entrypoint script. Run via: docker run --entrypoint /bin/rollback-entrypoint.sh <image> Also fix core_app_state cleanup to DELETE instead of UPDATE (avoids primary key conflict since the previous block's row already exists). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add -blocks N flag to roll back multiple blocks in a loop. Add command dispatch in entrypoint so rollback can be invoked as: docker run <image> rollback [-blocks N] [-dry-run] Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rickyrombo
approved these changes
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.