Skip to content

feat: merge-train/fairies-v5 - #24580

Merged
AztecBot merged 7 commits into
v5-nextfrom
merge-train/fairies-v5
Jul 8, 2026
Merged

feat: merge-train/fairies-v5#24580
AztecBot merged 7 commits into
v5-nextfrom
merge-train/fairies-v5

Conversation

@AztecBot

@AztecBot AztecBot commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

BEGIN_COMMIT_OVERRIDE
fix: preload txe with protocol contracts (#24574)
test(e2e): onchain message delivery harness (#24373)
feat(pxe): recipient-side interactive handshake registration (#24514)
feat(aztec-nr): sender-side support for interactive handshakes (#24522)
test(txe): struct support in oracle serialization roundtrip tests (#24588)
refactor(aztec-nr): drop unused HandshakeNote fields (#24595)
END_COMMIT_OVERRIDE

vezenovm and others added 3 commits July 7, 2026 09:41
Fixes
[F-701](https://linear.app/aztec-labs/issue/F-701/e2e-unconstrained-delivery-via-non-interactive-handshake)
Fixes
[F-768](https://linear.app/aztec-labs/issue/F-768/e2e-arbitrary-secret)

Cross-PXE harness for onchain private delivery over two axes: delivery
**mode** x tagging-secret **source**. Lives in
`yarn-project/end-to-end/src/automine/delivery/`, split into
`onchain.test.ts` (the generic strategy x mode harness) and
`constrained.test.ts` (single-PXE constrained sequencing + the soundness
boundary), both wired into `bootstrap.sh`.

`buildMessageDeliveryTest({ strategy, mode, senderHook,
recipientRegistration? })`. PXE A sends, isolated PXE B discovers from
on-chain logs + the HandshakeRegistry. `senderHook` is required: every
cell states its source explicitly rather than leaning on the PXE
default. `mode` can split per message type (`{ events, notes }`) to
exercise cross-mode reuse.

- handshake x constrained: green
- handshake x unconstrained: green
- arbitrary secret x unconstrained (recipient registers it): green
- address-derived x unconstrained (recipient registers the sender):
green
- cross-mode, constrained bootstrap then unconstrained reuse on one
handshake: green
- cross-mode, unconstrained bootstrap then constrained reuse on one
handshake: green (the stricter direction: the constrained reuse proves
the predecessor sequence nullifier and validates the reused secret
against the registry at index 0, where the tolerant unconstrained scan
in the forward cell would absorb it silently)

These green cells are not unit-coverable: discovery is PXE-side
scanning, so only a cross-PXE harness proves a message reached an
isolated wallet.

`constrained.test.ts` keeps the single-PXE constrained sequencing suite
(handshake reuse, concurrency/batching) plus `rejects unsound sources`.

Renames `e2e_constrained_delivery` -> the `automine/delivery` split
above, and the `ConstrainedDeliveryTest` contract ->
`OnchainDeliveryTest`. Adds `emit_*_unconstrained` test-contract fns +
`TestWallet.registerTaggingSecretSource` (passthrough to
`PXE.registerTaggingSecretSource` for any non-sender source, replacing
the narrower `registerArbitrarySecret`).

---------

Co-authored-by: AztecBot <tech@aztec-labs.com>
Co-authored-by: Nicolas Chamo <nicolas@chamo.com.ar>
@nchamo
nchamo requested a review from nventuro as a code owner July 7, 2026 16:53

@ludamad ludamad left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Auto-approved

@AztecBot

AztecBot commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

🤖 Auto-merge enabled after 4 hours of inactivity. This PR will be merged automatically once all checks pass.

@AztecBot
AztecBot added this pull request to the merge queue Jul 8, 2026
Merged via the queue into v5-next with commit a455b9a Jul 8, 2026
17 checks passed
rangozd pushed a commit to rangozd/aztec-packages that referenced this pull request Aug 5, 2026
RAW cherry-pick of public merge a455b9a (-m 1). 16 files conflicted (aztec-nr messages/delivery
restructure, oracle_testing macros, handshake contract, TXE resolver, standard artifacts) — all
resolved by taking the source (newest v5 fairies state, superseding the stack's earlier fairies
versions), recorded in this pick. Standard artifacts interim; regen follows.
rangozd pushed a commit to rangozd/aztec-packages that referenced this pull request Aug 5, 2026
…iries contracts to the v5 tip

AztecProtocol#24580 builds on v5 refactors that arrived via UNLABELLED v5 trains this driver never received
(notably AztecProtocol#24369 'reimplement partial notes on FactStore' — deletes
messages/{discovery/partial_notes.nr,processing/message_context.nr}, adds partial_notes/{fsm,mod}.nr
and the ResolvedTx processing shape — and AztecProtocol#24508 'keep handshake secrets internal to
TagSecretSource'). Without them the stack's aztec-nr/contract surfaces were an incoherent mix of
eras (obtain_secrets/MessageContext/get_all_discovered_handshakes resolution failures).

Aligned byte-identically to the v5 tip a455b9a:
- noir-projects/aztec-nr (EXCEPT context/private_context.nr + context/inputs/private_context_inputs.nr,
  which keep next-only tx_request_salt; verify: git diff a455b9a -- noir-projects/aztec-nr)
- contracts/standard/handshake_registry_contract (whole dir)
- contracts/test/{onchain_delivery_test_contract,custom_message_contract}

aztec-nr + all noir-contracts compile clean.
rangozd pushed a commit to rangozd/aztec-packages that referenced this pull request Aug 5, 2026
… regen + next-boundary re-grafts

Standard-contracts fixed-point regen on the final tree (next's bb, VK 4832; recipe: pin-standard-build
+ generate:data until no drift, 3 iterations).

Next-boundary re-grafts forced by the v5-tip alignment (each restores an established next-only
adaptation):
- contract_function_simulator.ts / txe_oracle_top_level_context.ts: pass next-only txRequestSalt to
  PrivateExecutionOracle (request.salt / Fr.ZERO as before the restack).
- contract_function_simulator.ts: PrivateExecutionStep.kind = CircuitKind.App (next's bb.js type).
- txe_oracle_top_level_context.ts: CppPublicTxSimulator -> PublicTxSimulator (next superseded the
  cpp-variant class; same decision as block AztecProtocol#24223).
- sequencer-publisher.test.ts: v5 prune-suite mock gains next's L1TxState field; restored a closing
  brace lost in the base-sync union.
- oracle_version.ts: ORACLE_VERSION_MINOR 4->5 (matches v5 noir side) + recorded interface hash for
  this tree's oracle surface (v5 interface + next-only salt), per the gate's instruction.
rangozd pushed a commit to rangozd/aztec-packages that referenced this pull request Aug 5, 2026
Block AztecProtocol#24580's mechanical next-boundary re-graft (99cbb5d) pulled the PXE
kernelless-simulation files from the v5 tip, which predates the always-inject
protocol-nullifier scheme introduced by private#487 (4b4245f circuits,
0d643f4 PXE note nonces, d98ceba kernelless sim). That reverted
ExecutionNoteCache and generateSimulatedProvingResult to the old conditional
scheme, while the Noir kernels (with-kernels path) still always inject the
protocol nullifier. The kernelless gas estimate therefore under-counted the
protocol nullifier's DA gas (e.g. 128 vs 192) and note-hash nonces used the
wrong generator, producing the e2e_kernelless_simulation mismatch and the
related "hinted siloed note hash does not match nullified note hash" failures.

Re-apply next's always-inject scheme in the kernelless path:
- ExecutionNoteCache: the nonce generator and the tx first nullifier are always
  the protocol nullifier, and getAllNullifiers always prepends it (restores
  next's file verbatim; drops the vestigial usedProtocolNullifierForNonces flag
  and finish()).
- generateSimulatedProvingResult: unconditionally unshift the protocol nullifier
  as the first non-revertible nullifier, mirroring the init kernel.
- Drop the now-removed noteCache.finish() calls in the PXE simulator and the two
  TXE callers.

Reproduces private#487 / d98ceba, lost in the v5 forward-port.
rangozd pushed a commit to rangozd/aztec-packages that referenced this pull request Aug 5, 2026
… gas metering

Block AztecProtocol#24580's mechanical re-graft (99cbb5d) pulled
contract_function_simulator.ts from the v5 tip, which predates next's
5ca883c (add fixed gas cost for updating fee payer balance to
private-only tx). The Noir private-kernel gas meter (gas_meter.nr) charges
PUBLIC_DATA_WRITE_LENGTH DA fields for the fee-payer balance write on
private-only txs, so kernelless estimates under-counted DA gas by 64 on
every private-only tx (kernelless_simulation 128 vs 192 squashing case,
768 vs 832 account deployments; same drift behind the bot/amm/sponsored
"gas used exceeds the gas limits" failures for private-only txs).

Restore the isPrivateOnlyTx block in meterGasUsed to match next and the
kernels. Complements d526c2d (protocol nullifier injection), which fixed
the other half of the kernelless DA drift.

Verified locally: kernelless_simulation 7/7 (was 4/7),
private_payments.parallel 8/8, txe unit tests 17/17.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants