104 Commits
Author SHA1 Message Date
Hanzo AI c0d55e7195 rpcpb: gate rpc.pb.go behind -tags grpc, hand-rolled types.go is default
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.
2026-05-20 21:27:51 -07:00
Hanzo AI 301a8e2601 rip gRPC, USE ZAP: netrunner control-plane now luxfi/zap-native (FORWARDS ONLY)
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.
2026-05-20 19:15:40 -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
Zach Kelling e53011719c fix: rename TLS key files to luxtls.key/crt
- Rename staking.key -> luxtls.key in embedded configs
- Rename staking.crt -> luxtls.crt in embedded configs
- Update imports to github.com/luxfi/constants
2026-01-08 19:35:37 -08:00
Zach Kelling 4e2a4e432e chore: remove local replace directives and update dependencies
- 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
2026-01-03 07:05:17 -08:00
Zach Kelling cd0dd2fccc fix: correct network ID usage and remove HID conflicts
- 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
2025-12-29 10:07:43 -08:00
Zach Kelling 2f9accfb10 Refactor subnet→chain terminology and update genesis to v1.5.6
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)
2025-12-19 07:11:06 -08:00
Zach Kelling b599713abf Update organization name 2025-07-20 08:38:06 +00:00
Zach Kelling ef1adb0022 Rollback to 1.6.0 2024-01-02 20:55:14 +01:00
sukantoraymond a3808408d1 fix conflict 2023-06-01 16:41:19 -04:00
sukantoraymondandGitHub 83da8f512f Merge branch 'addPermissionlessValidators' into removeValidatorsNew
Signed-off-by: sukantoraymond <rsukanto@umich.edu>
2023-06-01 16:40:58 -04:00
sukantoraymond f792526dbc fix merge 2023-06-01 12:13:24 -04:00
sukantoraymondandGitHub c4b89206fe Merge branch 'main' into addPermissionlessValidators
Signed-off-by: sukantoraymond <rsukanto@umich.edu>
2023-06-01 10:55:24 -04:00
sukantoraymond 87e987f158 address PR comments 2023-05-30 17:49:03 -04:00
sukantoraymond 779ddab542 resolve conflict 2023-05-30 17:28:32 -04:00
sukantoraymond 6f8a10d582 update pr comments 2023-05-30 15:26:50 -04:00
fm 4fe77b4822 fill server elastic subnet id from local info 2023-05-29 20:03:38 -03:00
sukantoraymond c0d51f9729 implement remove subnet validator 2023-05-25 17:19:49 -04:00
sukantoraymond fdfee03b69 use node name as argument 2023-05-24 17:42:45 -04:00
sukantoraymond df01b4fff4 add asset id to transform output 2023-05-23 17:46:49 -04:00
sukantoraymond 149216b09c add permissionless validators 2023-05-22 17:56:39 -04:00
Felipe Madero d8c69cfe4d nit 2023-05-03 13:37:27 -03:00
Felipe Madero 40e44c06be Merge branch 'main' into elastic-nofiles 2023-05-03 10:14:09 -03:00
sukantoraymondandGitHub 94cfd527b7 Merge branch 'main' into elastic-nofiles
Signed-off-by: sukantoraymond <rsukanto@umich.edu>
2023-05-02 16:22:06 -04:00
felipemaderoandGitHub 314f92ed0d Merge branch 'main' into change-subnet-clusterinfo 2023-05-02 16:59:34 -03:00
Felipe Madero 15cea8fdb9 accept either path or file contents for genesis, chain conf, subnet
conf, network upgrade
2023-04-27 12:00:01 -03:00
sukantoraymond f62f190176 remove participants 2023-04-13 23:12:14 -04:00
sukantoraymond 94646db121 update subnet info cluster 2023-04-13 22:57:48 -04:00
sukantoraymond 0447aca91a subnet info 2023-04-13 22:03:01 -04:00
sukantoraymond c9e446abf6 change subnet from array into map 2023-04-13 19:45:50 -04:00
sukantoraymond 5bb06edf06 add e2e test 2023-04-13 18:03:53 -04:00
sukantoraymond d3539705db elastic subnets 2023-04-13 10:30:43 -04:00
fm 87c689bc12 set blockchain creation funcs to return ids 2023-04-11 18:28:50 -03:00
fm f2076a41cf add subnet ids response to CreateSubnets 2023-04-11 18:11:26 -03:00
sukantoraymond 6761cb79fa address PR comments 2023-04-11 15:26:28 -04:00
sukantoraymond b4e3e01d38 map subnet id to participants 2023-04-10 19:39:54 -04:00
fm 29f1843b51 add proto 2023-04-07 13:43:09 -03:00
fm 5e098e8304 add participant to subnet creation 2023-04-05 15:26:54 -03:00
Felipe Madero dfd28c5751 merge main 2023-04-03 13:33:21 -03:00
Felipe Madero c80d390f04 make this to work 2023-02-10 17:21:37 -03:00
Felipe Madero fe9d2e2447 add pause/resume to server 2023-02-10 12:16:21 -03:00
Felipe Madero f0b82dc583 rm ErrMsg 2023-01-31 14:52:27 -03:00
Felipe Madero 8cc1b57ed9 add err msg and check function 2023-01-25 19:01:56 -03:00
Felipe Madero f85158f7d6 add err msg to cluster info to show async errors 2023-01-25 18:35:56 -03:00
Felipe Madero 8eedaf08cf avoid using optional for param 2023-01-06 16:48:41 -03:00
Felipe Madero 20d298b53d add plugin dir param to restart node, add node, and do some cleanup 2023-01-06 02:30:05 -03:00
Felipe Madero 48c968cb13 Merge branch 'main' into chain-config-per-node 2022-12-15 14:40:10 -03:00
Abdelkrim Boutkhil 878cbf9e14 add blockchain_alias - code review fixes 2022-12-15 10:39:47 +01:00
Felipe Madero 119c2830de change rpc to take one input file with the map 2022-12-12 16:26:14 -03:00
Felipe Madero 60715be11c add per node chain config to RPC request 2022-12-12 12:43:32 -03:00