chore: Accumulated backports to v4-next#21995
Merged
Merged
Conversation
## Summary Backport of #21533 (feat!: scoped capsules) to v4-next. The automatic cherry-pick failed due to conflicts in 7 files. This PR preserves the full cherry-pick history: 1. **Cherry-pick with conflicts** — raw cherry-pick of `3029216084` with conflict markers committed as-is 2. **Conflict resolution** — resolved all 7 conflicted files: - `docs/docs-developers/docs/resources/migration_notes.md` — added new migration notes under TBD - `noir-projects/aztec-nr/aztec/src/macros/aztec.nr` — took PR's `$offchain_inbox_sync_option` macro variable + `scope` param - `noir-projects/aztec-nr/aztec/src/messages/discovery/mod.nr` — added `scope` param to `get_private_logs` call - `yarn-project/pxe/src/contract_function_simulator/noir-structs/message_tx_context.ts` — accepted deletion (PR removes this file) - `yarn-project/pxe/src/contract_function_simulator/oracle/utility_execution.test.ts` — renamed method + added scope param - `yarn-project/pxe/src/logs/log_service.ts` — took PR's simplified single-recipient approach, moved deduplication into `#getSecretsForSenders` - `yarn-project/pxe/src/oracle_version.ts` — took PR's oracle interface hash 3. **Build fixes** — added missing `offchain_inbox_sync_option` variable definition and updated `generate_sync_state` function signature in `aztec.nr` ClaudeBox log: https://claudebox.work/s/358dd3e35e1d8542?run=1
…tion (#21997) ## Summary In `SubProtocolRateLimiter.allow()`, the global rate limiter was checked first. `GCRARateLimiter.allow()` advances its virtual scheduling time (VST) as a side effect whenever it returns `true`, so a request that passed the global check but failed the per-peer check would silently consume a global quota token. A single spamming peer could therefore exhaust the global rate limit, starving all other peers on that sub-protocol. Fix: check the per-peer limit first. A peer that exceeds its individual quota is rejected immediately, without touching the shared global bucket. Fixes [A-758](https://linear.app/aztec-labs/issue/A-758) Made with [Cursor](https://cursor.com)
This was referenced Mar 25, 2026
Cherry-pick of b0090ff with conflict markers preserved for review.
Resolved conflicts in oracle names: - aztec_utl_resolveMessageContexts → aztec_utl_getMessageContextsByTxHash - Bumped ORACLE_VERSION to 21 (both Noir and TS) - ORACLE_INTERFACE_HASH placeholder to be computed
Updated hash to match new oracle interface after rename. Bumped ORACLE_VERSION in both Noir and TypeScript.
Cherry-pick of 1c74bf6 with conflicts in yarn-project/pxe/src/oracle_version.ts
The oracle interface hash differs between next and v4-next due to different Oracle class signatures. Regenerated the hash for v4-next after cherry-pick.
The cherry-pick of PR #22020 modified domain separators in constants.nr but the generated files (constants.gen.ts, aztec_constants.hpp, constants_gen.pil) were not regenerated. Run remake-constants to sync.
This reverts commit e7f94df.
These are not allowed elsewhere, so we just add this early catch to prevent getting weirder errors down the stack.
The reorg simulation test is intermittently failing. Added to flake patterns with Martin as owner.
…ckport] (#22025) ## Summary Backport of #22020 to v4-next. The `getSharedSecret` oracle now app-silos the shared secret by hashing it with the calling contract's address, preventing cross-contract decryption attacks. Key derivation uses new domain separators (`DOM_SEP__APP_SILOED_ECDH_SHARED_SECRET`, `DOM_SEP__ECDH_SUBKEY`, `DOM_SEP__ECDH_FIELD_MASK`). ## Cherry-pick conflicts Only one conflict in `yarn-project/pxe/src/oracle_version.ts` — the oracle interface hash differs between `next` and `v4-next` because the Oracle class has diverged. Regenerated the hash for the v4-next Oracle interface. ## Commits 1. **Cherry-pick with conflicts** — raw cherry-pick of 1c74bf6 with conflict markers 2. **Conflict resolution** — resolved hash conflict in oracle_version.ts 3. **Build fix** — regenerated oracle interface hash for v4-next (`09ca7d52...`) ClaudeBox log: https://claudebox.work/s/c95bc78416dda66e?run=1
Cherry-pick of 52a0af8 with conflicts in: - yarn-project/aztec/scripts/aztec.sh
Kept v4-next base (no compile step) while applying the log filter rename from contract_log to contract.
Merged latest target branch which includes PR #22025 (app-silo getSharedSecret). Combined oracle interface now includes both renames and new oracle. Recomputed ORACLE_INTERFACE_HASH and bumped ORACLE_VERSION to 22.
Collaborator
Author
Flakey Tests🤖 says: This CI run detected 2 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
Resolved conflicts in 3 files: - benchmarking_contract: took incoming imports and new benchmark functions - test_contract: took incoming constants (PRIVATE_LOG_CIPHERTEXT_LEN, MAX_PUBLIC_LOG_SIZE_IN_FIELDS) and new emit_full_size_public_log function - constants.gen.ts: kept both SILOED_NULLIFIER (HEAD) and new log tag domain separators (incoming)
nchamo
approved these changes
Mar 26, 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.
BEGIN_COMMIT_OVERRIDE
feat!: scoped capsules (backport #21533) (#21986)
feat(aztec-nr): add initialization check to utility functions (#21751)
refactor(aztec-nr): remove storage from init_test_contract (#21996)
fix(p2p): check peer rate limit before global to prevent quota starvation (#21997)
chore: remove claude file (#22012)
fix: disallow infinite pubkeys (#22026)
END_COMMIT_OVERRIDE