Skip to content

fix(pxe): widen tracked sender tagging ranges with onchain discovery evidence#24663

Merged
vezenovm merged 5 commits into
mv/fix-sender-tag-sync-partial-revertfrom
mv/merge-discovered-tagging-ranges
Jul 13, 2026
Merged

fix(pxe): widen tracked sender tagging ranges with onchain discovery evidence#24663
vezenovm merged 5 commits into
mv/fix-sender-tag-sync-partial-revertfrom
mv/merge-discovered-tagging-ranges

Conversation

@vezenovm

@vezenovm vezenovm commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Stacked on #24655. Found while reviewing #24655. This is the "Window straddle" residual edge flagged in https://gist.github.com/nventuro/0aa690736b1d2865e27197723a814e9d (latent regardless of reverts); the fix takes the gist's suggested "extend an entry monotonically" option.

#24655 made discovery skip a differing range for an already tracked (secret, txHash) pair instead of throwing.
Before #24655 this same scenario hit the "Conflicting range" throw and permanently wedged the secret, so it was broken either way.

Fix: replace skipExisting with mergeExisting. On a range mismatch, discovery widens the stored entry to the union of both ranges (grow-only, driven by onchain evidence). The partial revert case is unchanged: the discovered sub-range unions to the existing prove-time entry, and the finalized receipt step still resolves it. The prove-time persist path keeps the strict conflict throw.

Red-green:

  • "widens a tracked pending range when discovery evidences further indexes for the same tx" fails on the base branch with lastUsed 10 instead of 11, and passes with the merge.
  • "assembles a pending range piecewise when a tx straddles the sync window boundary" drives the actual window-advance loop: a tx with tags on both sides of the window boundary gets stored as [83, 83] by window 1 and widened by window 2. It throws "Conflicting range existing [83, 83] vs new [84, 84]" on fairies-v5, under-reports lastUsed as 83 on the base branch, and passes with the merge (including a follow-up sync that finalizes the widened entry cleanly).

Store-level tests pin the union semantics: a sub-range keeps the entry, a range beyond it widens it, an untracked tx still stores.

@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
vezenovm added 4 commits July 13, 2026 15:01
…scovered-tagging-ranges

# Conflicts:
#	yarn-project/pxe/src/storage/tagging_store/sender_tagging_store.ts
#	yarn-project/pxe/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts
@vezenovm vezenovm marked this pull request as ready for review July 13, 2026 20:02
@vezenovm vezenovm merged commit 3772f9c into mv/fix-sender-tag-sync-partial-revert Jul 13, 2026
8 of 10 checks passed
@vezenovm vezenovm deleted the mv/merge-discovered-tagging-ranges branch July 13, 2026 20:02
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant