Skip to content

refactor: cut TS world state and NAPI AVM over to WSDB IPC; delete NAPI WSDB#23036

Open
charlielye wants to merge 2 commits into
cl/ipc-wsdb-migratefrom
cl/ipc-3-avm-wsdb-cutover
Open

refactor: cut TS world state and NAPI AVM over to WSDB IPC; delete NAPI WSDB#23036
charlielye wants to merge 2 commits into
cl/ipc-wsdb-migratefrom
cl/ipc-3-avm-wsdb-cutover

Conversation

@charlielye

@charlielye charlielye commented May 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Cuts TypeScript world-state usage and the in-process C++ AVM NAPI path over to the standalone generated @aztec/wsdb package and aztec-wsdb service from the lower stack.

This PR is now stacked after the bb.js migration, so it consumes the new generated package/runtime architecture instead of the old hand-rolled IPC pieces.

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
  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 — this PR
  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++ / NAPI AVM path

  • AvmSimAPI::simulate takes a LowLevelMerkleDBInterface& instead of an in-process WorldState&.
  • NAPI AVM accepts a WSDB socket path and constructs a generated wsdb IPC client plus VM2 wsdb adapter per simulation.
  • NAPI world-state module is deleted; the NAPI module no longer exposes in-process WorldState.
  • NAPI module links the current ipc_runtime path from the lower stack.

TypeScript world-state path

  • World-state startup is encapsulated behind the world-state service/facade instead of leaking binary discovery into callers.
  • NativeWorldStateService spawns aztec-wsdb through the generated @aztec/wsdb package.
  • The generated wsdb wrapper resolves its service binary from the installed/local arch package optional dependency.
  • The old WorldStateRevisionWithHandle shape is removed; callers use ordinary revisions and, where needed, the wsdb socket path.
  • Cleanup paths close spawned wsdb processes explicitly in tests and service lifecycles.

End state after this PR

The TS world-state path and the C++ AVM path both talk to world state over IPC. The in-process NAPI WSDB module is gone.

Validation

  • wsdb/bootstrap.sh
  • yarn-project/yarn install --immutable on this branch after generated package lock updates.
  • Root ./bootstrap.sh passed on this branch during stack validation.

@charlielye charlielye force-pushed the cl/ipc-3-avm-wsdb-cutover branch from 144f6c2 to d2d4ae7 Compare May 7, 2026 13:51
@charlielye charlielye marked this pull request as ready for review May 7, 2026 16:48
@charlielye charlielye force-pushed the cl/ipc-3-avm-wsdb-cutover branch 2 times, most recently from b7a6517 to 4941f2b Compare May 7, 2026 18:02
@charlielye charlielye force-pushed the cl/ipc-3-avm-wsdb-cutover branch 3 times, most recently from 67d3c6c to d904a74 Compare May 11, 2026 13:59
charlielye added a commit that referenced this pull request May 11, 2026
…C server

Replaces the in-process NAPI AVM with the standalone aztec-avm binary
(spawned via AvmBackend from PR 3a) and a TS-hosted CdbIpcServer for the
contract data callbacks.

