Skip to content

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

Open
charlielye wants to merge 1 commit into
nextfrom
cl/wsdb-pinned-deps
Open

charlielye wants to merge 1 commit into
nextfrom
cl/wsdb-pinned-deps

Conversation

@charlielye

@charlielye charlielye commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #24392 (which now also carries the one-line bb change: libbb-external.a gains world_state_reference and its bb_wsref_* C ABI).

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; cpp/CMakeLists.txt fetches everything from that release with two plain FetchContent declarations. There is no monorepo path: bootstrap.sh builds wsdb exactly as any other consumer would, and the Makefile's wsdb target no longer depends on bb-cpp-native, ipc-runtime or ipc-codegen.

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 (until it is published, then npx) one sparse partial clone of aztec-packages at the tag, holding ipc-runtime/cpp and ipc-codegen (~5 MB, ~2 s)
protocol constants npx @aztec-foundation/constants-codegen@<tag version> (embeds its release's constants.nr)
  • wsdb links exactly one archive: libenv.a and libvm2_sim.a only ever resolved symbols of the whole libbarretenberg.a.
  • The bb-header parity target goes; the reference conformance suite covers what it checked without compiling bb headers.
  • ipc-codegen gets a package.json and joins the release lists so it can be published. googletest is built in wsdb's own tree.

Verified. Against the pinned nightly the sparse clone and the archive download both work; the build then fails as expected because that nightly predates #24392. With a fresh sparse clone of this branch as the source and a post-#24392 archive (FetchContent's standard FETCHCONTENT_SOURCE_DIR_<name>): 167 tests.

Sequencing. wsdb is red in CI until the first nightly after #24392 merges; then foundation.pin moves to that tag and this PR goes green. The monorepo builds wsdb against the pin from then on, not its own HEAD.

🤖 Generated with Claude Code

https://claude.ai/code/session_012EUKia6wteDk9kZZuT2Gju

@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
…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 joins the release lists so it can
be published; once it is, it moves to npx like the constants and the clone shrinks to
ipc-runtime.

Verified: the configure sparse-clones aztec-packages and downloads the pinned nightly's archive,
and the build then fails as expected because that nightly predates #24392 (no poseidon2 C ABI in
the archive, and a generator without the wire-namespace aliases); with a fresh sparse clone of
this branch as the source and a post-#24392 archive (FetchContent's standard
FETCHCONTENT_SOURCE_DIR_<name>), ipc-runtime compiles from the clone, ipc-codegen runs from it,
the constants come from npx, and all 167 tests pass. CI is red for wsdb until the first nightly
after #24392, at which point foundation.pin (the tag and nothing else) moves to it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012EUKia6wteDk9kZZuT2Gju

This branch has not been deployed

No deployments
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