refactor: cut TS world state and NAPI AVM over to WSDB IPC; delete NAPI WSDB#23036
Open
charlielye wants to merge 4 commits into
Open
refactor: cut TS world state and NAPI AVM over to WSDB IPC; delete NAPI WSDB#23036charlielye wants to merge 4 commits into
charlielye wants to merge 4 commits into
Conversation
144f6c2 to
d2d4ae7
Compare
b7a6517 to
4941f2b
Compare
67d3c6c to
d904a74
Compare
5 tasks
17b93f4 to
e668757
Compare
This was referenced May 12, 2026
0d58c3e to
679c622
Compare
ef11595 to
67c5155
Compare
d886c60 to
46639a1
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
67c5155 to
ad67d9c
Compare
3a9289a to
6042327
Compare
ad67d9c to
1e2528e
Compare
6042327 to
14392b8
Compare
14392b8 to
011106a
Compare
1e2528e to
3cddf51
Compare
011106a to
f46984b
Compare
This was referenced Jun 10, 2026
3cddf51 to
c8b3cfa
Compare
f46984b to
0d5cc4a
Compare
c8b3cfa to
fbe1523
Compare
A sequential-insert response can run to ~1.5 MB, but the default SHM rings were 1 MB, so the response could never be sent and the client hung forever (no error surfaced: the server crashed to a discarded stderr and the SHM client has no peer-disconnect signal). UDS streamed it fine, which is why this only bit the SHM path, and bb.js never hit it (tiny responses, SPSC only). - Size the spawned aztec-wsdb SHM rings to 32 MiB request+response (an SHM frame is capped at half the ring, so this gives ~16 MiB headroom). Keep the WSDB_TRANSPORT env gate (default uds) for opting into SHM. - SpscShm::create: gate the pre-fault memset to small rings so large rings stay demand-paged instead of forcing the whole mapping resident. - IpcServer::run(): catch handler/send failures and shut down cleanly with a logged reason instead of letting an uncaught exception reach std::terminate. - Generated spawned-service backend: capture the child's stdout/stderr to a temp logfile (an fd, not a pipe, to preserve clean process exit) and, on unexpected child exit, reject in-flight calls surfacing the log path — so a server crash is a clear error rather than a silent hang over SHM. - Add single-client MPSC pipelined-flood and burst tests; the SPSC grind never exercised the MPSC path. Verified: world-state native suite 50/50 over both SHM and UDS; avm_bulk (TS world state client 0 + C++ AVM client 1 on one aztec-wsdb) passes over SHM; no perf regression vs UDS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cuts TypeScript world-state usage and the in-process C++ AVM NAPI path over to the standalone generated
@aztec/wsdbpackage andaztec-wsdbservice 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
cl/ipc-foundationcl/ipc-wsdb-migratecl/ipc-bb-migratecl/ipc-bb-rs-migratecl/ipc-bb-js-migratecl/ipc-3-avm-wsdb-cutover— this PRcl/ipc-4-avm-binarycl/ipc-5-avm-cutoverWhat changes
C++ / NAPI AVM path
AvmSimAPI::simulatetakes aLowLevelMerkleDBInterface&instead of an in-processWorldState&.WorldState.ipc_runtimepath from the lower stack.TypeScript world-state path
NativeWorldStateServicespawnsaztec-wsdbthrough the generated@aztec/wsdbpackage.WorldStateRevisionWithHandleshape is removed; callers use ordinary revisions and, where needed, the wsdb socket path.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.shyarn-project/yarn install --immutableon this branch after generated package lock updates../bootstrap.shpassed on this branch during stack validation.