Skip to content

fix(pxe): cap fresh secret pending tag indexes to the probed window (port #24667) - #24977

Merged
vezenovm merged 2 commits into
port-to-next-stagingfrom
cb/port-24667-to-next
Jul 24, 2026
Merged

fix(pxe): cap fresh secret pending tag indexes to the probed window (port #24667)#24977
vezenovm merged 2 commits into
port-to-next-stagingfrom
cb/port-24667-to-next

Conversation

@AztecBot

Copy link
Copy Markdown
Collaborator

Summary

Port of #24667 to next via port-to-next-staging.

  • Added unfinalizedTaggingIndexesWindowEnd and used it for sender pending bounds plus sender/recipient scan windows.
  • Preserved the current next window length and recipient sync structure while adapting fresh-secret bounds to [0, WINDOW_LEN).

Conflicts resolved

  • constants.ts: kept next's UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN = MAX_PRIVATE_LOGS_PER_TX and added the shared helper.
  • Recipient sync and tests were resolved against the current next implementation, without pulling in source-branch-only constrained probe changes.
  • Sender store tests were adapted to assert exactly WINDOW_LEN fresh pending indexes and rejection at WINDOW_LEN.

Testing

  • JEST_MAX_WORKERS=1 yarn workspace @aztec/pxe test src/storage/tagging_store/sender_tagging_store.test.ts src/tagging/recipient_sync/sync_tagged_private_logs.test.ts passed: 61 tests.
  • yarn build was attempted but this partial checkout is missing generated dependency outputs such as @aztec/l1-artifacts; the failure was in setup dependencies, not the PXE changes.

Created by claudebox · group: slackbot · Slack thread

…24667)

We essentially have an off by one error for the starting finalized index
for a fresh secret.

- With nothing finalized on a secret, the store permitted pending
indexes `0..WINDOW_LEN`, but sender sync only probes `[0, WINDOW_LEN)`
and only advances the window after a finalization.
- A pending tx at index `WINDOW_LEN` from another store sharing the
secret (second PXE, or restored state) was therefore outside the initial
probe, so the next locally picked index could reuse its onchain tag.

Fix: cap fresh secrets at `0..WINDOW_LEN - 1`, the same `WINDOW_LEN`
indexes allowed after any finalization. Every absolute window bound
(sender permit, sender probe, recipient scan) now comes from one helper,
`unfinalizedTaggingIndexesWindowEnd`, which also aligns the recipient's
fresh-secret scan instead of leaving it one index wider than anything a
sender can create.

Behavior change: fresh secrets hit the "tagging window length configured
too low" error at index `WINDOW_LEN`, one index earlier, and the
recipient no longer scans index `WINDOW_LEN` for fresh secrets.

Tests: the updated store and recipient sync tests are red on base and
green with the fix; the existing straddle test pins the sender probe
boundary.

---------

Co-authored-by: AztecBot <tech@aztec-labs.com>
@AztecBot AztecBot added 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. labels Jul 24, 2026
@vezenovm
vezenovm marked this pull request as ready for review July 24, 2026 21:49
@vezenovm
vezenovm merged commit 267d472 into port-to-next-staging Jul 24, 2026
7 of 9 checks passed
@vezenovm
vezenovm deleted the cb/port-24667-to-next branch July 24, 2026 21:50
rangozd pushed a commit to rangozd/aztec-packages that referenced this pull request Aug 5, 2026
BEGIN_COMMIT_OVERRIDE
fix(foundation): always include a result key in json-rpc responses
(AztecProtocol#24840)
fix(pxe): cap fresh secret pending tag indexes to the probed window
(port AztecProtocol#24667) (AztecProtocol#24977)
fix(archiver): resolve L2-to-L1 witness from a single store snapshot
(AztecProtocol#24754)
fix(sequencer): stop signalling already-executed governance payloads
(AztecProtocol#24764)
fix(archiver): clean up removed blocks from raw rows and ownership-check
tx-effect deletes (AztecProtocol#24765)
fix(node): warm KZG trusted setup at startup (AztecProtocol#24775)
feat(prover-node): stop caching checkpoint txs; re-fetch from the pool
for failure upload (A-1216) (AztecProtocol#24983)
fix(sequencer): log tx failure reason at warn when dropping from mempool
(AztecProtocol#25000)
feat(prover-client): stop duplicating broker job inputs/results in
memory (A-1215) (AztecProtocol#24990)
fix(prover-client): don't retain inline job inputs in the facade without
a failed-proof store (A-1517) (AztecProtocol#25027)
END_COMMIT_OVERRIDE
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