Skip to content

chore: backport #20893 feat: offchain reception to v4-next#21359

Merged
mverzilli merged 7 commits intobackport-to-v4-next-stagingfrom
claudebox/backport-20893-v4-next
Mar 13, 2026
Merged

chore: backport #20893 feat: offchain reception to v4-next#21359
mverzilli merged 7 commits intobackport-to-v4-next-stagingfrom
claudebox/backport-20893-v4-next

Conversation

@AztecBot
Copy link
Collaborator

Summary

Backport of #20893 (feat: offchain reception) to v4-next.

This adds offchain message reception to Aztec.nr contracts, including:

  • Persistent offchain message inbox via capsules
  • offchain_receive utility function auto-generated by the Aztec macro
  • offchain::sync_inbox for processing messages during sync_state
  • New utilityResolveMessageContexts oracle method
  • End-to-end test for offchain payments

Backport details

Commit 1: Raw cherry-pick with conflict markers (for reviewer visibility)
Commit 2: Conflict resolution — kept v4-next's utility-prefixed oracle naming convention while integrating new offchain methods
Commit 3: Updated ORACLE_INTERFACE_HASH for the new oracle method and bumped ORACLE_VERSION from 12 to 13

Conflicts resolved in:

  • docs/netlify.toml — added error code 7 redirect
  • noir-projects/aztec-nr/aztec/src/macros/aztec.nr — integrated AztecConfig, #[varargs], offchain inbox sync
  • noir-projects/aztec-nr/aztec/src/messages/discovery/mod.nr — added offchain imports, kept v4-next's generic Env type
  • noir-projects/aztec-nr/aztec/src/oracle/version.nr — bumped to version 13
  • yarn-project/pxe/src/contract_function_simulator/oracle/interfaces.ts — added utilityResolveMessageContexts
  • yarn-project/pxe/src/contract_function_simulator/oracle/oracle.ts — added oracle method
  • yarn-project/pxe/src/contract_function_simulator/oracle/oracle_version_is_checked.test.ts — added messageContextService mock
  • yarn-project/pxe/src/contract_function_simulator/oracle/utility_execution_oracle.ts — added implementation
  • yarn-project/pxe/src/oracle_version.ts — version 13, new hash
  • yarn-project/txe/src/rpc_translator.ts — added RPC translation

ClaudeBox log: https://claudebox.work/s/f28700a7ecac0c5f?run=1

@AztecBot AztecBot added the claudebox Owned by claudebox. it can push to this PR. label Mar 11, 2026
@mverzilli mverzilli marked this pull request as ready for review March 11, 2026 13:36
@mverzilli mverzilli requested a review from nventuro as a code owner March 11, 2026 13:36
@mverzilli mverzilli enabled auto-merge (squash) March 11, 2026 13:36
@ludamad ludamad force-pushed the backport-to-v4-staging branch from 4ff264b to 2d467c9 Compare March 12, 2026 22:29
@AztecBot AztecBot changed the base branch from backport-to-v4-staging to backport-to-v4-next-staging March 13, 2026 10:12
mverzilli and others added 5 commits March 13, 2026 10:22
Cherry-pick of b1ada99 onto v4-next.
This commit contains conflict markers for reviewer visibility.
Resolved conflicts by keeping v4-next naming conventions (utility-prefixed oracle names)
while integrating the new offchain reception oracle methods and macro changes.
Oracle version bumped from 12 to 13.
…te signature

CustomMessageHandler is a next-only feature not present in v4-next.
Removed it from the macro and do_sync_state, keeping only the offchain
inbox sync which is the actual feature being backported.
@AztecBot AztecBot force-pushed the claudebox/backport-20893-v4-next branch from 8ea42c1 to 2727a73 Compare March 13, 2026 10:26
AztecBot and others added 2 commits March 13, 2026 10:38
## Summary

Fixes flaky `deploy_method.test.ts` failure on `merge-train/spartan`
caused by interaction with PR #21279 (priority fee capping).

The test used `GasFees(1n, 0n)` to give the deploy tx higher priority,
but DA gas fees are zero in the test environment. Since priority fees
are now capped by `maxFeesPerGas`, `min(0, 1) = 0` made both txs have
equal priority — the deploy tx was no longer guaranteed to be ordered
first.

Switched to `GasFees(0n, 1n)` so the L2 priority fee is effective (L2
gas fees are non-zero).

Full analysis:
https://gist.github.com/AztecBot/6ac6f06f68d7507d726c596a67ae350b

## Test plan

- All 11 tests in `deploy_method.test.ts` pass locally (ran twice)

ClaudeBox log: https://claudebox.work/s/e9857814f97604f8?run=3
@AztecBot
Copy link
Collaborator Author

Flakey Tests

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

\033FLAKED\033 (8;;http://ci.aztec-labs.com/1c10278fc967870f�1c10278fc967870f8;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_epochs/epochs_mbps.parallel.test.ts "builds multiple blocks per slot with transactions anchored to checkpointed block" (178s) (code: 0) group:e2e-p2p-epoch-flakes

@mverzilli mverzilli merged commit f127743 into backport-to-v4-next-staging Mar 13, 2026
9 checks passed
@mverzilli mverzilli deleted the claudebox/backport-20893-v4-next branch March 13, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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