fix(pxe): probe the full permitted window when no tagging index is finalized#24667
Draft
vezenovm wants to merge 5 commits into
Draft
fix(pxe): probe the full permitted window when no tagging index is finalized#24667vezenovm wants to merge 5 commits into
vezenovm wants to merge 5 commits into
Conversation
…nalized The store permits pending indexes up to (lastFinalizedIndex ?? 0) + UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN inclusive, but with nothing finalized the first sync window probed [0, WINDOW_LEN), one index short of that bound. Since the sync loop only advances past its first window on a finalized-index change, a still-pending tx from another PXE at the boundary index was never discovered, and the next locally chosen index would collide with its onchain tag. The first window now uses the same formula as the window advance, changing behavior only for a fresh secret (one extra probed index).
vezenovm
commented
Jul 13, 2026
vezenovm
commented
Jul 13, 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.
The sender tagging store permits pending indexes up to
(lastFinalizedIndex ?? 0) + UNFINALIZED_TAGGING_INDEXES_WINDOW_LENinclusive, but with nothing finalized the first sync window only probed[0, WINDOW_LEN), one index short of that bound.The sync loop only advances past its first window on a finalized-index change, so a still-pending tx from another PXE at the boundary index was never discovered and the next locally chosen index would collide with its onchain tag.
The first window now uses the same formula as the window advance (
end = (finalizedIndex ?? 0) + WINDOW_LEN + 1). For any finalized index this is identical to the previousstart + WINDOW_LEN, so behavior changes only for a fresh secret (one extra probed index).The new test fails on the base branch with lastUsed 83 vs 84 and passes with the fix.
Note for whichever lands second: the window-straddle test on #24655 pins window 1 as [0, WINDOW_LEN); with this fix the first window for a fresh secret becomes [0, WINDOW_LEN], so that test's boundary indexes shift by one.