mirror of
https://github.com/luxfi/node.git
synced 2026-07-27 03:39:39 +00:00
Part A — swap Layer-B wire-types path: github.com/luxfi/proto/rpcdb → github.com/luxfi/protocol/rpcdb (v0.0.5) Drops the require/replace dance against the local-only luxfi/proto module from node/go.mod. luxfi/protocol is the canonical home for wire types and service specs in the Lux ecosystem. Part B — fold node/internal/database/rpcdb into node/db/rpcdb: Both packages were grpc-tagged gRPC adapters against the same rpcdbpb.DatabaseClient/Server. The internal one (db_client.go/db_server.go) predated the Layer A/B/C decomplect; the db/rpcdb one (grpc_server.go + zap_server.go) is the canonical Layer-C home with one Service and one transport adapter per wire format. New grpc_client.go in db/rpcdb mirrors the deleted internal db_client.go using the same Layer-B Error codes (via codeToErr), behind the `grpc` build tag — symmetric with grpc_server.go. Updated service/keystore/rpckeystore/client.go to import the canonical db/rpcdb.NewGRPCClient instead of internal/database/rpcdb.NewClient. internal/database/rpcdb/ deleted in its entirety. One canonical rpcdb home; no dual-shim, no deprecation period. Default-tag build is clean. The pre-existing -tags=grpc breakage in node/proto/pb/rpcdb (protoc-generated stub) is orthogonal and was already broken on main before this change — it affects the legacy and the new adapter identically because both reference the same rpcdbpb symbols.