fix: send FinishedHeight using safe height when finalized unavailable#72
Open
init4samwise wants to merge 1 commit intomainfrom
Open
fix: send FinishedHeight using safe height when finalized unavailable#72init4samwise wants to merge 1 commit intomainfrom
init4samwise wants to merge 1 commit intomainfrom
Conversation
When the host chain doesn't report finalized blocks (beacon client not synced, checkpoint sync incomplete, or testnet without proper finality reporting), the WAL grows unbounded because FinishedHeight is never sent. This change adds a fallback to use the safe block height for FinishedHeight when finalized blocks aren't available. Safe blocks are unlikely to reorg, making them a reasonable threshold for clearing the WAL. Closes ENG-1830
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
When the host chain doesn't report finalized blocks (beacon client not synced, checkpoint sync incomplete, or testnet without proper finality reporting), the WAL grows unbounded because
FinishedHeightis never sent to reth.This was observed on Pecorino with the warning:
Root Cause
In
update_canon_heights(),FinishedHeightis only sent whenfinalized_ru_block_hash != genesis_ru_hash. When the host doesn't report finalized blocks,load_finalized_block_heights()returns{ host: 0, rollup: 0 }, andFinishedHeightis never sent.Fix
Add a fallback to use the safe block height for
FinishedHeightwhen finalized blocks aren't available. Safe blocks are unlikely to reorg, making them a reasonable threshold for clearing the WAL.If there's a reorg beyond the safe block, reth will replay from the WAL as expected.
Closes ENG-1830