feat: merge-train/fairies#23680
Merged
Merged
Conversation
## 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.
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.
…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/1780061823709173 → http://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>
…rn for sender override (#23619)
Demotes multi_call_entrypoint from protocol contract. Stacked on #23217.
Shifts remaining protocol-contract addresses to consecutive values 1-3 and reduces MAX_PROTOCOL_CONTRACTS to 3. Stacked on #23197.
…#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.
Collaborator
Author
|
🤖 Auto-merge enabled after 4 hours of inactivity. This PR will be merged automatically once all checks pass. |
Collaborator
Author
Flakey Tests🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
Collaborator
Author
|
🤖 Auto-merge enabled after 4 hours of inactivity. This PR will be merged automatically once all checks pass. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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