Per the project rule: ZAP internal, no google.golang.org/protobuf on the
wire OR in the netrunner rpcpb package by default.
rpcpb/rpc.pb.go: //go:build grpc — protoc-gen-go output stays available
behind the legacy tag for external integrations that still want the
proto Go types.
rpcpb/types.go: //go:build !grpc — hand-written plain Go structs for
every Request/Response/spec/info type. Same names, same field types,
same json: tags so JSON wire compat with rpc.pb.go is preserved. Plus
the proto-style GetX() helpers callers expect.
Default-build dep graph for rpcpb is now SINGLE-FILE: rpcpb/types.go,
zero google.golang.org/protobuf, zero google.golang.org/grpc.
scripts/check-no-grpc.sh: CI gate. Walks the default-tag dep graph
and fails non-zero if google.golang.org/grpc or grpc-ecosystem/grpc-gateway
reappears. Wire this into CI to make the rule stick.
Per the project rule 'ZAP internal, ZIP edge': netrunner's 26-method
ControlService + PingService move off google.golang.org/grpc and
grpc-gateway onto a luxfi/zap envelope. Default builds now have ZERO
google.golang.org/grpc transitive deps.
New package: netrunner/zaprpc/
- protocol.go: MsgType (uint8 range, encoded in ZAP flags upper byte).
One stable wire ID per method. Append-only.
- dispatch.go: typed Bind[Req, Resp](d, msg, handler) — register a
'func(ctx, *Req) (*Resp, error)' handler. JSON encode/decode +
envelope framing happen here, handlers stay business-logic-only.
- server.go: thin wrapper around zap.Node hosting a Dispatcher.
- client.go: typed Call[Req, Resp](ctx, c, msg, req) — same DX as the
old gRPC client but transport is ZAP. Includes connect-retry around
the boot race.
server/bind.go: one-shot registration of all 26 RPC methods onto a
Dispatcher. The canonical map of 'what this server exposes'.
server/server.go: gRPC server + grpc-gateway HTTP bridge are gone.
Run() now starts the ZAP server and waits for rootCtx.Done. The
'soldier-on' isClientCanceled helper goes with the gRPC stream code.
client/client.go: full rewrite. Same Client interface (28 methods),
implementation is now one-line zaprpc.Call per method. StreamStatus
becomes a client-driven Status() poll on the requested interval —
ZAP has no native server-streaming, but the observable contract
(channel of ClusterInfo) is unchanged.
Deleted:
- rpcpb/rpc_grpc.pb.go (gRPC service stubs)
- rpcpb/rpc.pb.gw.go (grpc-gateway HTTP bridge)
The rpcpb message types (rpc.pb.go) stay — they're plain Go structs
with json: tags, used as the JSON payload format inside ZAP envelopes.
A future cleanup pass can replace them with hand-written structs to
drop google.golang.org/protobuf from the dep tree too.
go.mod cleanup: drop github.com/grpc-ecosystem/grpc-gateway/v2,
google.golang.org/grpc, google.golang.org/genproto/googleapis/api.
Pin luxfi/proto v1.0.0 (was luxfi/protocol v0.0.4 — stale rename
artifact). Add luxfi/zap v0.2.0.
Tests: zaprpc/zaprpc_test.go round-trips request/response and proves
the error path propagates through the envelope.
No backwards compat — forwards perfection per the project rule.
- Update github.com/luxfi/keys v1.0.5 → v1.0.6
- Update github.com/luxfi/genesis v1.5.18 → v1.5.19
- Remove local replace directives for keys and genesis
- Use published package versions for reproducible builds
- Remove ledger-lux-go transitive dependency
- Fix Network ID vs Chain ID confusion in genesis_config.go
- Use constants.MainnetID/TestnetID instead of configs.ChainID
- Fix port base calculation for multi-network mode
- Add snapshot server functionality
- Update protobuf definitions with new RPC methods
- Add mnemonic test coverage
Major changes:
- Rename SubnetSpec → ChainSpec/ParticipantSpec throughout codebase
- Rename BlockchainSpec → ChainSpec for full chain definitions
- Update all protobuf definitions with new naming
- Fix duplicate variable declarations from sed replacements
- Update copyright headers to BSD-3-Clause with SPDX identifiers
- Update github.com/luxfi/genesis to v1.5.6 (BLS signer keys)
The genesis v1.5.6 update adds:
- Initial stakers with BLS publicKey and proofOfPossession
- Initial allocations for local network testing
- Fixes "failed to load database state: not found" error
Build fixes:
- Fix api/mocks/client.go CChainAPI return type
- Fix local/node_test.go with build tag for integration tests
- Fix parameter name collisions (chainConfigs → pChainConfigs)