Skip to content

chore: Accumulated backports to v4-next#21995

Merged
nchamo merged 27 commits into
v4-nextfrom
backport-to-v4-next-staging
Mar 26, 2026
Merged

chore: Accumulated backports to v4-next#21995
nchamo merged 27 commits into
v4-nextfrom
backport-to-v4-next-staging

Conversation

@AztecBot

@AztecBot AztecBot commented Mar 25, 2026

Copy link
Copy Markdown
Collaborator

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

AztecBot and others added 2 commits March 25, 2026 13:38
## 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)
mverzilli and others added 9 commits March 25, 2026 19:39
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.
These are not allowed elsewhere, so we just add this early catch to
prevent getting weirder errors down the stack.
AztecBot and others added 4 commits March 25, 2026 21:21
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
@nventuro nventuro requested a review from LeilaWang as a code owner March 25, 2026 22:26
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.
AztecBot and others added 4 commits March 25, 2026 22:28
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.
@AztecBot

Copy link
Copy Markdown
Collaborator Author

Flakey Tests

🤖 says: This CI run detected 2 tests that failed, but were tolerated due to a .test_patterns.yml entry.

\033FLAKED\033 (8;;http://ci.aztec-labs.com/b6b1af51815cd88c�b6b1af51815cd88c8;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_epochs/epochs_mbps.parallel.test.ts "deploys a contract and calls it in separate blocks within a slot" (190s) (code: 0) group:e2e-p2p-epoch-flakes
\033FLAKED\033 (8;;http://ci.aztec-labs.com/d81dd95f7bf88d1f�d81dd95f7bf88d1f8;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_epochs/epochs_proof_fails.parallel.test.ts "does not allow submitting proof after epoch end" (222s) (code: 0) group:e2e-p2p-epoch-flakes

nchamo and others added 3 commits March 26, 2026 00:19
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 nchamo merged commit f0e431b into v4-next Mar 26, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants