Repository navigation
fix(hotblocks): keep the finalized head when retention passes it - #127
Merged
Merged
Conversation
Finality does not move back, so dropping the watermark when a trim left it below the window stripped finality information from every response until the chain's finality climbed back in. The watermark now survives below the window as a claim about the chain (RS-2) and NO_DATA answers carry it too (RP-5); only a RESET — or a trim that empties the window (INV-5) — clears it. The conformance model matches the service on both edges: the emptying trim clears its watermark, and the fork fallback under finality below the window resumes at the window start (WP-6), a position INV-14 permits. Co-Authored-By: Claude Code <noreply@anthropic.com>
mo4islona
force-pushed
the
fix/hotblocks-retain-finalized-head
branch
from
November 4, 2026 12:33
5b28ffc to
617e6db
Compare
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.
Closes #126
Problem
When a
Head(n)retention window advanced past the finalized head, thetrim dropped the watermark from the dataset label. Finality does not move
back, so the deleted watermark was still a true claim about the chain —
but every response until finality climbed back into the window reported
no finalized head at all, and
/finalized-streamanswered 204 withoutthe watermark headers.
Change
a RESET clears it. Clients read the whole window as unfinalized while
the head sits below it.
maps to
QueryIsAboveTheHeadwith the current head instead of none,and a finalized-only query whose range starts above the head reads as
NO_DATA, never an empty 200.
head; a report back inside the window raises it again.
to match; the harness model and comparator updated accordingly.
ct10_finality_below_window) covers: the200 from the window keeps reporting the head below it, both NO_DATA
paths (live above the head, finalized-only from the window start)
carry the watermark, and finality climbing back raises it.
The open question from the issue — a dataset clear dropping the head —
stays unchanged; that path is a RESET and keeps clearing the watermark.
🤖 Generated with Claude Code