feat: publish AVM CDB server bindings as @aztec/cdb - #25098
Merged
Merged
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
fcarreiro
force-pushed
the
fc/cdb-ts-package
branch
from
August 4, 2026 16:01
d823376 to
26b402e
Compare
fcarreiro
changed the base branch from
monorepo-split/labs
to
merge-train/fairies
August 4, 2026 16:01
fcarreiro
force-pushed
the
fc/cdb-ts-package
branch
from
August 4, 2026 16:43
26b402e to
45228e3
Compare
The simulator generated its cdb IPC server bindings at build time by reaching into ../../ipc-codegen and ../../barretenberg, both of which stay on the foundation side of the monorepo split. Move the codegen to the foundation side instead: a new generated workspace at barretenberg/ts/cdb publishes @aztec/cdb — wire types, Handler/handleRequest, and cdb_schema.json itself — built and released in lockstep with @aztec/bb-avm-sim, whose compiled-in C++ client must speak the same schema. ipc-codegen's --package mode gains a server-package flavor (--server without --client): no binary launcher, no arch packages, and the schema file ships at the package root for consumers that want to regenerate or inspect the wire contract. yarn-project consumes @aztec/cdb via a portal resolution (to be pinned like the other foundation packages when the split lands) and drops the simulator generate step.
fcarreiro
force-pushed
the
fc/cdb-ts-package
branch
from
August 4, 2026 16:48
45228e3 to
5bea527
Compare
fcarreiro
marked this pull request as ready for review
August 4, 2026 16:49
fcarreiro
requested review from
nchamo and
nventuro
and removed request for
IlyasRidhuan
August 4, 2026 16:49
nchamo
approved these changes
Aug 5, 2026
nchamo
enabled auto-merge (squash)
August 5, 2026 16:50
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.
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.
Problem
yarn-project/simulatorgenerates its cdb IPC server bindings at build time by reaching across the repo intoipc-codegen/andbarretenberg/cpp/.../cdb_schema.json. Both stay on the foundation side of the monorepo split, so the labs repo can't run that generate step (and file/portal links won't exist across repos).Part of https://linear.app/aztec-labs/issue/A-1493/handle-new-ipc-work-for-the-initial-split .
Approach
Follow the
@aztec/wsdb/@aztec/bb-avm-simprecedent: move the codegen to the foundation side and publish the generated bindings as an npm package, consumed by yarn-project like any other foundation dep.--packagecombined with--server(and no--client) now emits a server binding package: wire types +Handler/handleRequest, no binary launcher, no arch packages. The schema file itself ships at the package root (exported as@aztec/cdb/cdb_schema.json) so consumers can regenerate bindings or inspect the wire contract. Client-package output is byte-identical to before (verified by regenerating the bb-avm-sim shell with old and new codegen).cdbworkspace, wired intobootstrap.sh(generate_cdb_package/build_cdb/release_cdb).@aztec/cdbpublishes in lockstep with@aztec/bb-avm-sim, whose compiled-in C++ cdb client must speak the same schema — pinning both to the same release makes wire skew impossible.generatescript and imports from@aztec/cdb(portal resolution for now; to be pinned alongside the other foundation packages). The gitignoredsimulator/src/public/cdb/generateddir is gone, andsimulatorleaves the bootstrap generate list.The cache-hash inputs in
yarn-project/bootstrap.share unchanged: the composedbarretenberg/ipc-codegencomponent hashes now cover the portal'd package's inputs, and can be dropped once the dep is pinned.Verification
@aztec/cdbgenerates and builds viabarretenberg/ts/bootstrap.sh build_cdb.yarn-projecttsc build passes;cdb_ipc_server.test.tspasses; simulator lints clean.Follow-ups
@aztec/cdbin the labs pinning branch to the same version as@aztec/bb-avm-sim, then drop the ipc-codegen/cdb hash inputs.SCHEMA_HASH).