Skip to content

fix(txe): reconcile txe speedup with auth-registry/public-checks demotion#23700

Merged
Thunkar merged 6 commits into
merge-train/fairiesfrom
cb/fix-txe-protocol-contract-names
May 29, 2026
Merged

fix(txe): reconcile txe speedup with auth-registry/public-checks demotion#23700
Thunkar merged 6 commits into
merge-train/fairiesfrom
cb/fix-txe-protocol-contract-names

Conversation

@AztecBot
Copy link
Copy Markdown
Collaborator

@AztecBot AztecBot commented May 29, 2026

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.

@AztecBot AztecBot added the claudebox Owned by claudebox. it can push to this PR. label May 29, 2026
@AztecBot AztecBot force-pushed the cb/fix-txe-protocol-contract-names branch from a6f153c to 3f82f56 Compare May 29, 2026 14:39
…tion

AuthRegistry was demoted from a protocol to a standard contract on next, so
TXE_REQUIRED_PROTOCOL_CONTRACTS=['AuthRegistry'] no longer typechecks. Drop it
from the protocol-contract preload.

Load the standard contracts (auth registry, public checks) the same way protocol
contracts are: buildSharedContractStore now parses and registers their artifacts
once in the main thread, in parallel, so every worker clones them instead of
re-parsing the ~1MB JSONs per session. Session init only emits their deployment
nullifiers (mineDeploymentNullifiers) into the baseline block; the artifacts no
longer reach the worker startup bundle.

Extend stripArtifactDebugPlugin to standard-contracts artifacts so the auth
registry and public checks shed debug_symbols/file_map when bundled, keeping the
TXE bundle under its existing size limits.
@AztecBot AztecBot force-pushed the cb/fix-txe-protocol-contract-names branch from 3f82f56 to 9ab597f Compare May 29, 2026 14:57
AuthRegistry was demoted from a protocol to a standard contract on next, so
TXE_REQUIRED_PROTOCOL_CONTRACTS=['AuthRegistry'] no longer typechecks. Drop it
from the protocol-contract preload.

Load the standard auth registry the same way protocol contracts are loaded:
buildSharedContractStore now parses and registers its artifact once in the main
thread, in parallel, so every worker clones it instead of re-parsing the ~1MB
JSON per session. Session init only emits its deployment nullifier
(mineDeploymentNullifiers) into the baseline block; the artifact no longer
reaches the worker startup bundle.

Extend stripArtifactDebugPlugin to standard-contracts artifacts so the auth
registry sheds debug_symbols/file_map when bundled, keeping the TXE bundle under
its existing size limits.
@AztecBot AztecBot force-pushed the cb/fix-txe-protocol-contract-names branch from 9ab597f to 26cf75e Compare May 29, 2026 15:12
@Thunkar Thunkar marked this pull request as ready for review May 29, 2026 15:23
@Thunkar Thunkar self-assigned this May 29, 2026
@Thunkar Thunkar enabled auto-merge (squash) May 29, 2026 15:34
@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/3d90dafba9105f84�3d90dafba9105f848;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_p2p/duplicate_proposal_slash.test.ts (141s) (code: 0) group:e2e-p2p-epoch-flakes

@Thunkar Thunkar merged commit 2030dba into merge-train/fairies May 29, 2026
14 checks passed
@Thunkar Thunkar deleted the cb/fix-txe-protocol-contract-names branch May 29, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants