Skip to content

refactor(bbapi): migrate bb binary to ipc-codegen + ipc-runtime - #23612

Closed
charlielye wants to merge 1 commit into
nextfrom
cl/ipc-bb-migrate
Closed

charlielye wants to merge 1 commit into
nextfrom
cl/ipc-bb-migrate

Conversation

@charlielye

@charlielye charlielye commented May 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Migrates the bb server surface (bbapi, api_msgpack, bb CLI, WASM cbind, and IPC bench paths) to /ipc-codegen + /ipc-runtime.

This PR sits after wsdb migration and before the Rust and bb.js client migrations.

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
  3. refactor(bbapi): migrate bb binary to ipc-codegen + ipc-runtime #23612 cl/ipc-bb-migrate — this PR
  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-over to new wsdb package - comms over uds ipc. #23036 cl/ipc-3-avm-wsdb-cutover
  7. feat: add generated aztec-vm-sim package setup #23084 cl/ipc-4-avm-binary
  8. feat: cut simulator over to generated bb-avm-sim IPC service #23697 cl/ipc-5-avm-cutover

What changes

  • Commits bb_schema.json and bb_curve_constants.json beside bbapi.
  • Generates bb C++ IPC client/server/types from the schema during CMake builds.
  • Routes api_msgpack through codegen-emitted make_bb_handler and ipc_runtime server helpers.
  • Keeps handle_* functions operating on wire commands, with explicit conversion only where bb domain types are required.
  • Removes duplicate domain DTOs and stale wire/domain conversion helpers that were not used.
  • Preserves BBApiException semantics for generated error responses.
  • Exposes bb msgpack schema from codegen schema reflection.
  • Adds generated IPC coverage to C++ CI targets.
  • Updates bb.js native binary resolution to the arch-package model: wrapper code resolves bb and nodejs_module.node from installed or sibling arch packages, not from mutable build/ fallbacks.

Notes

The legacy barretenberg/cpp/src/barretenberg/ipc/ transport remains until the bb.js NAPI substrate migrates in #23614. This PR migrates the bb server surface but does not yet delete the old transport.

Validation

  • ninja bb bbapi_tests
  • ./bin/bbapi_tests
  • ./bin/bb msgpack schema
  • barretenberg/ts native/ESM/CJS build path for arch-package binary resolution.
  • Root ./bootstrap.sh passed on this branch during stack validation after clearing local cache/quota pressure.

@charlielye
charlielye force-pushed the cl/ipc-wsdb-migrate branch from f2951d4 to 4948494 Compare May 28, 2026 06:19
@charlielye
charlielye force-pushed the cl/ipc-bb-migrate branch from a4bbaea to 14f9b51 Compare May 28, 2026 06:19
@charlielye
charlielye force-pushed the cl/ipc-bb-migrate branch from 14f9b51 to c1eac55 Compare May 28, 2026 07:10
@charlielye
charlielye force-pushed the cl/ipc-wsdb-migrate branch from cd8adea to e1d3933 Compare May 28, 2026 09:26
@charlielye
charlielye force-pushed the cl/ipc-bb-migrate branch from c1eac55 to 3ae8af4 Compare May 28, 2026 09:26
@charlielye
charlielye force-pushed the cl/ipc-wsdb-migrate branch from e1d3933 to 5b98d5f Compare May 28, 2026 09:40
@charlielye
charlielye force-pushed the cl/ipc-bb-migrate branch from 3ae8af4 to 34d56b4 Compare May 28, 2026 09:40
@charlielye
charlielye force-pushed the cl/ipc-wsdb-migrate branch from 5b98d5f to 08a03c7 Compare May 28, 2026 10:42
@charlielye
charlielye force-pushed the cl/ipc-bb-migrate branch from 34d56b4 to 66ffb2b Compare May 28, 2026 10:43
@charlielye
charlielye force-pushed the cl/ipc-wsdb-migrate branch 2 times, most recently from 4702983 to e07b17b Compare May 28, 2026 11:06
@charlielye
charlielye force-pushed the cl/ipc-bb-migrate branch from 66ffb2b to 2793608 Compare May 28, 2026 11:07
@charlielye
charlielye force-pushed the cl/ipc-bb-migrate branch from 2793608 to e4043d1 Compare May 28, 2026 11:24
@charlielye

Copy link
Copy Markdown
Contributor Author

Superseded by #25362, which lands this work off next as one PR. Envelope ids (the 8-byte request-id frame prefix) landed after these were opened and broke wire compatibility between the old and new stacks, so bb, bb.js and bb-rs have to migrate together and can no longer go in independently. This PR was used as the recipe for 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.

2 participants