Skip to content

feat: merge-train/fairies#23680

Merged
AztecBot merged 17 commits into
nextfrom
merge-train/fairies
May 30, 2026
Merged

feat: merge-train/fairies#23680
AztecBot merged 17 commits into
nextfrom
merge-train/fairies

Conversation

@AztecBot
Copy link
Copy Markdown
Collaborator

@AztecBot AztecBot commented May 29, 2026

BEGIN_COMMIT_OVERRIDE
docs: restore two-crate testing guidance + /errors/1 anchor (#23632)
feat: txe speedup (#23578)
fix(ci): don't serve cached results for disabled-cache test commands (#23658)
fix(txe): reconcile txe speedup with auth-registry/public-checks demotion (#23700)
feat(aztec-nr)!: remove set_sender_for_tags oracle, use builder pattern for sender override (#23619)
feat!: demote multi_call_entrypoint to non-protocol contract (#23197)
feat(pxe): add class IDs and view context to auth request (#23633)
fix: bb format.sh re-staging inside worktrees (#23711)
feat!: shift remaining protocol-contract addresses to 1-3 (#23218)
feat(standard-contracts): show expected-vs-actual diff in drift error (#23710)
feat(standard-contracts): add v4-style pin-build mechanism for standard contracts (#23262)
END_COMMIT_OVERRIDE

## What

Fixes the orphaned `/errors/1` anchor and the stale single-crate docs,
in **both** the source (`next`/v5) docs and the **live v4.3.0**
versioned snapshot.

Source docs (`docs-developers/`, become live when v5 docs are cut):
1. `aztec-nr/testing_contracts.md` — adds `## Keep tests in the test
crate` (restores the `#keep-tests-in-the-test-crate` anchor the
`/errors/1` redirect targets), on top of #23617's two-crate `## Basic
test structure`.
2. `aztec-nr/index.md` — "Flow" step single-crate → two-crate.
3. `tutorials/contract_tutorials/counter_contract.md` — prose
single-crate → two-crate (matched its own tree).

Live v4.3.0 versioned snapshot
(`developer_versioned_docs/version-v4.3.0/`, what docs.aztec.network
serves today):
4. `aztec-nr/testing_contracts.md` — brought in line with the corrected
source (two-crate + the anchor). This is the fix that makes `/errors/1`
resolve on the live site.
5. `aztec-nr/index.md` — single-crate → two-crate (preserving the
resolved `tag="v4.3.0"`).
(`contract_structure.md` and `counter_contract.md` in the v4.3.0
snapshot were already two-crate.)

## Why

`v4.3.0` ships the two-crate `aztec new` and the `aztec compile` "tests
in contract crate" warning (`checkNoTestsInContracts` in `compile.ts` at
tag `v4.3.0`), which links to `/errors/1` →
`…/testing_contracts#keep-tests-in-the-test-crate`. That anchor did not
exist, and the v4.3.0 testing/index pages still described single-crate
(stale text frozen by `c93f23b3` before #23617 fixed `next`). v4.3.0 is
the configured mainnet+testnet docs version and the only versioned dir,
so this is the live default. With no v4.4.0 release, the snapshot won't
be refreshed from source before v5, so it is patched directly here.

## Base

`merge-train/fairies` (where #23617 already restored the two-crate `##
Basic test structure`). A later workflow merges the train into `next`;
the `docs/` subrepo then syncs to `AztecProtocol/docs` and deploys.

## Follow-up (not in this PR)

Migration notes have no `## 4.3.0` section and the two-crate change is
still filed under `## Unreleased (v5)`. That mislabeling is why the
v4.3.0 snapshot was cut with single-crate text. Worth adding a `##
4.3.0` note, but that's a separate change.
AztecBot and others added 4 commits May 29, 2026 12:26
Adds:

* A session pool based on worker threads
* Session cleanup based on socket close (confirmed consistent nargo
behavior, but workaround until we have true signaling for test
lifecycle)
* Bundling to reduce worker thread spawn time + many, many stubs to try
and get the bundle size under control
* WASM based bb backend. Surprisingly, faster under contention since the
workers don't have to spawn additional processes
* A true "ephemeral" lmdb-v2 backed store + nws, which just lazily
commits to disk and is never expected to survive restarts

---------

Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
…23658)

`run_test_cmd`'s per-command result cache keyed on the command string
alone and never inspected the `disabled-cache` marker. Commands tagged
`disabled-cache` (e.g. all TXE tests on `merge-train/fairies`, per
`noir-projects/noir-contracts/bootstrap.sh::test_cmds`) were therefore
served stale cached passes and skipped — even though the sibling layer
`filter_cached_test_cmd` already honors the marker.

Consequence: aztec-nr-level changes such as contract demotions merged
without their TXE tests ever running. See the test-engine log
http://ci.aztec-labs.com/b893262917583a30 for the auth-registry demotion
PR #23106, which logged 709 SKIPPED / 0 executed.

Fix: bypass the result cache for `disabled-cache` commands in
`run_test_cmd`, mirroring `filter_cached_test_cmd`'s marker check. No
behavior change for other commands.
@dbanks12 dbanks12 requested a review from charlielye as a code owner May 29, 2026 14:35
AztecBot and others added 2 commits May 29, 2026 16:02
…tion (#23700)

## Why

CI on `merge-train/fairies` is red after `feat: txe speedup (#23578)`
merged with `next`. The yarn-project compile fails:

```
src/index.ts:43:73 - error TS2322: Type '"AuthRegistry"' is not assignable to type
'"ContractClassRegistry" | "ContractInstanceRegistry" | "FeeJuice" | "MultiCallEntrypoint"'.
```
(log: http://ci.aztec-labs.com/1780061823709173http://ci.aztec-labs.com/bd7e1fc18ebbb263)

This is a semantic merge conflict. #23578 was based on an older `next`
where `AuthRegistry` was a protocol contract. On the train it was
demoted from a protocol contract to a standard contract (#23106), so
`ProtocolContractName` no longer includes it and it is now deployed
per-session in `txe_session.ts`.

## Changes

- **`txe/src/index.ts`** — drop `'AuthRegistry'` from
`TXE_REQUIRED_PROTOCOL_CONTRACTS` (now empty); it is no longer a
protocol contract.
- **`txe/src/dispatcher_pool.ts`** — load the standard auth registry the
same way protocol contracts are loaded: `buildSharedContractStore` now
parses and registers its artifact/instance **once in the main thread, in
parallel**, so every worker clones the result instead of re-parsing the
~1 MB JSON per session.
- **`txe/src/txe_session.ts` +
`txe/src/oracle/txe_oracle_top_level_context.ts`** — session init no
longer calls `getStandardAuthRegistry()` (it imports only the cheap
address-only `/constants`); `deployManyInSingleBlock` is replaced by
`mineDeploymentNullifiers`, which only emits the auth-registry
deployment nullifier into the baseline block (artifact/instance already
come from the cloned shared store). The artifact leaves the worker
startup bundle entirely.
- **`txe/esbuild/plugins/strip_artifact_debug.mjs`** — extend the
existing debug-strip filter to `standard-contracts/artifacts`, so the
auth registry (942 → 103 KB) sheds `debug_symbols`/`file_map` when
bundled, keeping the TXE bundle under its existing size limits (no limit
bumps).

## Verification (local)

Built the upstream chain from the artifact cache and ran the failing
yarn-project compile step:

- `yarn tsgo -b --emitDeclarationOnly` (full-project typecheck) — pass
- `cd txe && yarn build` (tsc + esbuild + size guard) — pass; bundle
12.7 MiB, guard does not trip; auth-registry artifact confirmed absent
from `worker.bundle`
- `format --check` and txe `eslint` — pass

Full `./bootstrap.sh ci` (which runs the entire repo incl. C++/circuit
tests and the TXE test suites) was not run end-to-end: the noir build
toolchain (cargo-binstall) is unavailable on this host, so upstream
components were sourced from the build cache and only the yarn-project
compile — the failing step — was reproduced locally. The TXE test suites
that exercise the auth-registry deployment path should be confirmed by
CI.

---------

Co-authored-by: Gregorio Juliana <gregojquiros@gmail.com>
@nchamo nchamo requested a review from nventuro as a code owner May 29, 2026 16:51
Demotes multi_call_entrypoint from protocol contract.

Stacked on #23217.
@dbanks12 dbanks12 requested a review from just-mitch as a code owner May 29, 2026 21:00
dbanks12 and others added 3 commits May 29, 2026 17:15
…#23710)

When a standard contract's derived address/class data drifts, the build
now reports exactly which consts changed (old → new), so you can read
the new values without rebuilding locally.

### Build-time generator error (`generate_data.ts`)
```
Standard contract addresses have changed. The following generated files were out of date and have been rewritten in-place with the freshly-derived values:
  - ./src/standard_contract_data.ts
  - ../../noir-projects/aztec-nr/aztec/src/standard_addresses.nr
  - ../../noir-projects/noir-contracts/contracts/protocol/aztec_sublib/src/standard_addresses.nr

Changed values (old → new):
  PublicChecks.address: 0x05d900a6ed1b4ad3ff52cbe5f98d9b291b0f35c6dd5c41b1642659344d234bfe → 0x157adf2a48199ba8f417358aa8d728c00ceb83923425694d7c738291b4fc8902
  PublicChecks.classId: 0x022bbd3c085d6a09ec500110852441419c7b1e6dc21a8d459233b72a84d03a1f → 0x11a1123d541845258225c31b116f5d0ebb2d83a020ac173096ea7eb2ece483e9
  PublicChecks.publicBytecodeCommitment: 0x013c4f854a5c87c9daf86c5f9bc07a42c2a061f1d924a5b3564ec7edc8e18cb7 → 0x185edf0f22857537a30a03eeb76f56b2c5b1cd49495294391d74f88ac6528e6b

  ...stale-bytecode note + recovery steps...
```

### Backup jest test
One `expect().toEqual()` per contract (every field, every contract
surfaces — not just the first), plus a `.nr` twins check.
```
● standard_contract_data drift › per-field derivation › AuthRegistry: all derived fields match committed values
    - Expected  - 1
    + Received  + 1
      Object {
    -   "address": "0x01de9d215d1845808cf388d3a88f9066af1e73ec280e979c3b1aec8ba6b149ea",
    +   "address": "0x1ad6c58d49414977725dbde2f5052708ca67548730d98adee2d3833c91348a24",
        "artifactHash": "0x0dd24a86cce5ff4ef33ca14f16359c5a154ce3f1ed91a9570dd5343569f5386f",
        "classId": "0x2cfbdd0ce7cc31b5cc5f4eb8f680e0e245882b2208bd67828e41a8bd24a19292",
        ...
      }

● standard_contract_data drift › committed standard_addresses.nr twins match re-rendered output
    - Expected  - 2
    + Received  + 2
      pub global STANDARD_AUTH_REGISTRY_ADDRESS: AztecAddress = AztecAddress::from_field(
    -     0x1ad6c58d49414977725dbde2f5052708ca67548730d98adee2d3833c91348a24,
    +     0x01de9d215d1845808cf388d3a88f9066af1e73ec280e979c3b1aec8ba6b149ea,
      );
```
…rd contracts (#23262)

Mirrors the protocol-contract pinning mechanism v4 uses
(`pinned-protocol-contracts.tar.gz`), but for standard contracts.

- `noir-contracts/bootstrap.sh` extracts
`pinned-standard-contracts.tar.gz` into `target/` at build time when
present, and skips recompilation of `contracts/standard/*`.
- `noir-contracts/bootstrap.sh pin-standard-build` force-builds the
standard contracts and produces the tarball, intended to be run by a
human at release-branch cut.
- `noir-contracts/standard_contracts.json` lists the artifact names
included in the tarball (mirror of `protocol_contracts.json`).

The tarball is intentionally not committed in this PR. Its absence makes
the extraction block a no-op on `next`; the mechanism activates only
when a release branch (e.g. `v5`) is cut and someone runs
`./bootstrap.sh pin-standard-build` and commits the resulting tarball.
Copy link
Copy Markdown
Collaborator

@ludamad ludamad left a comment

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 May 30, 2026
@AztecBot
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
Copy link
Copy Markdown
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/84c184976c17ee13�84c184976c17ee138;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_epochs/epochs_invalidate_block.parallel.test.ts "proposer invalidates multiple checkpoints" (424s) (code: 0) group:e2e-p2p-epoch-flakes

@AztecBot
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 next with commit 9a9810a May 30, 2026
24 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.

5 participants