fix(host-rpc): track delivery high-water mark for backfill recovery#133
Open
fix(host-rpc): track delivery high-water mark for backfill recovery#133
Conversation
The notifier previously used `finalized` as the resume point after buffer exhaustion, which can be behind the last delivered block and violates the contiguity guarantee. Replace with a `last_emitted` high-water mark that tracks the actual last emitted (number, hash). Also changes backfill ceiling from `tip - buffer_capacity` to `tip - buffer_capacity / 2`, leaving half the buffer for frontfill overlap. Adds parent-hash continuity check on backfill resume. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 tasks
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.
Summary
finalizedwith alast_emitted: Option<(u64, B256)>high-water mark as the resume point after buffer exhaustion, fixing a contiguity violation where the notifier could backtrack behind already-delivered blockstip - buffer_capacitytotip - buffer_capacity / 2, leaving half the buffer depth for frontfill hash-walk overlapdrain_backfillto detect reorgs that occur during the gap between exhaustion and backfill resumeCompeting fix for #131 — see review comment for the diagnosis of why comparing to
finalizedis wrong.Test plan
last_emitted + 1, notfinalizedBackfillContinuityBreakNoFinalizedBlockremoval🤖 Generated with Claude Code