Skip to content

fix(pxe): probe the full permitted window when no tagging index is finalized#24667

Draft
vezenovm wants to merge 5 commits into
merge-train/fairies-v5from
mv/fix-fresh-secret-probe-window
Draft

fix(pxe): probe the full permitted window when no tagging index is finalized#24667
vezenovm wants to merge 5 commits into
merge-train/fairies-v5from
mv/fix-fresh-secret-probe-window

Conversation

@vezenovm

@vezenovm vezenovm commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

The sender tagging store permits pending indexes up to (lastFinalizedIndex ?? 0) + UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN inclusive, 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 previous start + 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.

…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 vezenovm added ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure ci-draft Run CI on draft PRs. labels Jul 13, 2026
Comment thread yarn-project/pxe/src/tagging/sender_sync/sync_sender_tagging_indexes.test.ts Outdated
@vezenovm vezenovm added the claudebox Owned by claudebox. it can push to this PR. label Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants