perf(headers): derive retained height from checkpoint finality - #1019
Merged
Merged
Conversation
czarcas7ic
force-pushed
the
adam/perf-checkpoint-retained-height
branch
from
September 21, 2026 12:38
7427c9c to
b56db67
Compare
czarcas7ic
force-pushed
the
adam/fix-floor-peer-ranking
branch
from
September 21, 2026 12:38
c262126 to
734f37c
Compare
czarcas7ic
changed the base branch from
adam/fix-floor-peer-ranking
to
main
September 21, 2026 12:38
…c-ci-1019-20260921
czarcas7ic
marked this pull request as ready for review
September 21, 2026 13:26
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Note Complete: Audit complete. V12 did not find any issues that need review. Open the full results here. Analyzed one file, diff |
evan-forbes
approved these changes
Sep 23, 2026
The checkpoint finality fast path derives oldest_retained_height from the new anchor instead of scanning the graph. Nothing else checks that value against the graph (recovery would silently repair a mismatch), so assert in debug builds that the anchor is the lowest retained header. Addresses review feedback on the retained height derivation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Motivation
Checkpoint finality scans the retained header graph to recover its minimum
height after pruning, although the new finalized anchor already determines
that minimum.
Solution
Use the finalized anchor height when checkpoint finality actually appends a
finalized prefix. Keep the existing calculation for all other transition
shapes.
Testing
The independent branch on main
f8a62d4bepassed 290 header-chain library tests on Rust 1.97.1, workspace all-target Clippy with warnings denied, formatting, and changelog validation. Two existing header-chain tests were ignored.Earlier paired Zakura-only runs over heights 705,000–735,000 measured 214.1 to 236.3 committed BPS with the queue-refill patch in both arms. Those measurements have not been repeated for this independent branch.
Codex separated this PR from its former stack and ran the current validation.