13 Commits
Author SHA1 Message Date
Hanzo DevandGitHub 59fd676294 chore(netrunner): kill subnet — chain/network vocabulary (#48)
zapwire types renamed:
  WhitelistedSubnets → WhitelistedChains
  SubnetID          → NetworkID
  Subnets           → Networks

local/network.go: comment rephrase --whitelisted-subnets → --whitelisted-chains
zapwire/e2e_test.go: test data updated to match renamed fields.

Build clean. zapwire tests pass.
2026-05-29 21:11:41 -07:00
Hanzo AI b673b28c31 rename: github.com/luxfi/protocol → github.com/luxfi/proto (imports + go.mod replace) 2026-05-18 21:19:09 -07:00
Hanzo AI 0bb42a39c8 zapwire: enforce Z-Wing PQ for all netrunner control RPC
Replace plain TCP zap.Dial / zap.Listen with zwing.DialZAP /
zwing.ListenZAP. zapwire.Dial and zapwire.NewServer now require a
*zwing.Config carrying a LocalIdentity — there is no cleartext mode.
Every netrunner control connection is X-Wing-encapsulated,
ChaCha20-Poly1305-encrypted, and identity-pinned via Ed25519 +
ML-DSA-65 hybrid signatures.

Wire format and opcode set are unchanged; only the dial/listen
seams are upgraded. The 14 e2e tests are updated to mint ephemeral
identities per test (newTestRig) and pin the server side, which
also proves the handshake actually authenticates.

Pairs with luxfi/zwing v0.2.1 (DialZAP / ListenZAP) and luxfi/api
v1.0.10 (zap.NewListener).
2026-05-06 12:53:13 -07:00
Hanzo AI 02c01780dc feat(zapwire): WaitForHealthy over ZAP 2026-05-06 12:16:01 -07:00
Hanzo AI 52bdea0735 feat(zapwire): SendOutboundMessage over ZAP 2026-05-06 12:15:18 -07:00
Hanzo AI eac03f108e feat(zapwire): AttachPeer over ZAP 2026-05-06 12:14:31 -07:00
Hanzo AI 8c949d17fd feat(zapwire): ResumeNode over ZAP 2026-05-06 12:13:45 -07:00
Hanzo AI e84d3f598f feat(zapwire): PauseNode over ZAP 2026-05-06 12:13:01 -07:00
Hanzo AI 5991bab97b feat(zapwire): RestartNode over ZAP 2026-05-06 12:12:14 -07:00
Hanzo AI 310bcfb650 feat(zapwire): RemoveNode over ZAP 2026-05-06 12:11:24 -07:00
Hanzo AI 73d13edbab feat(zapwire): AddNode over ZAP 2026-05-06 12:10:41 -07:00
Hanzo AI cc0ec87089 feat(zapwire): Stop over ZAP 2026-05-06 12:09:22 -07:00
Hanzo AI 66a1a46075 feat(zapwire): native ZAP control RPC foundation — Ping/RPCVersion/Health/URIs/Status
100% native ZAP, no protobuf, no gRPC, no codegen. Hand-written Go
types in zapwire/types/ encode/decode against luxfi/api/zap.Buffer
and zap.Reader directly. Server dispatches via a single zap.Handler
that switches on opcode (and sub-opcode for fan-out via OpStart).

Opcodes 60..63 reserved for netrunner control. Sub-opcodes (under
OpStart) provide RPC fan-out without consuming the limited opcode
range. Default port: 9999.

Migration plan:
  Phase 1 (this commit): Ping, RPCVersion, Health, URIs, Status — 5
    of 26 control RPCs landed with full e2e test coverage
  Phase 2: lifecycle (Start, Stop, AddNode, RemoveNode, RestartNode,
    PauseNode, ResumeNode, AttachPeer, SendOutboundMessage)
  Phase 3: chain ops (CreateBlockchains, CreateChains, etc.)
  Phase 4: snapshots (Save/Load/Remove/GetSnapshotNames + Hot)
  Phase 5: streaming (StreamStatus over persistent ZAP conn)
  Phase 6: swap netrunner/client/client.go + cli callers, delete rpcpb

Tests: go test ./zapwire/... — 5 RPCs e2e, all green.
2026-05-06 10:37:19 -07:00