Skip to content

Update all examples to Aztec v5.0.0-rc.1#38

Merged
critesjosh merged 7 commits into
nextfrom
update-examples-to-v5.0.0-rc.1
Jun 22, 2026
Merged

Update all examples to Aztec v5.0.0-rc.1#38
critesjosh merged 7 commits into
nextfrom
update-examples-to-v5.0.0-rc.1

Conversation

@critesjosh

@critesjosh critesjosh commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Updates every example in the repo from Aztec v4.3.0 to v5.0.0-rc.1, migrating both Noir and TypeScript to the v5 APIs and following the aztec-kit conventions where relevant. All five examples build/run on v5 and are covered by CI.

Scope

Example Noir TS CI
custom-note ✅ compiles new (compile)
note-send-proof ✅ circuits + uint-note + contract ✅ scripts + vite build
prediction-market ✅ compiles + codegen ✅ typechecks
recursive_verification ✅ circuit + contract compile ✅ typechecks; data.json regenerated
test-wallet-webapp vite build

Version bumps

  • Nargo.toml git deps: tag = "v4.3.0"v5.0.0-rc.1 (aztec-nr, uint-note, balance-set, bb_proof_verification)
  • package.json @aztec/*: 4.3.05.0.0-rc.1; package names reconciled to actual imports (e.g. @aztec/constants, @aztec/entrypoints added where used)
  • Docs/CI: aztec-up 5.0.0-rc.1; bundled nargo 1.0.0-beta.211.0.0-beta.22; CI AZTEC_VERSION: 5.0.0-rc.1

Key API migrations

Noir (Aztec.nr)

  • MessageDelivery.XMessageDelivery::x(); messages::message_deliverymessages::delivery
  • context.push_nullifierpush_nullifier_unsafe
  • uint-note local copy ported to v5 (npk_m_hash, compute_note_hash/compute_note_nullifier, DOM_SEP__PARTIAL_NOTE_COMMITMENT)

TypeScript (Aztec.js)

  • Prefunded test accounts are now initializerless: createSchnorrAccountcreateSchnorrInitializerlessAccount
  • DeployMethod address-affecting options moved to construction-time bag; .send() returns { contract, receipt, instance }
  • Gas: estimatedGas result → gasUsed via { includeMetadata: true }
  • recursive_verification: data.json regenerated (UltraHonk proof 500458 fields)

Removed: account-contract example

The repo previously had a custom password-based account contract example. While migrating it I found it can't be exercised on v5 with the standard tooling: the EmbeddedWallet resolves a tx's from to a built-in schnorr/ecdsa account by type and offers no hook to register a custom account, so the example could only ever deploy — never actually authorize/send a tx through its entrypoint. (This isn't specific to the password design — it applies to any custom account type, and the aztec-kit reference only ever sends from schnorr/ecdsa accounts.) Rather than ship a deploy-only example that misleads — or maintain fragile low-level PXE plumbing — the example was removed along with its CI workflow and doc references.

CI coverage

Added custom-note-tests.yml (contract-only compile) so the one remaining example that lacked CI is now covered. All five examples are in CI.

Docs / tooling cleanup

  • Root README.md + CLAUDE.md: removed the stale starter-token references; documented all current examples; corrected the project structure, CI list, and dependency snippet.
  • Replaced dead aztec start --sandbox with aztec start --local-network (the --sandbox flag no longer exists in v5) across READMEs and helper scripts.
  • Standardized on yarn (the repo convention): converted the lone bun-based prediction-market CI/scripts to yarn (adding the --experimental-vm-modules flag its jest setup requires, matching note-send-proof); fixed bun/npm drift in recursive_verification/note-send-proof docs and scripts; refreshed the stale recursive_verification/debug.sh.
  • Removed the empty placeholder folders offchain-account-ownership/ and streaming-payments/ (each held only a .gitignore) and gitignored the .playwright-mcp/ tool-artifact dir.

Verification

Every Noir contract/circuit compiles under the installed 5.0.0-rc.1 toolchain and all TypeScript typechecks/builds. The integration-test workflows run against a live local network. All five CI workflows are green on the latest commit.

Bump every example from v4.3.0 to v5.0.0-rc.1 and migrate code to the v5
APIs, following the aztec-kit (release/v5.0.0-rc.1) conventions where relevant.

Version bumps:
- Nargo.toml git deps: tag v4.3.0 -> v5.0.0-rc.1 (aztec-nr, uint-note,
  balance-set, bb_proof_verification)
- package.json @aztec/* deps: 4.3.0 -> 5.0.0-rc.1; reconciled package names
  to actual imports (added @aztec/constants, @aztec/entrypoints where used)
- docs/CI: aztec-up 5.0.0-rc.1, bundled nargo 1.0.0-beta.21 -> 1.0.0-beta.22

Noir (Aztec.nr) migration:
- MessageDelivery.X -> MessageDelivery::x(); messages::message_delivery ->
  messages::delivery
- context.push_nullifier -> push_nullifier_unsafe
- uint-note local copy ported to v5 (npk_m_hash, compute_note_hash/nullifier
  helpers, DOM_SEP__PARTIAL_NOTE_COMMITMENT)

TypeScript (Aztec.js) migration:
- prefunded test accounts are now initializerless:
  createSchnorrAccount -> createSchnorrInitializerlessAccount
- DeployMethod address opts moved to construction-time options bag;
  .send() returns { contract, receipt, instance }
- gas: estimatedGas result -> gasUsed with { includeMetadata: true }
- account-contract: AccountContract/Account interface overhaul
  (getAccount, getImmutablesHash, wrapExecutionPayload, chainInfo)
- recursive_verification: regenerated data.json (proof 500 -> 458 fields)

Verified: every Noir contract/circuit compiles under the installed
v5.0.0-rc.1 toolchain; all TypeScript typechecks/builds. Live-network
integration tests (require aztec start --local-network) are exercised by CI.
- root README.md + CLAUDE.md: drop removed starter-token; document all
  current examples; fix project structure, CI list, dependency snippet,
  and stale proof field count (508 -> 458)
- replace dead `aztec start --sandbox` with `aztec start --local-network`
  (the flag was removed in v5) across READMEs and run-tests.sh scripts
- standardize on yarn: convert prediction-market CI/scripts from bun to
  yarn (add --experimental-vm-modules flag jest needs, matching
  note-send-proof); fix bun/npm drift in recursive_verification and
  note-send-proof docs/scripts; refresh stale recursive_verification/debug.sh
Running the example end-to-end surfaced two real (pre-existing) bugs that
compile/typecheck could not catch — and that no CI covers for this example:

1. The script registered an AccountManager with a fresh random secret/salt,
   so the "registered" account never matched the deployed contract.
2. The account cannot self-deploy: its entrypoint authorizes a tx by reading
   the `hashed_password` PublicImmutable, which is only written by its own
   constructor's enqueued public call — unavailable on its first tx. The prior
   NO_FROM / DeployMethod path also failed (`Expected a single call, got 4`).

Deploy the account as a regular contract (Contract.deploy with publicKeys +
universalDeploy) from a prefunded local-network test account that pays the fee,
mirroring the working prediction-market deploy. Verified end-to-end against a
local v5 network: the contract deploys and the registered account address
matches the deployed instance.

Also re-add @aztec/accounts (needed for getInitialTestAccountsData) and drop
@aztec/constants / @aztec/noir-contracts.js (no longer used).
These two examples had no CI, which is exactly why the account-contract
runtime breakage went unnoticed (it compiled + typechecked but never ran).

- account-contract-tests.yml: install Aztec, start a local network, compile
  the contract, and run the deploy script (`yarn deploy`) as a smoke test.
- custom-note-tests.yml: contract-only, so it just compiles (no network).

Also add `ccc`/`deploy` scripts to account-contract/package.json and list the
two new workflows in CLAUDE.md.
Address codex review of the new account-contract CI:
- deploy script now throws (non-zero exit) if the deployed address does not
  match the AccountManager-registered address, instead of just logging it —
  so the smoke test actually fails CI when the invariant breaks.
- workflow fails fast if the local network never becomes ready.
- use `yarn install --frozen-lockfile` (verified in sync) to catch lock drift.
offchain-account-ownership/ and streaming-payments/ contained only a
.gitignore (no example content). Remove them and their references in the
root README.md and CLAUDE.md project structure. Also gitignore the
.playwright-mcp/ tool-artifact directory so it stays out of the repo.
@critesjosh critesjosh force-pushed the update-examples-to-v5.0.0-rc.1 branch from 57320f4 to 78b1577 Compare June 22, 2026 19:17
A custom account contract can't be transacted through with the current
tooling: the standard EmbeddedWallet resolves a tx's `from` to a built-in
schnorr/ecdsa account by type and has no hook to register a custom account,
so the example could only ever deploy — never actually be used. Rather than
ship a deploy-only example that misleads (or maintain fragile low-level PXE
plumbing), remove it along with its CI workflow and doc references.

The repo now covers 5 working examples, all green in CI.
@critesjosh critesjosh merged commit 434cafd into next Jun 22, 2026
5 checks passed
@critesjosh critesjosh deleted the update-examples-to-v5.0.0-rc.1 branch June 22, 2026 20:17
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.

1 participant