Stacked on top of PR 2b (cl/ipc-3-avm-wsdb-cutover, #23036) and PR 3a
(cl/ipc-4-avm-binary, #23084).
Base automatically changed from cl/ipc-2-wsdb to cl/ipc-1-mpsc-shm May 12, 2026 08:52
@AztecBot AztecBot force-pushed the cl/ipc-1-mpsc-shm branch 2 times, most recently from 17b93f4 to e668757 Compare May 12, 2026 09:02
Base automatically changed from cl/ipc-1-mpsc-shm to next May 12, 2026 10:55
@charlielye charlielye added the ci-full Run all master checks. label May 12, 2026
charlielye added a commit that referenced this pull request May 12, 2026
…C server

Replaces the in-process NAPI AVM with the standalone aztec-avm binary
(spawned via AvmBackend from PR 3a) and a TS-hosted CdbIpcServer for the
contract data callbacks.

Stacked on top of PR 2b (cl/ipc-3-avm-wsdb-cutover, #23036) and PR 3a
(cl/ipc-4-avm-binary, #23084).
@charlielye charlielye changed the base branch from next to cl/ipc-bb-js-migrate May 29, 2026 13:54
@charlielye charlielye force-pushed the cl/ipc-3-avm-wsdb-cutover branch from 0d58c3e to 679c622 Compare May 29, 2026 13:54
@charlielye charlielye force-pushed the cl/ipc-bb-js-migrate branch from d76171f to ef11595 Compare June 4, 2026 10:55
@charlielye charlielye force-pushed the cl/ipc-3-avm-wsdb-cutover branch from bedd8b6 to d886c60 Compare June 4, 2026 10:55
charlielye added a commit that referenced this pull request Jun 4, 2026
…C server

Replaces the in-process NAPI AVM with the standalone aztec-avm binary
(spawned via AvmBackend from PR 3a) and a TS-hosted CdbIpcServer for the
contract data callbacks.

Stacked on top of PR 2b (cl/ipc-3-avm-wsdb-cutover, #23036) and PR 3a
(cl/ipc-4-avm-binary, #23084).
@charlielye charlielye force-pushed the cl/ipc-bb-js-migrate branch from ef11595 to 67c5155 Compare June 9, 2026 13:48
@charlielye charlielye force-pushed the cl/ipc-3-avm-wsdb-cutover branch from d886c60 to 46639a1 Compare June 9, 2026 13:48
charlielye added a commit that referenced this pull request Jun 9, 2026
…C server

Replaces the in-process NAPI AVM with the standalone aztec-avm binary
(spawned via AvmBackend from PR 3a) and a TS-hosted CdbIpcServer for the
contract data callbacks.

Stacked on top of PR 2b (cl/ipc-3-avm-wsdb-cutover, #23036) and PR 3a
(cl/ipc-4-avm-binary, #23084).
@socket-security

socket-security Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​aztec/​wsdb@​0.0.0-use.local00000

View full report

charlielye added a commit that referenced this pull request Jun 9, 2026
…C server

Replaces the in-process NAPI AVM with the standalone aztec-avm binary
(spawned via AvmBackend from PR 3a) and a TS-hosted CdbIpcServer for the
contract data callbacks.

Stacked on top of PR 2b (cl/ipc-3-avm-wsdb-cutover, #23036) and PR 3a
(cl/ipc-4-avm-binary, #23084).
@charlielye charlielye force-pushed the cl/ipc-bb-js-migrate branch from 67c5155 to ad67d9c Compare June 9, 2026 16:15
charlielye added a commit that referenced this pull request Jun 9, 2026
…C server

Replaces the in-process NAPI AVM with the standalone aztec-avm binary
(spawned via AvmBackend from PR 3a) and a TS-hosted CdbIpcServer for the
contract data callbacks.

Stacked on top of PR 2b (cl/ipc-3-avm-wsdb-cutover, #23036) and PR 3a
(cl/ipc-4-avm-binary, #23084).
@charlielye charlielye force-pushed the cl/ipc-3-avm-wsdb-cutover branch from 3a9289a to 6042327 Compare June 9, 2026 16:15
@charlielye charlielye force-pushed the cl/ipc-bb-js-migrate branch from ad67d9c to 1e2528e Compare June 9, 2026 17:00
@charlielye charlielye force-pushed the cl/ipc-3-avm-wsdb-cutover branch from 6042327 to 14392b8 Compare June 9, 2026 17:00
charlielye added a commit that referenced this pull request Jun 9, 2026
…C server

Replaces the in-process NAPI AVM with the standalone aztec-avm binary
(spawned via AvmBackend from PR 3a) and a TS-hosted CdbIpcServer for the
contract data callbacks.

Stacked on top of PR 2b (cl/ipc-3-avm-wsdb-cutover, #23036) and PR 3a
(cl/ipc-4-avm-binary, #23084).
charlielye added a commit that referenced this pull request Jun 10, 2026
…C server

Replaces the in-process NAPI AVM with the standalone aztec-avm binary
(spawned via AvmBackend from PR 3a) and a TS-hosted CdbIpcServer for the
contract data callbacks.

Stacked on top of PR 2b (cl/ipc-3-avm-wsdb-cutover, #23036) and PR 3a
(cl/ipc-4-avm-binary, #23084).
@charlielye charlielye force-pushed the cl/ipc-3-avm-wsdb-cutover branch from 14392b8 to 011106a Compare June 10, 2026 13:37
@charlielye charlielye force-pushed the cl/ipc-bb-js-migrate branch from 1e2528e to 3cddf51 Compare June 10, 2026 13:37
@charlielye charlielye force-pushed the cl/ipc-3-avm-wsdb-cutover branch from 011106a to f46984b Compare June 10, 2026 13:44
charlielye added a commit that referenced this pull request Jun 10, 2026
…C server

Replaces the in-process NAPI AVM with the standalone aztec-avm binary
(spawned via AvmBackend from PR 3a) and a TS-hosted CdbIpcServer for the
contract data callbacks.

Stacked on top of PR 2b (cl/ipc-3-avm-wsdb-cutover, #23036) and PR 3a
(cl/ipc-4-avm-binary, #23084).
@charlielye charlielye force-pushed the cl/ipc-bb-js-migrate branch from 3cddf51 to c8b3cfa Compare June 10, 2026 14:11
charlielye added a commit that referenced this pull request Jun 10, 2026
…C server

Replaces the in-process NAPI AVM with the standalone aztec-avm binary
(spawned via AvmBackend from PR 3a) and a TS-hosted CdbIpcServer for the
contract data callbacks.

Stacked on top of PR 2b (cl/ipc-3-avm-wsdb-cutover, #23036) and PR 3a
(cl/ipc-4-avm-binary, #23084).
@charlielye charlielye force-pushed the cl/ipc-3-avm-wsdb-cutover branch from f46984b to 0d5cc4a Compare June 10, 2026 14:11
@charlielye charlielye force-pushed the cl/ipc-bb-js-migrate branch from c8b3cfa to fbe1523 Compare June 11, 2026 17:50
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