fix(txe): reconcile txe speedup with auth-registry/public-checks demotion#23700
Merged
Merged
Conversation
a6f153c to
3f82f56
Compare
…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.
3f82f56 to
9ab597f
Compare
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.
9ab597f to
26cf75e
Compare
Thunkar
approved these changes
May 29, 2026
Thunkar
approved these changes
May 29, 2026
Collaborator
Author
Flakey Tests🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
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.
Why
CI on
merge-train/fairiesis red afterfeat: txe speedup (#23578)merged withnext. The yarn-project compile fails:(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
nextwhereAuthRegistrywas a protocol contract. On the train it was demoted from a protocol contract to a standard contract (#23106), soProtocolContractNameno longer includes it and it is now deployed per-session intxe_session.ts.Changes
txe/src/index.ts— drop'AuthRegistry'fromTXE_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:buildSharedContractStorenow 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 callsgetStandardAuthRegistry()(it imports only the cheap address-only/constants);deployManyInSingleBlockis replaced bymineDeploymentNullifiers, 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 tostandard-contracts/artifacts, so the auth registry (942 → 103 KB) shedsdebug_symbols/file_mapwhen 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) — passcd txe && yarn build(tsc + esbuild + size guard) — pass; bundle 12.7 MiB, guard does not trip; auth-registry artifact confirmed absent fromworker.bundleformat --checkand txeeslint— passFull
./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.