Skip to content

feat: merge-train/fairies-v5#24470

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

feat: merge-train/fairies-v5#24470
AztecBot merged 8 commits into
v5-nextfrom
merge-train/fairies-v5

Conversation

@AztecBot

@AztecBot AztecBot commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

BEGIN_COMMIT_OVERRIDE
feat!: remove fallback and signing keys from pxe (#24451)
fix(aztec-nr): support empty notes and events (#24464)
docs: improve upgrades warning (#24462)
feat!: make contract classes dynamic (#24282)
fix(txe): align aztec_avm_returndataSize registry type with Noir u32 (#24480)
fix(wallet-sdk): use derived contract address in registerContract (#24482)
docs: document how to make nested utility calls (#24478)
feat(aztec-nr): add interactive handshake to the handshake registry (#24473)
END_COMMIT_OVERRIDE

nventuro added 3 commits July 2, 2026 17:28
Follow up of #24416.
With this, PXE no longer has access to the message signing key nor the
fallback keys, as should be (since the semantics of those keys require
user approval before usage).

To keep things simple, I removed the option of passing a seed from which
all keys are derived to PXE and made it so the wallet must pass the
privacy keys plus the message signing and fallback public keys. The
wallet _does_ derive these from a seed, but that's a decision the wallet
makes, PXE doesn't force it.
We were accidentally rejecting these but there's not reason not to, and
had inconsistent encode/decode behavior.
The docs don't currently do a good job of explaining to users just how
scared they should be of trying to do an upgrade as of today.
This makes PXE stop trying to track a contract's current class. Instead,
we fetch it on the fly from the node (which we already had to do anyway
to make sure PXE's tracking of it was not out of sync). As a result,
`pxe.updateContract` gets deleted.

I introduced a contract class service, which deals with the interaction
with the node for determining the current class (plus a cache to avoid
repeated roundtrips), and an anchored contract data class for a given
execution. There are some rough edges here (mostly in pxe.ts, which
contains too much inlined code, and in some cases which receive both the
anchored data and the raw store because the anchored data doesn't expose
enough), but it's good enough for now I think. I created multiple follow
up issues to clean some of this up.

With this weird current class management gone, `registerContract` also
became less important, so I simplified it to only take an instance, with
`registerContractClass` taking the artifact. Both must be called.

I also introduced a simpler version of `ContractInstance`
(`ContractInstacePreimage`) which does not contain the current class -
something only the AVM and the node care about - this is what PXE uses
throughout. Once we fork the monorepo I imagine `ContractInstance` would
be deleted on our side.

Most other changes result from these decisions - the effects were quite
far reaching.

---------

Co-authored-by: Nicolas Chamo <nicolas@chamo.com.ar>
@nventuro nventuro requested a review from a team as a code owner July 2, 2026 20:38
nventuro and others added 4 commits July 2, 2026 21:04
…24480)

It was set to Field but was u32. I also adjusted some slightly outdated
comments.
…4482)

## Problem

CI on `merge-train/fairies-v5` is red at the `yarn-project` build step
([ci.aztec-labs.com/1783026321562696](http://ci.aztec-labs.com/1783026321562696)).
The `compile_all` → `yarn tsgo -b --emitDeclarationOnly` typecheck fails
with:

```
wallet-sdk/src/base-wallet/base_wallet.ts(375,36): error TS2339: Property 'address' does not exist on type 'ContractInstancePreimage'.
wallet-sdk/src/base-wallet/base_wallet.ts(377,113): error TS2339: Property 'address' does not exist on type 'ContractInstancePreimage'.
```

These two were the complete set of errors reported by the
(non-fail-fast) tsgo pass.

## Root cause

This is a train-integration break, not a defect in the commit the CI run
is attributed to (#24480, which only touched a TXE registry type). On
the `v5-next` base, `ContractInstancePreimage` was refactored to no
longer store a derived `address` field (address is now computed from the
preimage; the with-address variant is the separate
`ContractInstancePreimageWithAddress`). The fairies train's rewrite of
`BaseWallet.registerContract` still read `instance.address`, which no
longer exists on that type.

## Fix

`PXE.registerContract(instance)` already returns the derived
`AztecAddress` (it computes
`computeContractAddressFromInstance(instance)` internally). Capture and
use that returned address for the account-mismatch assertion instead of
the removed `instance.address` field. This is semantically identical —
the returned value is exactly the address the field used to hold — and
touches only the two failing references.

## Verification

The workspace this fix was prepared in is a bare checkout with no
build/test cache available (no redis/docker) and insufficient free disk
for a from-scratch `bb` + `noir` + TS build, so a full local
`./bootstrap.sh ci-fast` could not be run to completion. The change is
verified by inspection against the type definitions and the
`PXE.registerContract` return contract; CI on this PR will exercise the
real build.


---
*Created by
[claudebox](https://claudebox.work/v2/sessions/8542372f24dbb848) ·
group: `slackbot`*
@nchamo nchamo requested a review from LeilaWang as a code owner July 2, 2026 22:58

@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 added this pull request to the merge queue Jul 3, 2026
@AztecBot

AztecBot commented Jul 3, 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.

Merged via the queue into v5-next with commit 3ea5dee Jul 3, 2026
17 checks passed
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.

4 participants