Skip to content

refactor(wsdb): migrate aztec-wsdb to ipc-codegen + ipc-runtime#23611

Merged
charlielye merged 1 commit into
nextfrom
cl/ipc-wsdb-migrate
Jun 18, 2026
Merged

refactor(wsdb): migrate aztec-wsdb to ipc-codegen + ipc-runtime#23611
charlielye merged 1 commit into
nextfrom
cl/ipc-wsdb-migrate

Conversation

@charlielye

@charlielye charlielye commented May 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrates aztec-wsdb to the shared /ipc-codegen + /ipc-runtime foundation from #23610, and introduces the generated @aztec/wsdb TypeScript service package.

This is the second PR in the single IPC stack.

Stack

  1. feat(ipc): add /ipc-codegen and /ipc-runtime foundation packages #23610 cl/ipc-foundation
  2. refactor(wsdb): migrate aztec-wsdb to ipc-codegen + ipc-runtime #23611 cl/ipc-wsdb-migrate — this PR
  3. refactor(bbapi): migrate bb binary to ipc-codegen + ipc-runtime #23612 cl/ipc-bb-migrate
  4. refactor(barretenberg-rs): migrate to ipc-codegen + ipc-runtime; drop PipeBackend #23613 cl/ipc-bb-rs-migrate
  5. refactor(bb.js): migrate to ipc-codegen + ipc-runtime; delete legacy bb::ipc #23614 cl/ipc-bb-js-migrate
  6. refactor: cut TS world state and NAPI AVM over to WSDB IPC; delete NAPI WSDB #23036 cl/ipc-3-avm-wsdb-cutover
  7. feat: add aztec-avm + aztec-cdb binaries and IPC supporting code (inert) #23084 cl/ipc-4-avm-binary
  8. feat: AVM cutover — delete NAPI AVM, wire IPC simulator pool + CDB IPC server [PR 3b] #23697 cl/ipc-5-avm-cutover

What changes

C++ wsdb

  • Commits wsdb_schema.json next to the wsdb C++ service.
  • Generates wsdb C++ IPC client/server/types from the schema during CMake builds.
  • Replaces hand-written wsdb command dispatch with codegen-emitted dispatch plus typed handlers.
  • Uses ipc_runtime server/client helpers and signal handling.
  • Adds the barretenberg C++ integration glue needed by generated wsdb code: the ipc_runtime CMake target, include path, throw macro guard, and msgpack adaptor guards so legacy bb serialization and generated IPC support can coexist.
  • Keeps handlers operating on primitive wire types, with explicit conversion at the domain boundary.
  • Moves the VM2 wsdb adapter ownership to VM2 simulation code, so wsdb does not own VM2-specific integration.

Generated TypeScript package

  • Adds a top-level wsdb/ package generated from the wsdb schema.
  • wsdb/bootstrap.sh generates wsdb/ts, builds it, copies the host aztec-wsdb binary, and prepares the host arch package.
  • Release flow prepares all available arch packages and publishes the arch packages plus wrapper.
  • The generated wrapper declares @aztec/wsdb-{linux,darwin}-{x64,arm64} as optional dependencies directly in package.json.
  • Monorepo consumers use resolutions/portals for local generated packages; published consumers install @aztec/wsdb and get the matching arch package automatically.
  • ci3/release_prep_package_json now only stamps declared dependencies; it no longer discovers and injects arch packages at release time.

Validation

  • wsdb/bootstrap.sh
  • Generated package binary resolution smoke check for @aztec/wsdb.
  • Release-prep smoke check: wrapper, @aztec/ipc-runtime, and wsdb arch package deps stamp to the release version.
  • Root ./bootstrap.sh passed on this branch during stack validation.
  • Latest PR-boundary check: reran wsdb/bootstrap.sh after moving the barretenberg C++ integration from feat(ipc): add /ipc-codegen and /ipc-runtime foundation packages #23610 into this PR.

@charlielye charlielye force-pushed the cl/ipc-wsdb-migrate branch 2 times, most recently from cd8adea to e1d3933 Compare May 28, 2026 09:26
@charlielye charlielye force-pushed the cl/ipc-foundation branch from 41fcedb to 0588ea3 Compare May 28, 2026 09:39
@charlielye charlielye force-pushed the cl/ipc-wsdb-migrate branch 6 times, most recently from fd004f6 to 30fd5bd Compare May 28, 2026 12:37
@charlielye charlielye force-pushed the cl/ipc-foundation branch from 0173890 to 5112588 Compare May 29, 2026 12:09
@charlielye charlielye force-pushed the cl/ipc-wsdb-migrate branch from 30fd5bd to 2bab045 Compare May 29, 2026 12:09
@charlielye charlielye force-pushed the cl/ipc-foundation branch from 5112588 to ffa4943 Compare May 29, 2026 12:17
@charlielye charlielye force-pushed the cl/ipc-wsdb-migrate branch from 2bab045 to 57b6b45 Compare May 29, 2026 12:17
@charlielye charlielye force-pushed the cl/ipc-foundation branch from ffa4943 to 3e62454 Compare May 29, 2026 12:30
@charlielye charlielye force-pushed the cl/ipc-wsdb-migrate branch from 57b6b45 to 9cd2d77 Compare May 29, 2026 12:30
@charlielye charlielye force-pushed the cl/ipc-foundation branch from 3e62454 to 66e928d Compare May 29, 2026 14:50
@charlielye charlielye force-pushed the cl/ipc-wsdb-migrate branch from 9cd2d77 to 187b545 Compare May 29, 2026 14:50
@charlielye charlielye force-pushed the cl/ipc-foundation branch from 66e928d to e6fa350 Compare May 29, 2026 15:39
@charlielye charlielye force-pushed the cl/ipc-wsdb-migrate branch from 187b545 to ebd9a27 Compare May 29, 2026 15:39
@charlielye charlielye force-pushed the cl/ipc-foundation branch from 7e910a7 to f4dc241 Compare May 29, 2026 17:04
@charlielye charlielye force-pushed the cl/ipc-wsdb-migrate branch 6 times, most recently from 52b4f2c to aab166f Compare May 30, 2026 16:56
@charlielye charlielye force-pushed the cl/ipc-wsdb-migrate branch from 026309b to 4fa21b1 Compare June 10, 2026 17:28
@charlielye charlielye requested a review from ludamad June 10, 2026 17:52
@charlielye charlielye force-pushed the cl/ipc-wsdb-migrate branch 2 times, most recently from 81bee6d to 787c442 Compare June 10, 2026 22:58

// Tool to make header only libraries (i.e. CLI11 and msgpack, though it has a bundled copy)
// not use exceptions with minimally invaslive changes
// not use exceptions with minimally invaslive changes.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: pre-existing typo

@ludamad

ludamad commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

No qualms, but I expect someone more familiar with WSDB should have a look

@charlielye charlielye force-pushed the cl/ipc-wsdb-migrate branch from bb8aba6 to 01f3595 Compare June 11, 2026 18:06
@charlielye charlielye force-pushed the cl/ipc-wsdb-migrate branch from 01f3595 to 6227eeb Compare June 11, 2026 18:37
@charlielye charlielye force-pushed the cl/ipc-wsdb-migrate branch from 6227eeb to c2c6c29 Compare June 11, 2026 19:05
@charlielye charlielye force-pushed the cl/ipc-wsdb-migrate branch from c2c6c29 to 22f0d91 Compare June 12, 2026 11:51
@charlielye charlielye added the ci-release-pr Creates a development tag and runs the release suite label Jun 12, 2026
@AztecBot AztecBot removed the ci-release-pr Creates a development tag and runs the release suite label Jun 12, 2026
@charlielye charlielye force-pushed the cl/ipc-wsdb-migrate branch from 22f0d91 to 4da4de7 Compare June 12, 2026 12:23
@charlielye charlielye added the ci-release-pr Creates a development tag and runs the release suite label Jun 12, 2026
@AztecBot AztecBot removed the ci-release-pr Creates a development tag and runs the release suite label Jun 12, 2026
@charlielye charlielye force-pushed the cl/ipc-wsdb-migrate branch from 4da4de7 to dfdb926 Compare June 12, 2026 12:56
@charlielye charlielye added the ci-release-pr Creates a development tag and runs the release suite label Jun 12, 2026
@AztecBot AztecBot removed the ci-release-pr Creates a development tag and runs the release suite label Jun 12, 2026
@charlielye charlielye force-pushed the cl/ipc-wsdb-migrate branch from dfdb926 to 031e54b Compare June 12, 2026 13:41
@charlielye charlielye added the ci-release-pr Creates a development tag and runs the release suite label Jun 12, 2026
Generate the @aztec/wsdb TS package and the wsdb C++ client/server from
wsdb_schema.jsonc via ipc-codegen instead of the hand-written bindings.

Add a "bin" entry to the generated package.json (when the package wraps a
native binary) so the binary lands on the user's PATH on install. The bin
target is a generated JS launcher (src/bin.ts -> dest/bin.js) that resolves the
native binary via the same per-arch resolution as the spawned client and execs
it forwarding argv/stdio/exit code — the binary itself ships in the per-arch
optional-dependency packages, and npm only links the main package's own bin.
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.

3 participants