Skip to content

chore(yarn-project): consume fnd artifacts as npm packages - #25097

Merged
nchamo merged 18 commits into
monorepo-split/labsfrom
nchamo/labs-artifacts-from-npm
Aug 5, 2026
Merged

nchamo merged 18 commits into
monorepo-split/labsfrom
nchamo/labs-artifacts-from-npm

Conversation

@nchamo

@nchamo nchamo commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Stacked on #25093, which moves yarn-project's foundation dependencies from source portals to pinned npm packages. Its follow-up list names what is left: the TypeScript generators still copy compiled Noir artifacts straight out of noir-projects/fnd, a directory the labs repo will not have.

The change

The generators now read the artifact packages published by #25075 instead of the fnd target directories:

  • noir-protocol-circuits-types takes the circuits and the two private_kernel_reset_*.json files from @aztec/protocol-circuits-artifacts
  • ivc-integration takes the mock circuits from @aztec/mock-protocol-circuits-artifacts
  • protocol-contracts and aztec.js take the contract artifacts and protocol_contracts.json from @aztec/protocol-contracts-artifacts

Pinning follows the convention #25093 established: 0.1.0-dummy in the workspace manifests, the real version in the root resolutions block. check_pin_drift gains a loop over that block, so all 22 first-party pins are now checked against BB_VERSION instead of only the Nargo tags and the docs example; the ones #25093 adds were previously unchecked.

With the artifacts arriving as packages, yarn-project's build hash no longer needs its fnd protocol-circuits and mock-protocol-circuits inputs, which resolves the TODO sitting on them. The fnd noir-contracts pattern stays, for a reason the old comment did not give: check_oracle_version reads ORACLE_VERSION_MAJOR out of aztec_sublib's version.nr during the build, so dropping it would let an oracle-version bump be served from a stale cache.

Verification

Every generated file was compared against the 6.0.0-nightly.20260804 release of the same package, which CI built through the old source-reading path. vk_tree.ts, private_kernel_reset_data.ts, private_kernel_reset_types.ts, client_artifacts_helper.ts and protocol_contract_data.ts are byte-identical, so VK hashes, contract class ids and canonical addresses are unchanged. The artifacts themselves match the checked-in pins exactly: 82/82 circuits, 11/11 mocks.

One deliberate difference: the generated aztec.js protocol-contract wrappers now carry aztecVersion: '6.0.0-nightly.20260804' rather than 'dev', because published artifacts are version-stamped at release time and locally compiled ones are not. Nothing hashes or branches on that field.

fcarreiro and others added 9 commits August 4, 2026 13:46
yarn-project's foundation JS dependencies (bb.js, bb-avm-sim, wsdb,
ipc-runtime, l1-artifacts, constants-codegen, @aztec/noir-*) move from
portal/file links to npm packages pinned at 6.0.0-nightly.20260804,
resolved via root resolutions. BB_VERSION moves to the same release,
now exactly paired with the beta.26 noir pin, and the protocol_types
tag and docs example pins move with it.
With portals, tsc resolved the noir packages' internal imports from their
realpath (noir/packages), where no node_modules exists, so InputMap and
abiEncode's parameter types degraded to any and two latent errors never
fired. The pinned npm packages resolve fully and surfaced them:
- constrain convertPrivateInputsToWitnessMap's generic to InputValue
- rewrite noir_codegen's value-import of the type-only InputMap in the
  generated types (TS1484 under verbatimModuleSyntax) until fixed upstream
…offline

The npm @aztec/l1-artifacts foundry bundle references solc by version
(it cannot ship a platform binary like the portal-built bundle did), so
the runtime forge deploy resolves it through ~/.svm. The e2e containers
run with --net=none and inherit ~/.svm from the host's home mount, but
download_solc only populated it on the svm-download path - a cache hit
or an existing local binary returned early and left it cold, so every
L1-deploying e2e test died fetching binaries.soliditylang.org.
Reverts the previous download_solc change: l1-contracts is foundation
code and will not exist in the labs repo, so its download path cannot
provision solc for labs e2e tests. Instead yarn-project's build warms
~/.svm itself, reading the version from the installed @aztec/l1-artifacts
bundle so it cannot drift from what the runtime forge deploy requests.
The e2e containers run with no network and inherit ~/.svm from the
host's home mount. On the monorepo this is normally a no-op since
l1-contracts-solc has already populated the cache.
The extra argument existed because portals made node_modules content
depend on noir/packages. With every noir package now npm-pinned,
yarn.lock and package.json fully determine the install, and the
directory argument would hard-error in the labs repo where noir/
does not exist.
@nchamo nchamo self-assigned this Aug 4, 2026
@nchamo nchamo added ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure labels Aug 4, 2026
@nchamo
nchamo requested a review from fcarreiro August 4, 2026 15:33
@socket-security

socket-security Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

@socket-security

socket-security Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring alerts on:

  • npm/@aztec/protocol-circuits-artifacts@6.0.0-nightly.20260804

View full report

@nchamo

nchamo commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore npm/@aztec/protocol-circuits-artifacts@6.0.0-nightly.20260804

@nchamo
nchamo marked this pull request as ready for review August 4, 2026 16:24
Base automatically changed from fc/pin-fnd-deps to monorepo-split/labs August 4, 2026 16:58
@nchamo
nchamo requested review from a team and nventuro as code owners August 4, 2026 16:58
@nchamo
nchamo requested a review from LeilaWang as a code owner August 4, 2026 17:02
Comment thread yarn-project/bootstrap.sh Outdated
$(../noir-projects/labs/aztec-nr/bootstrap.sh hash) \
$(../noir-projects/fnd/noir-protocol-circuits/bootstrap.sh hash) \
$(cache_content_hash "^noir-projects/fnd/mock-protocol-circuits/" "^noir-projects/fnd/noir-contracts/") \
$(cache_content_hash "^noir-projects/fnd/noir-contracts/") \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arghh, we should find a way to get rid of this one

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I'll work on that next

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing it on next, here: #25101

@AztecBot

AztecBot commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

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/d9e80ba7ba455de3�d9e80ba7ba455de38;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/multi-node/invalid-attestations/invalidate_block.parallel.test.ts "proposer invalidates multiple checkpoints" (545s) (code: 0) group:e2e-p2p-epoch-flakes

@nchamo
nchamo merged commit 878d899 into monorepo-split/labs Aug 5, 2026
12 checks passed
@nchamo
nchamo deleted the nchamo/labs-artifacts-from-npm branch August 5, 2026 14:13
fcarreiro added a commit that referenced this pull request Aug 7, 2026
## Summary

- #25098 publishes the CDB server bindings as `@aztec/cdb`, so the
simulator no longer needs to generate
them. This drops the local codegen and consumes the package, following
#25093 for the other foundation
  packages.
- The published output is byte-identical to what `ipc-codegen` produced
here, and `cdb_ipc_server.ts` now
matches `next`'s already-migrated version exactly. Also removes the
`generate` script, its `build:fuzzer`
call, the `simulator` entry in the bootstrap generate fan-out, and the
now-inputless
`ipc-codegen`/`cdb_schema.json` patterns in the yarn-project build hash.
- Bumps the labs pin to `6.0.0-nightly.20260807`, because `@aztec/cdb`
does not exist at the nightly this
branch was previously pinned to. #25097's three artifact packages move
with it, since `check_pin_drift`
requires every `@aztec/*` resolution to match `BB_VERSION`. The noir
submodule and both pinned Noir
  crates are byte-identical across the bump.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants