Skip to content

feat(wsdb): build against one pinned aztec-packages release outside the monorepo - #25518

Merged
charlielye merged 1 commit into
nextfrom
cl/wsdb-pinned-deps
Sep 29, 2026
Merged

charlielye merged 1 commit into
nextfrom
cl/wsdb-pinned-deps

Conversation

@charlielye

@charlielye charlielye commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Makes native-packages/wsdb build from one pinned aztec-packages release, with nothing taken from the monorepo tree, so it builds unchanged once it moves to aztec-labs-eng/aztec-node.

Audit. lmdblib and kvdb reach only their sibling lmdblib and ci3. wsdb reached out four ways: barretenberg's build tree (libbarretenberg.a, libenv.a, libvm2_sim.a, gtest), ipc-runtime's headers and archive from that tree, ipc-codegen/src/generate.ts, and protocol/constants-codegen on the checked-out constants.nr.

Change. foundation.pin is one tag (v7.0.0-nightly.20260926.b); cpp/CMakeLists.txt fetches everything from that release with two plain FetchContent declarations. No monorepo path: bootstrap.sh builds wsdb as any consumer would, and the Makefile's wsdb target depends only on lmdblib.

Dependency Source
barretenberg (bb_poseidon2_hash*; bb_wsref_* for the conformance test) barretenberg-static-<arch>-<os>.tar.gz from the barretenberg GitHub release of the tag
ipc-runtime (compiled in) and ipc-codegen one sparse partial clone of aztec-packages at the tag (~5 MB, ~2 s)
protocol constants npx @aztec-foundation/constants-codegen@<tag version> (embeds its release's constants.nr)
  • wsdb links exactly one archive, libbb-external.a: libenv.a and libvm2_sim.a only ever resolved symbols of the whole libbarretenberg.a.
  • CMake globs its sources into two executables (aztec-wsdb, wsdb_tests) plus wsdb_bench; the generated dispatch and constants are produced at configure time. The tree benchmarks that came across from barretenberg (never run there) now run in bench_cmds, every family at 1024 leaves in about a minute.
  • The bb-header parity target goes; the reference conformance suite covers what it checked.
  • ipc-codegen gets a package.json and release function but stays out of the release lists until @aztec-foundation/ipc-codegen exists on npm (trusted publishing can't create packages, so listing it would stop the nightly publish). Once published it moves to npx and the clone shrinks to ipc-runtime.
  • The private release's publish list named a nonexistent root wsdb; it now names native-packages/wsdb.

Verified. Pinned to .b, wsdb builds purely from the pin and passes all 167 tests.

@charlielye charlielye changed the title feat(wsdb): resolve every external dependency from a pinned release outside the monorepo feat(wsdb): build against one pinned aztec-packages release outside the monorepo Sep 22, 2026
@charlielye
charlielye force-pushed the cl/wsdb-pinned-deps branch 3 times, most recently from 895d1e8 to 4a57dfb Compare September 23, 2026 12:11
@charlielye
charlielye force-pushed the cl/wsdb-pinned-deps branch 4 times, most recently from 072e366 to 3acd786 Compare September 24, 2026 18:40
@charlielye
charlielye force-pushed the cl/wsdb-decouple branch 2 times, most recently from dee4b34 to f522fae Compare September 24, 2026 19:59
@charlielye
charlielye force-pushed the cl/wsdb-pinned-deps branch 2 times, most recently from 8a2489e to 36d87bf Compare September 24, 2026 20:06
Base automatically changed from cl/wsdb-decouple to next September 25, 2026 11:49
@charlielye
charlielye force-pushed the cl/wsdb-pinned-deps branch 3 times, most recently from bd26343 to db3d087 Compare September 29, 2026 14:11
…he monorepo

native-packages/wsdb reached out of its directory four ways: libbarretenberg.a, libenv.a and
libvm2_sim.a from barretenberg's build tree, ipc-runtime's headers and archive from the same
tree, ipc-codegen's generate.ts, and protocol/constants-codegen on the checked-out constants.nr.
None of those paths exist once the package moves to its own repository. Everything now comes
from one aztec-packages release, pinned by tag in foundation.pin (cpp/CMakeLists.txt):

- barretenberg: barretenberg-static-<arch>-<os>.tar.gz from the barretenberg GitHub release of
  the tag, sha256-verified per platform. That archive, libbb-external.a, is self-contained (env
  and the vm2 stub inside) and with this change also carries world_state_reference and its
  bb_wsref_* C ABI, so the conformance test links it alone. wsdb links exactly that one archive:
  libenv.a and libvm2_sim.a were only ever needed to resolve symbols of the whole
  libbarretenberg.a. deps.cmake probes the archive for the poseidon2 and reference C ABIs at
  configure time and fails naming the pin when the release predates them.
- ipc-runtime and ipc-codegen: a sparse partial clone of aztec-packages at the tag
  (--filter=blob:none --depth 1 --sparse, then ipc-runtime/cpp and ipc-codegen; a few MB, ~2s).
  ipc-runtime is add_subdirectory'd and compiled in; ipc-codegen runs from the checkout.
- protocol constants: npx @aztec-foundation/constants-codegen at the tag's version, which embeds
  its release's constants.nr.
- googletest is fetched and built here instead of borrowed from barretenberg's build.

There is no monorepo path at all: the two fetches are plain FetchContent declarations, wsdb's
bootstrap.sh runs them like any other consumer, and the Makefile's wsdb target no longer
depends on barretenberg, ipc-runtime or ipc-codegen. The monorepo therefore builds wsdb against
the pinned release, not its own HEAD, and a change wsdb needs from barretenberg or the
generator reaches it by moving the pin once a release carries it. The tree benchmarks that came across from barretenberg
(cpp/src/benchmark, never wired into wsdb's build) now build as wsdb_bench, and bootstrap.sh's
bench_cmds runs every family at 1024 leaves into bench-out/*.bench.json, the form the repo's
bench upload merges; barretenberg's own bench_cmds never ran them, so this is new coverage.
The bb-header parity target is gone with the old link line: it needed a full checkout and a
Tracy fetch, and the reference conformance suite already proves hash and root agreement with
barretenberg end to end. ipc-codegen gains a package.json and a release function, but stays out of the release lists
until @aztec-foundation/ipc-codegen exists on npm: trusted publishing cannot create a package, so listing
it now would stop every nightly's publish. Once it is published it moves to npx like the
constants and the clone shrinks to ipc-runtime.

Verified: pinned to v7.0.0-nightly.20260926.b, the first nightly carrying #24392, wsdb builds
purely from the pin (sparse clone of the tag, the release's libbb-external.a, constants from
npx, nothing overridden) and passes all 167 tests.

The private release's publish list named `wsdb`, a path that does not exist at the root since
the extraction; it now names native-packages/wsdb.
@charlielye
charlielye enabled auto-merge (squash) September 29, 2026 15:27
@charlielye
charlielye disabled auto-merge September 29, 2026 15:27
@charlielye
charlielye merged commit 822270d into next Sep 29, 2026
18 checks passed
@charlielye
charlielye deleted the cl/wsdb-pinned-deps branch September 29, 2026 15:27
charlielye added a commit that referenced this pull request Sep 29, 2026
`@aztec-foundation/ipc-codegen` now exists on npm (created by hand at
`0.0.0-bootstrap`, since trusted publishing can't create a package), so
ipc-codegen joins the public and private release lists. #25518 gave it a
`package.json`, a `bin` and a `release` function but left it out of the
lists until the package existed.

Once a release carries it, wsdb can run it with npx like the protocol
constants instead of taking it from its sparse clone of aztec-packages.

**Needs before the next nightly:** the package's trusted publisher
(GitHub, `AztecProtocol/aztec-packages`, `ci3.yml`, environment
`master`) must be set by one of its maintainers, or the release's npm
publish stops at it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant