94 Commits
Author SHA1 Message Date
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
Zach Kelling 160e25c144 fix build 2026-01-14 19:56:11 -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 ec09524375 refactor: migrate from zap to luxfi/log, remove local replace directives
- Replace all direct go.uber.org/zap imports with github.com/luxfi/log
- Rename log variables to logger throughout codebase to avoid shadowing
  the log package when using package-level functions like log.String, log.Err
- Remove local replace directives from go.mod (genesis, config)
- Bump version to 1.6.1
2025-12-22 12:39:05 -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 be85c151b0 fix: update imports and API calls for compatibility
- Migrated from Subnet to Net terminology
- Fixed logging imports to use luxfi/log
- Updated metric and set package imports
- Added replace directives for local packages
- All binaries building successfully
2025-09-19 05:37:42 +00:00
Hanzo Dev 8e19dd357c Update imports 2025-07-17 16:56:43 -05:00
Hanzo Dev 1dacb0d461 Updte for latest geth 2025-07-17 16:29:44 -05:00
Hanzo Dev 478d51ffee Update copyright headers to Lux Industries Inc 2025 2025-07-03 23:09:31 -04:00
Zach Kelling ef1adb0022 Rollback to 1.6.0 2024-01-02 20:55:14 +01:00
sukantoraymond c0d51f9729 implement remove subnet validator 2023-05-25 17:19:49 -04:00
sukantoraymond 149216b09c add permissionless validators 2023-05-22 17:56:39 -04:00
Felipe Madero 40e44c06be Merge branch 'main' into elastic-nofiles 2023-05-03 10:14:09 -03:00
sukantoraymond 90b90227fc fix e2e 2023-04-14 16:00:46 -04:00
sukantoraymond 5bb06edf06 add e2e test 2023-04-13 18:03:53 -04:00
fm a1e4f058fe add subnet specs to client, control 2023-04-05 16:03:18 -03:00
Felipe Madero dfd28c5751 merge main 2023-04-03 13:33:21 -03:00
Felipe Madero fe9d2e2447 add pause/resume to server 2023-02-10 12:16:21 -03:00
Felipe Madero dc54aba537 add wait for healthy to cmd and client 2023-01-26 10:53:19 -03:00
Felipe Madero 5fd36790ca replace whitelisted for track except for external API 2023-01-19 07:31:56 -03:00
Felipe Madero 8eedaf08cf avoid using optional for param 2023-01-06 16:48:41 -03:00
Felipe Madero 237d799872 add plugin dir param to client and control for restart and add node 2023-01-06 03:06:30 -03:00
Felipe Madero 1fd3c0f7c9 add subnet configs to RestartNode, AddNode, LoadSnapshot 2022-11-11 18:41:25 -03:00
Felipe Madero b91399c2cd set static ports by default for server, with dynamic prots option 2022-09-26 17:48:35 -03:00
Felipe Madero bbcf423c95 add dynamic ports if already taken to server 2022-09-23 19:23:35 -03:00
Darioush Jalali 1bec09937b add missing code 2022-08-17 14:07:11 -07:00
Darioush Jalali 6b10a29879 Merge branch 'main' of github.com:ava-labs/avalanche-network-runner into add-upgradesconfig 2022-08-17 13:13:39 -07:00
Fabio Barone def1bafff5 next round of PR comments 2022-08-16 12:08:11 -05:00
Fabio Barone d130314be1 Merge branch 'upgrade-avago-logging' into 225-logging 2022-08-16 10:37:09 -05:00
Fabio Barone 70c7205d0e Merge remote-tracking branch 'origin/main' into 225-logging 2022-08-16 09:54:39 -05:00
Darioush JalaliandGitHub fa5e683934 changes for testing statesync on subnet-evm (#235)
* add chainID to NewEthClient

* add reset node w/ chain configs

* missing client code

* bump versions for compatibility
2022-08-16 07:13:57 -07:00
Fabio Barone c355ae3d0e upgrade logging to latest avago 2022-08-12 11:52:44 -05:00
Fabio Barone 5cb8e740a8 pass log object to client 2022-08-10 18:21:54 -05:00
Fabio Barone 6f630eba0c addressed PR comments 2022-08-10 18:17:00 -05:00
Fabio Barone 9822756f38 Merge branch '225-logging' of github.com:ava-labs/avalanche-network-runner-local into 225-logging 2022-08-10 16:48:50 -05:00
Fabio Barone d9f9743a93 fixed merge conflicts 2022-08-04 13:34:52 -05:00
Fabio Barone a8e81114d9 first iteration 2022-08-04 12:42:11 -05:00
Felipe Madero 45ccd2007e address PR comments 2022-08-04 13:13:34 -03:00
Felipe Madero 30cd9ff744 start passing binary exec and node conf to ANR for add node 2022-08-04 04:54:42 -03:00
Felipe Madero dea8d7cd1a Merge branch 'main' into 189-addnode-to-local 2022-08-03 18:06:33 -03:00
Felipe Madero cb13b48111 go back to plugin-dir in RPC 2022-08-03 16:59:33 -03:00
Felipe Madero c5de8087c9 Merge branch 'main' into move-restart-to-local 2022-08-02 20:10:24 -03:00
Felipe Madero 25e775ae4a do not accept dbdir on restart node 2022-08-02 19:02:01 -03:00
Felipe Madero 1546d871a9 Merge branch 'main' into use-buildir-on-rpc 2022-08-01 19:31:22 -03:00
Felipe Madero dee4e10e26 address PR comments 2022-08-01 19:00:47 -03:00
Felipe Madero a93a32ec90 fix e2e 2022-08-01 16:00:08 -03:00
Felipe Madero 642dcfdd5b add a little more info 2022-07-29 17:45:04 -03:00
Darioush Jalali 06bcb4580e Attempt to add upgradeConfig support 2022-07-29 08:42:21 -07:00
Felipe Madero d615d1f2ac use buildDir instead of pluginDir in ANR data 2022-07-28 15:21:55 -03:00