zeekayandhanzo-dev 730e9321d8 zap: add Indexed to the atomic surface, and stop Serve panicking after Close
Indexed looked superfluous from the C-Chain side — no settlement path calls
it — so the first cut of this surface omitted it. That was wrong. The
D-Chain's autonomous seam drive is built on it: inside BuildBlock it
enumerates pending C->D intents by a fixed discovery trait, recovering each
key from the LastKey cursor, because a shared-memory object does not carry
its own key in its value. Without Indexed the drive finds nothing and no
intent is ever imported, which would have left the seam as dark as it is
today while looking fixed.

Also fixes a shutdown race that a round-trip test surfaced. Close() nils
the conns map under s.mu and Serve's accept loop then assigned into it,
panicking — fatally, since Serve runs on a detached goroutine. Any server
whose stop path is "cancel then Close" with a connection in flight could
hit it, which already includes the node's per-chain rpcdb server. The
regression test forces the interleaving rather than racing for it, and
fails with the exact panic when the guard is removed.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-08-06 14:21:00 -07:00
2026-01-16 11:52:14 -08:00
2026-01-16 11:52:14 -08:00
2026-02-14 05:26:18 -08:00
2026-07-26 10:01:48 -07:00
2026-01-16 11:52:14 -08:00
S
Description
No description provided
BSD-3-Clause
252 KiB
Languages
Go 74.5%
Cap'n Proto 15.9%
ZAP 9.6%