fix(pxe): cap event filter toBlock to last synced block#22573
Merged
nchamo merged 1 commit intomerge-train/fairiesfrom Apr 15, 2026
Merged
fix(pxe): cap event filter toBlock to last synced block#22573nchamo merged 1 commit intomerge-train/fairiesfrom
nchamo merged 1 commit intomerge-train/fairiesfrom
Conversation
Thunkar
approved these changes
Apr 15, 2026
AztecBot
pushed a commit
that referenced
this pull request
Apr 15, 2026
Collaborator
|
✅ Successfully backported to backport-to-v4-next-staging #22580. |
Thunkar
added a commit
that referenced
this pull request
Apr 17, 2026
BEGIN_COMMIT_OVERRIDE fix(pxe): cap event filter toBlock to last synced block (#22573) fix(pxe): round tx expiration timestamp to reduce precision (#22577) fix: eliminate anvil watcher warp race and false success logs (#22584) refactor: aztec new and init creating 2 crates (#20681) test: aztec new scaffold works (#20711) feat(cli): warning if contract crate has tests (#20723) feat(cli): auto-recompiling when aztec test is run (#20729) feat: aztec new supporting multiple contract crates (#21007) feat: asserts that aztec dep version matches cli (#21245) chore: backport aztec CLI improvements to v4-next (#22587) feat: check noir release has nargo binaries before releasing (#22551) chore: cache chainInfo in embeddedwallet (#22592) fix: wrap external getCapsule in transactionAsync (#22595) fix(pxe): throw clear error for invalid comparator in pick_notes (#22585) refactor(aztec-nr): rename conversion fns to encode_/decode_ naming (#22576) feat: infrastructure for testing `[new_contract_artfiacts, old_aztec_stack]` (#22593) chore: fix unnecessary and inconsistent side-effect counter increments (#22245) fix: update FaceID wallet redirects and strip anchors in redirect validation (#22505) docs: add getting started on testnet guide (#22366) docs: add getting started on testnet guide (backport #22366) (#22619) feat(aztec-nr): new BoundedVec emit private log APIs (#22064) END_COMMIT_OVERRIDE
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.
Problem
PrivateEventFilterValidatordefaultstoBlocktolastBlock + 1when omitted, but when explicitly provided it was not capped against the synced range. A caller passingtoBlock = Number.MAX_SAFE_INTEGER(a common "give me everything" idiom) would silently receive only the events in the synced portion of the chain and believe they had complete coverage up to the requested block.This was surfaced by an AI-assisted audit pass.
Fix
Warn and cap
toBlocktolastBlock + 1when it exceeds the synced range. IffromBlockis already past the synced tip, leave the filter unchanged and emit a warning — the store returns an empty result, matching reality.Chose warn+cap over throw so callers don't need to query the last synced block before every request (which would also be unreliable since the block can advance between the two calls).
Fixes https://github.com/AztecProtocol/aztec-claude/issues/322