proto

module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2026 License: BSD-3-Clause

README

luxfi/proto

Canonical schema definitions for the Lux platform. Module path is github.com/luxfi/proto — the directory now matches (was protocol/).

Layout: ZAP + gRPC side-by-side, 1:1

Same package paths under both zap/ and pb/ (or in files suffixed _zap.go and _pb.go for thin packages). The Go build picks one or the other based on the build tag:

Default (no tag) -tags grpc
zap/<pkg>/*_zap.go (//go:build !grpc) pb/<pkg>/*_pb.go (//go:build grpc)
ZAP-native types + codecs protobuf-generated types + codecs
Zero google.golang.org/grpc in dep graph Includes google.golang.org/grpc

ZAP is the canonical wire. The protobuf path exists only for external integrations that mandate OTLP-over-gRPC. Internal Lux services use ZAP exclusively.

Consolidation policy

New schemas land here. This directory is the single source of truth for any cross-package wire definition. The scattered per-repo proto/ subdirs (see below) are legacy — they should migrate into this module when the natural rewrite happens.

Existing scattered locations (do not add to them):

Path Status
~/work/lux/p2p/proto/{zap,pb,p2p}/ legacy — to migrate
~/work/lux/node/proto/zap/ legacy — to migrate
~/work/lux/vm/proto/pb/ legacy — to migrate
~/work/lux/api/schema/proto/ legacy — to migrate

Migration cost is one import-path bump per consumer. Not blocking — fold in as those packages are touched for unrelated reasons.

Hanzo mirror

~/work/hanzo/proto follows the same pattern for the Hanzo platform. See hanzoai/proto README.

Directories

Path Synopsis
node
zap/p2p
Package p2p provides P2P message types for network communication.
Package p2p provides P2P message types for network communication.
zap/platformvm
Package platformvm provides Platform VM types for L1 validator operations (ZAP implementation).
Package platformvm provides Platform VM types for L1 validator operations (ZAP implementation).
zap/sync
Package sync provides sync types for merkledb.
Package sync provides sync types for merkledb.
zap/vm
Package vm provides VM types for node-VM communication (ZAP implementation).
Package vm provides VM types for node-VM communication (ZAP implementation).
p
Package p contains protocol types for the Platform/P chain.
Package p contains protocol types for the Platform/P chain.
api
block
Package block is a generated GoMock package.
Package block is a generated GoMock package.
block/executor
Package executor is a generated GoMock package.
Package executor is a generated GoMock package.
block/executor/executormock
Package executormock is a generated GoMock package.
Package executormock is a generated GoMock package.
fx
fx/fxmock
Package fxmock is a generated GoMock package.
Package fxmock is a generated GoMock package.
signer
Package signer provides the Signer interface for BLS signatures.
Package signer provides the Signer interface for BLS signatures.
signer/signermock
Package signermock is a generated GoMock package.
Package signermock is a generated GoMock package.
state
Package state is a generated GoMock package.
Package state is a generated GoMock package.
testcontext
Package testcontext provides a test context for platformvm tests
Package testcontext provides a test context for platformvm tests
txs
Package txs is a generated GoMock package.
Package txs is a generated GoMock package.
txs/builder
Package builder is a generated GoMock package.
Package builder is a generated GoMock package.
txs/fee
TODO: Before Etna, address all TODOs in this package and ensure LP-103 compliance.
TODO: Before Etna, address all TODOs in this package and ensure LP-103 compliance.
txs/txsmock
Package txsmock is a generated GoMock package.
Package txsmock is a generated GoMock package.
utxo
Package utxo is a generated GoMock package.
Package utxo is a generated GoMock package.
utxo/utxomock
Package utxomock is a generated GoMock package.
Package utxomock is a generated GoMock package.
Package rpcdb is the transport-agnostic Layer B service spec for the remote `database.Database` service.
Package rpcdb is the transport-agnostic Layer B service spec for the remote `database.Database` service.
txs
mempool
Package mempool is a generated GoMock package.
Package mempool is a generated GoMock package.
mempool/mempoolmock
Package mempoolmock is a generated GoMock package.
Package mempoolmock is a generated GoMock package.
x
Package x contains protocol types for the Exchange/X chain.
Package x contains protocol types for the Exchange/X chain.
block
Package block is a generated GoMock package.
Package block is a generated GoMock package.
block/executor
Package executor is a generated GoMock package.
Package executor is a generated GoMock package.
block/executor/executormock
Package executormock is a generated GoMock package.
Package executormock is a generated GoMock package.
fxs
metrics/metricsmock
Package metricsmock is a generated GoMock package.
Package metricsmock is a generated GoMock package.
state
Package state is a generated GoMock package.
Package state is a generated GoMock package.
state/statemock
Package statemock is a generated GoMock package.
Package statemock is a generated GoMock package.
txs
Package txs is a generated GoMock package.
Package txs is a generated GoMock package.
txs/mempool
Package mempool is a generated GoMock package.
Package mempool is a generated GoMock package.
txs/mempool/mempoolmock
Package mempoolmock is a generated GoMock package.
Package mempoolmock is a generated GoMock package.
txs/txsmock
Package txsmock is a generated GoMock package.
Package txsmock is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL