Companion schemas for the json/v2 → ZAP-native migration of the four
internal-data sites in luxfi/node:
* schemas/da/da.zap — DABlobWire / DACertWire /
DACommitmentWire (replaces
json.Marshal(DABlob|DACert))
* schemas/airdrop/airdrop.zap — AirdropClaimsWire (replaces
json.Marshal(map[Address]Claim))
* schemas/chainadapter/appchain.zap — CollectionSchemaWire,
UserDataWire, CounterOpWire
(replaces three json uses
inside SQLiteMaterializer)
* schemas/messaging/conversation.zap — Conversation + nested CRDTs
(replaces UTF-8 unsafe JSON
marshaling)
These schemas record the wire shape; the matching hand-rolled codecs
ship in node/vms/<dir>/codec_zap.go (luxfi/zap-based, consistent with
the existing zap_native pattern). Codegen-from-schema will follow when
the lux module pulls in zap-proto/go.
Forward-only ZAP. No backwards-compat shims:
- zap_codec multi.go: drop BE-fallback read path
- zap_codec zapcodec.go: drop BE-fallback read path + peekVersionBE helper
- zap_native codec_select.go: rip LegacyEnabled var + LUXD_ENABLE_LEGACY_CODEC
env knob + ErrLegacyCodecDisabled. Comment block simplified.
ZAPActivationUnix stays at 1766708400 (Dec 25 2025 16:20 PST — Quasar
activation timestamp, same as all other forks). ShouldUseZAPForWrite
returns true unconditionally — ZAP is the only wire format.
Tests cleaned: drop LegacyEnabled toggle scenarios in
TestShouldUseZAPForWrite and TestRed_V15. Pin ZAPActivationUnix value
to the Quasar timestamp.
Validators upgrading from v1.28.x DBs cannot mount in this layout
(pre-LP-023 BE-encoded P-chain state is unreadable). Mainnet/testnet/
devnet operators must rebootstrap from genesis + RLP re-import.
Validators upgrading from luxd v1.28.x hold P-chain state written with
the pre-LP-023 BE codec version prefix. zap_codec.Unmarshal now tries
LE first; on unknown version, falls back to BE before erroring.
Behaviour:
- LE matches → use LE codec (post-Dec-25-2025 writers)
- LE unknown, BE matches → use BE codec with BE prefix, advance offset
past VersionSize, decode body
- Both unknown → ErrUnknownVersion as before
Disambiguation is safe because registered version IDs are small (0..N
for the handful of codec generations). Palindromic byte-pair values
agree under both endianness, so the only ambiguous case is small N where
both BE and LE happen to be registered — practically impossible with
the current registry.
Also:
- ZAPActivationUnix: 0 → 1766708400 (Dec 25 2025 16:20 PST) — same as
all other Quasar-Edition forks. Documents that LP-023 was a network
activation, not a binary cutover.
- LegacyEnabled: defaults true unless LUXD_ENABLE_LEGACY_CODEC=0 — keeps
legacy linearcodec path reachable for historical bytes that didn't
migrate through the BE-fallback shim.
Wave 2G-Archive moved github.com/luxfi/codec/zapcodec to its own
top-level module github.com/luxfi/zapcodec v1.0.1. Swap imports:
- proto/zap_codec/zapcodec.go: codec/{wrappers,zapcodec} → utils/wrappers + luxfi/zapcodec
- proto/zap_codec/multi.go: same import swap
- proto/zap_codec/bench_test.go: drop comparative linearcodec bench;
head-to-head numbers live at bench/modes/zap_vs_codec — keep only
the ZAP-only sanity bench here so the package is testable without
re-importing the archived luxfi/codec module
Codec dep demoted to // indirect in go.mod (kept via transitive deps
that haven't re-tagged yet; will drop automatically once upstream
re-tags land).
ErrInsufficientLength now points to zapcodec.ErrInsufficientLength
which chains through errors.Join with wrappers.ErrInsufficientLength
(zapcodec v1.0.1) — assertions against either sentinel still match.
Wave 2G-Internal (#101). The xcodectest / pcodectest / pvmcodectest
helpers no longer import luxfi/codec / linearcodec / wrappers
directly. Instead they reach for proto/zap_codec which is the single
canonical construction site for the wire codecs (per Wave 2G-Wallet).
- xcodectest.New() now returns ParserCodecs bundles backed by
zap_codec.NewXVMParser — same *Manager satisfies both Codec and
Registry by shape.
- pcodectest.New{LinearCodec,LinearCodecWithTags,CodecManager,
DefaultCodecManager} + MaxInt{32,}Manager + sentinel re-exports
(ErrCantUnpackVersion, ErrInsufficientLength, VersionSize) +
type aliases (LinearCodec, CodecManager, Errs, Packer) now all
resolve through proto/zap_codec.
- pvmcodectest.New{Payload,Message,Warp,PVM{Runtime,Genesis,},
Metadata}Codec(s) construct via proto/zap_codec helpers — same
Manager is both Codec and LinearRegistry by shape.
Wire-format note: helpers now emit LE wire bytes (zapcodec). Tests
that anchored to legacy linearcodec BE bytes will need fixture
updates as part of the LP-023 ZAP-native activation cutover —
tracked separately for Wave 2G-Wallet.
Grep zero `"github.com/luxfi/codec"` imports in the 3 helper files.
Wave 2G-Wallet (#101). Single canonical construction site for the
wire codecs consumed by proto/p, proto/x, proto/p/warp,
proto/p/warp/payload, proto/p/warp/message, proto/p/block, and
proto/x/block. SDK wallet (sdk/wallet/chain/{p,x}) can construct
codec dependencies without importing github.com/luxfi/codec — the
codec backend choice is bound EXACTLY ONCE here.
Backend: github.com/luxfi/codec/zapcodec (little-endian reflection
codec). Versus the prior linearcodec wiring, this is a wire-format
break — every multi-byte field is byte-order inverted (BE → LE).
Forward-only, aligned with LP-023 ZAP-native activation
(zap_native.ZAPActivationUnix=0). No dual-mode emission. See
README.md for the canonical hex-dump comparison.
Surface:
- Manager (single-version): NewVersionedManager, plus convenience
constructors NewPVMRuntime / NewPVMGenesis / NewXVMParser /
NewWarp / NewPayload / NewMessage.
- MultiManager (multi-version dispatch): NewManager,
NewDefaultManager, NewMaxInt32Manager, NewMaxIntManager.
- Local interfaces Codec / Registry / LinearRegistry /
GeneralCodec / LinearCodec / ZAPCodec, type aliases for
Packer / Errs, byte-length constants ByteLen/ShortLen/IntLen/
LongLen/BoolLen — all backed by zapcodec, with zero external
luxfi/codec exposure at consumer call sites.
Tests: 16 unit tests, all pass. Bench compares marshal/unmarshal vs
linearcodec on a wallet-shaped tx — ZAP-native ~25% slower in the
reflection hot path (reflection cost dominates either way) but the
on-wire format is LE-native, unlocking the 25-130x speedups already
measured in bench/modes/zap_vs_codec for the raw ZAP parse fast path
(e.g. QUIC multiplex 397ns -> 16ns).
Closes the Wave 2A codec rip (#101). After this commit, proto/p
carries zero github.com/luxfi/codec imports — production AND tests.
$ grep -rE '"github\.com/luxfi/codec' proto/p --include='*.go'
(empty)
Test wiring is split across two helper packages to break the
test-time import cycle that proto/p/txs (the lowest layer in the
PVM dep graph) hit when reaching for the PVM codec helpers:
* proto/internal/pcodectest — codec-agnostic. Re-exports
codec.ErrCantUnpackVersion, codec.VersionSize, wrappers.Errs,
wrappers.ErrInsufficientLength, wrappers.Packer, linearcodec.Codec.
Provides NewLinearCodec / NewLinearCodecWithTags / NewCodecManager
/ NewDefaultCodecManager / MaxInt32Manager / MaxIntManager. NO
proto/p imports — so any proto/p test file can reach for it
without closing a cycle.
* proto/internal/pvmcodectest — PVM-aware. Imports proto/p/{block,
txs,warp,warp/message,warp/payload}. Provides NewPVMCodecs /
NewPVMRuntimeCodec / NewPVMGenesisCodec / NewMetadataCodec /
NewWarpCodec / NewMessageCodec / NewPayloadCodec / PVMCodecs.
Tests in proto/p/{block,state,utxo,network,validators,txs/executor,
txs/fee,txs/txheap,warp,warp/message,warp/payload} reach for this.
Tests inside proto/p/txs can't (would close the cycle) — they
build their own codec inline via pcodectest.NewLinearCodec +
txs.RegisterTypes (see p/txs/codec_test.go).
Production-side changes (forward-only):
* p/block/executor.Manager gains a BlockCodec() method and the
NewManager constructor takes a blockCodec parameter. Block.Options()
threads the manager's blockCodec into the options struct so the
derived commit/abort block constructors get the right codec.
* p/block/builder.builder.blockCodec() reads from the manager.
blockBuilder's two pack paths (packDurangoBlockTxs,
packQuasarBlockTxs) thread backend.WarpCodec into
state.PickFeeCalculator / fee.TxComplexity, and executeTx threads
backend.WarpCodec into txexecutor.VerifyWarpMessages.
* p/block/builder.NewRewardValidatorTx now takes (ctx, txCodec, txID)
instead of (ctx, txID). The codec comes from the manager via
builder.blockCodec(). External callers pass it explicitly.
* p/block/mock_block.go: MockBlock.initialize now takes (bytes, c)
to match the post-Wave-2A block.Block interface.
* p/txs/sort_helpers.go gains SortByCompare (exported wrapper around
the package-internal sortByCompare). Used by tests that need to
canonicalize input/output orderings under txs_test.
* p/utxo/verifier_test.go: handler literal now sets codec from
pcodectest.NewPVMRuntimeCodec — closed a long-standing latent nil
pointer dereference in TestVerifySpendUTXOs (every locked-output
case panicked because handler.codec was nil).
* p/state/metadata_validator_test.go: TestWriteValidatorMetadata
was rewritten in commit 767ff47 to assert require.True on
netDB.Has after a bare LoadValidatorMetadata — but Load doesn't
mark the entry as updated, so WriteValidatorMetadata was a no-op.
Restored correct semantics by calling SetUptime between Load and
Write.
Cascade fixes that landed alongside the test migration:
* Backend struct literals in proto/p/{block,txs}/executor's *_test.go
now populate TxCodec/WarpCodec/WarpMsgCodec/PayloadCodec. The
standardTxExecutor's ExportTx, RegisterL1ValidatorTx,
SetL1ValidatorWeightTx all reach for these codecs through the
Backend — previously the tests left them nil and panicked at the
first Marshal call.
* fxVMInt stubs in p/block/{builder,executor}/helpers_test.go and
p/txs/executor/helpers_test.go dropped the dead CodecRegistry()
method (secp256k1fx.VM is ZAP-native now — only Clock() and
Logger() remain).
* p/txs/txstest/wallet.go switched from txs.Codec.Unmarshal (which
is the type, not a value) to signer.Codec.Unmarshal — the SDK
signer's singleton codec is the natural shared codec for test
wallet UTXO and PChainOwner decode paths.
Results:
$ cd proto && go test ./p/...
ok github.com/luxfi/proto/p/api
ok github.com/luxfi/proto/p/block
ok github.com/luxfi/proto/p/block/builder
ok github.com/luxfi/proto/p/block/executor
ok github.com/luxfi/proto/p/config
ok github.com/luxfi/proto/p/genesis
ok github.com/luxfi/proto/p/network
ok github.com/luxfi/proto/p/reward
ok github.com/luxfi/proto/p/stakeable
ok github.com/luxfi/proto/p/state
ok github.com/luxfi/proto/p/status
ok github.com/luxfi/proto/p/txs
ok github.com/luxfi/proto/p/txs/executor
ok github.com/luxfi/proto/p/txs/fee
ok github.com/luxfi/proto/p/txs/txheap
ok github.com/luxfi/proto/p/utxo
ok github.com/luxfi/proto/p/validators
ok github.com/luxfi/proto/p/validators/fee
ok github.com/luxfi/proto/p/validators/validatorstest
ok github.com/luxfi/proto/p/warp
ok github.com/luxfi/proto/p/warp/message
ok github.com/luxfi/proto/p/warp/payload
Converted in-package tests to <pkg>_test packages, routed codec
construction through proto/internal/pcodectest, threaded codec
parameters through every test that calls block.New*Block /
genesis.New / genesis.Bytes / txs.NewSigned / txs.Tx.Initialize.
* proto/p/block/{abort,atomic,commit,proposal,standard}_block_test.go
and parse_test.go, serialization_test.go — all now in package
block_test. Codec construction via pcodectest.NewPVMCodecs().
Iterate over both runtime and genesis codecs in parse_test.go to
preserve the historical double-roundtrip check.
* proto/p/genesis/genesis_test.go — package genesis_test, codec param
threaded through genesis.New and Genesis.Bytes calls.
* proto/p/txs/txheap/by_end_time_test.go — package txheap_test,
uses pcodectest.NewPVMRuntimeCodec.
These four packages now grep-clean for github.com/luxfi/codec
imports. Test suites pass:
cd /Users/z/work/lux/proto && go test ./p/{block,api,warp/...,genesis,txs/txheap}/...
→ ok across the board
Still on luxfi/codec in test files (next batch, this commit doesn't
touch them):
proto/p/txs/{add_chain_validator,add_delegator,...}_test.go (16 in-pkg tests)
proto/p/txs/fee/complexity_test.go
proto/p/txs/tx_fuzz_test.go
proto/p/txs/executor/{helpers,standard_tx_executor,warp_verifier}_test.go
proto/p/state/state_test.go
proto/p/block/executor/{helpers,warp_verifier}_test.go
proto/p/block/builder/helpers_test.go
proto/p/network/network_test.go
proto/p/validators/manager_benchmark_test.go
All are mechanically tractable — same pattern as this commit, just
larger surface. Production proto/p (all .go files outside _test.go)
remains zero-import on luxfi/codec.
The validator/delegator metadata codec uses a versioned tag schema
(v0:"true" / v1:"true") that is SEPARATE from the block/genesis codec
and the runtime tx codec. My previous commit incorrectly aliased
state.MetadataCodec to block.Codec; this commit restores it as a
distinct codec.Manager-shaped interface.
* state.MetadataCodec is now a standalone interface type (codec.Manager
shape). state.New takes (genesisCodec block.Codec, txCodec txs.Codec,
metadataCodec MetadataCodec) — three distinct codec parameters,
each with its own type-registration story.
* proto/internal/pcodectest.NewMetadataCodec constructs the metadata
codec with the v0 + v1 linearcodec layouts. Returns codec.Manager
rather than state.MetadataCodec so the helper can stay independent
of proto/p/state (which would otherwise create a test-time import
cycle: pcodectest → state → state_test → pcodectest).
* state.go's metadata operations now use s.metadataCodec, not
s.genesisCodec. Previously the sed sweep folded both into
genesisCodec — this commit teases them back apart.
* state.statetest.New wires the new metadataCodec parameter through.
* parseValidatorMetadata, parseDelegatorMetadata,
WriteValidatorMetadata, writeDelegatorMetadata, writeCurrentDelegatorDiff
all take MetadataCodec as a parameter.
Test files (_test.go) still on luxfi/codec — Wave 2A test sweep
continues in the next commit.
Wave 2A continuation. Removes github.com/luxfi/codec from every
production .go file under proto/p — the package-level Codec /
GenesisCodec singletons are gone, replaced by Codec interface types
(structurally identical to codec.Manager) that callers thread in via
constructor parameters.
Key API changes (forward-only, no shim):
* txs.Codec / Registry / LinearRegistry interface types (codec.Manager
shape). txs.RegisterTypes / RegisterApricotTypes / RegisterBanffTypes
/ RegisterDurangoTypes / RegisterQuasarTypes take a LinearRegistry.
txs.NewSigned / Tx.Initialize / Tx.Sign / txs.Parse all take
txs.Codec.
* block.Codec / Registry / LinearRegistry. Same shape. block.NewParser
is unused (use block.RegisterTypes against your linear registry
directly). block.NewApricot*Block / block.NewBanff*Block all take a
block.Codec. Block.initialize(bytes []byte, c Codec).
* block.RegisterTypes is the canonical full-history block + tx
registrar. proto/p/state.RegisterStateBlockType is the legacy
stateBlk registrar (no longer side-effects via init()).
* warp / warp/message / warp/payload codecs the same shape. Every
parse / new / *.Bytes / *.Initialize takes a Codec.
* fee.TxComplexity / WarpComplexity / NewDynamicCalculator take a
warp.Codec for L1-validator message parsing.
* genesis.New / genesis.Parse / Genesis.Bytes take a block.Codec.
genesistest.New / NewBytes likewise.
* state.New takes (genesisCodec block.Codec, txCodec txs.Codec) — the
state struct holds both fields. state.PickFeeCalculator takes a
warpCodec for the dynamic-calculator path.
* utxo.NewHandler / NewVerifier take a txs.Codec for owner-id marshalling.
* txs/executor.Backend gains TxCodec / WarpCodec / WarpMsgCodec /
PayloadCodec fields. block/executor.VerifyWarpMessages takes a
warpCodec; the block-builder NewBanff*Block options.codec is wired
through.
* network.New takes (txCodec txs.Codec, warpCodec warp.Codec) for the
txMarshaller and warpSignerAdapter.
* proto/internal/pcodectest gains NewPVMCodecs / NewPVMRuntimeCodec /
NewPVMGenesisCodec — single source of truth for test wiring.
Cascade breaks (Wave 2D, not fixed in this commit):
sdk/wallet/chain/p/signer/visitor.go — txs.Codec.Marshal calls
sdk/wallet/chain/p/builder/builder.go — fee.WarpComplexity calls
Production-side proto/p is now zero-import on github.com/luxfi/codec:
$ grep -rE '"github\.com/luxfi/codec' proto/p --include='*.go' | grep -v _test.go
(empty)
Test files (_test.go) are still on github.com/luxfi/codec — they will
migrate in the next commit along with conversion to package <pkg>_test
and routing through proto/internal/pcodectest.
Wave 2A of the codec rip (#101). Eliminates github.com/luxfi/codec imports
from the api/, warp/, warp/message/, and warp/payload/ subtrees of proto/p.
* api/{height,staking}.go now use github.com/luxfi/node/utils/json instead
of github.com/luxfi/codec/jsonrpc — same byte format, no transitive
codec dependency.
* warp/codec.go, warp/payload/codec.go, warp/message/codec.go each define
a local Codec / Registry interface (structurally identical to
codec.Manager / codec.Registry) and a RegisterTypes(r) function. The
package-level Codec singleton is gone — every Parse*, New*, *.Initialize,
TeleportMessage.{ToWarpMessage,DecryptPayload}, TeleportTransferPayload.
Bytes and ParseTransferPayload now take a Codec parameter and the
caller threads it through.
* proto/internal/pcodectest is the canonical test wiring (mirrors
proto/internal/xcodectest from Wave 1A). It exposes NewPayloadCodec,
NewMessageCodec, and NewWarpCodec — each constructs a linearcodec-
backed codec.Manager with the appropriate types pre-registered.
* In-package warp tests converted to `package warp_test` to avoid the
cycle pcodectest → warp → warp/*_test.go → pcodectest. warp's prod
`test_helpers.go` was renamed to `_test.go` (it was already test-only
in spirit) and unexported helpers stay unexported in `warp_test`. The
dead `test_signer_test.go` (//go:build test, unused) was removed.
* No backwards-compat shim. No deprecated alias. proto/p/api/warp/* is
now byte-compatible with the legacy wire format but constructs its
codec dependency externally.
Cascade breaks (Wave 2D territory, not fixed here):
sdk/wallet/chain/p/wallet/backend_visitor.go — warp.ParseMessage,
payload.ParseAddressedCall now require Codec
sdk/validatormanager/root.go — payload.* calls need Codec
vm/rpc/{,dag/,chain/}warp_adapter.go — warp.* calls need Codec
Grep zero confirmation under the subtrees migrated:
proto/p/api/ — no codec import
proto/p/warp/, proto/p/warp/message/, proto/p/warp/payload/ — no
codec import (signertest subpackage also clean)
Decouples the platformvm ZAP TxKind dispatch from luxfi/node so
proto/p can consume it directly for the codec rip (#101 Wave 1B).
Previously the package lived downstream of proto, making the proto/p
migration architecturally impossible.
Package name kept as zap_native (236 outer-luxfi/zap references would
otherwise need aliasing). Directory matches. Public sub-package (not
internal/) so node's 8 existing consumers can also import it via the
new path:
github.com/luxfi/node/vms/platformvm/txs/zap_native
↓
github.com/luxfi/proto/zap_native
Standalone tests pass:
ok github.com/luxfi/proto/zap_native
Salvages Wave 1A agent's incomplete work (27 files, 387+ lines) plus
the test fixups needed to make the suite green after the migration.
Changes:
- x/state/state_test.go: register secp256k1fx-only ParseUTXO factory
so utxo.GetUTXO can decode wire bytes back to *lux.UTXO (production
uses node/vms/components/lux/utxo_parser.go; test environment needs
the equivalent).
- x/txs/executor/semantic_verifier_test.go: update one remaining
NewCustomParser call site to the new 5-arg signature (xcodectest.New
+ xlog.Noop). The other 3 call sites were already migrated.
All proto/x and proto/p test packages now pass:
ok github.com/luxfi/proto/x/state
ok github.com/luxfi/proto/x/txs/executor
ok github.com/luxfi/proto/p/state
ok github.com/luxfi/proto/p/block/executor
ok github.com/luxfi/proto/p/txs/executor
proto/x codec importer count: 19 → 4. Remaining 4 are utility shims
(jsonrpc numerics, metrics) — Wave 1B continuation.
- safemath.Add64/Mul64 → Add/Mul (Go generics; same wire/bounds
behaviour, fewer per-width copies). Sweep across p/{reward,utxo,txs}
and the x-side test helpers.
- lux.SortTransferableOutputs / SyntacticVerifier UTXO/Output helpers:
drop the threaded Codec arg; sort key is now Bytes()+assetID, no
codec roundtrip per compare. Callers in p/utxo/handler.go,
p/txs/{add_*,base_tx,builder,executor/*}, p/state, and
x/txs/executor/syntactic_verifier follow.
- stakeable.LockOut: implement Bytes() returning
0xFF || BE(Locktime) || inner.Bytes(). 0xFF marker keeps locked
outputs sorted strictly AFTER unlocked fxs primitives, preserving
the legacy ordering invariant the SyntacticVerify expects.
- Update test helpers in p/block/{builder,executor}, p/network, p/txs
to construct outputs without the codec arg and rely on the new sort.
Companion to luxfi/{runtime,consensus,node}: rename downstream
consumers in proto so the build agrees post upstream rename.
Includes local replace directives for runtime + consensus; drop
once those modules tag releases.
Companion to luxfi/{runtime,consensus,node}: rename downstream
consumers in proto so the build agrees post upstream rename.
Includes local replace directives for runtime + consensus; drop
once those modules tag releases.
Per canonical no-subnet rule. The wire ping/pong carries per-chain
uptime; the type name `SubnetUptime` was a vestigial mismatch. Renamed
to `ChainUptime` everywhere in node/zap/p2p:
type SubnetUptime → ChainUptime (with same ChainId + Uptime fields)
[]*SubnetUptime → []*ChainUptime
SubnetUptimes → ChainUptimes (field on Ping + Pong)
GetSubnetUptimes → GetChainUptimes
Wire encoding (codec.go) preserved byte-identical — only the Go field
names changed. Downstream consumers (lux/node alias) update in the
companion PR.
Per canonical no-subnet rule. The wire ping/pong carries per-chain
uptime; the type name `SubnetUptime` was a vestigial mismatch. Renamed
to `ChainUptime` everywhere in node/zap/p2p:
type SubnetUptime → ChainUptime (with same ChainId + Uptime fields)
[]*SubnetUptime → []*ChainUptime
SubnetUptimes → ChainUptimes (field on Ping + Pong)
GetSubnetUptimes → GetChainUptimes
Wire encoding (codec.go) preserved byte-identical — only the Go field
names changed. Downstream consumers (lux/node alias) update in the
companion PR.
Pulls the 5 node-internal ZAP schemas (platformvm, vm, p2p, sync) out of
the luxfi/node module subpath and into the canonical luxfi/proto module
at proto/node/zap/. Consumer import paths updated in lux/node — same
sweep removed the redundant proto/zap/ subdir there.
Module path is github.com/luxfi/proto and has been for a while. The
directory was historically named protocol/ — that drift caused
ad-hoc per-repo proto/ subdirs to grow (lux/p2p/proto, lux/node/proto,
lux/vm/proto, lux/api/schema/proto). README documents:
- this dir is the canonical schema home
- ZAP canonical, -tags grpc legacy (same pattern as lux/p2p/proto/{zap,pb})
- scattered per-repo proto/ subdirs are legacy, migrate on natural touch
Hanzo mirrors this at ~/work/hanzo/proto.
Same shape as the fhe v1.7.6 fix: local-direct git checkout produces
different dirhash than proxy.golang.org (likely tag force-push or
filtered content). sum.golang.org records the proxy hash; CI uses
proxy and was failing checksum verification against the stale
direct-hash recorded in go.sum.
Pin the canonical proxy hashes (h1:u8TF4g... and h1:tT2WF2...).
- New .github/workflows/ci.yml runs `go build ./...` and `go vet` on the
packages whose tests currently compile (skips p/block/* and
x/txs/executor — those test stubs were absorbed from luxfi/proto and
need rework to satisfy current luxfi/validators.State and
github.com/luxfi/protocol/p/block/executor backend{} shape).
- Drop unused context import in x/txs/operation_test.go
- Extend semantic_verifier_test.go testValidatorState stub to satisfy
the full luxfi/validators.State surface (add GetCurrentValidators,
GetWarpValidatorSet, GetWarpValidatorSets; fix GetValidatorSet
signature to take context + return validators.GetValidatorOutput).
Tests in x/txs/executor still panic at runtime (secp256k1fx.Initialize
on nil codec registry — pre-existing, separate fix). Build is green;
ship the workflow so we have a baseline.
Folds the transport-agnostic rpcdb wire types (HasRequest/Response,
GetRequest/Response, PutRequest/Response, DeleteRequest/Response,
WriteBatchRequest/Response, CompactRequest/Response, CloseRequest/Response,
HealthCheckResponse, NewIteratorWithStartAndPrefixRequest/Response,
IteratorNextRequest/Response, IteratorErrorRequest/Response,
IteratorReleaseRequest/Response and the Error enum) into luxfi/protocol —
the canonical home for wire types and service specs in the Lux ecosystem.
Drops the local-only luxfi/proto module which had no upstream and was only
consumed via a replace directive in luxfi/node and luxfi/vm. One canonical
service-spec home, one and only one way to depend on it.
Layered topology unchanged:
Layer A — wire framing (github.com/luxfi/api/zap)
Layer B — service spec (this package) (github.com/luxfi/protocol/rpcdb)
Layer C — service impl + transport (github.com/luxfi/node/db/rpcdb)
Folds the transport-agnostic rpcdb wire types (HasRequest/Response,
GetRequest/Response, PutRequest/Response, DeleteRequest/Response,
WriteBatchRequest/Response, CompactRequest/Response, CloseRequest/Response,
HealthCheckResponse, NewIteratorWithStartAndPrefixRequest/Response,
IteratorNextRequest/Response, IteratorErrorRequest/Response,
IteratorReleaseRequest/Response and the Error enum) into luxfi/protocol —
the canonical home for wire types and service specs in the Lux ecosystem.
Drops the local-only luxfi/proto module which had no upstream and was only
consumed via a replace directive in luxfi/node and luxfi/vm. One canonical
service-spec home, one and only one way to depend on it.
Layered topology unchanged:
Layer A — wire framing (github.com/luxfi/api/zap)
Layer B — service spec (this package) (github.com/luxfi/protocol/rpcdb)
Layer C — service impl + transport (github.com/luxfi/node/db/rpcdb)
The original warp.go consumed protobuf types from luxfi/node/proto/
pb/platformvm — a package that now ships only a stub package
declaration under //go:build grpc. The actual protobuf-generated
L1ValidatorRegistrationJustification + ChainIDIndex types are not
in tree, so the legacy verification path doesn't compile against
the canonical default build.
Replace with a minimal struct that still satisfies warp.Verifier
(so network.go's signature handler wiring compiles) but whose Verify
method returns ErrWarpVerificationNotImplemented. Callers building
with -tags grpc + a regenerated pb tree can layer the real impl in
a tagged file alongside.
This is a no-op for current default builds — warp signature
verification was already unreachable because the pb dependency
didn't compile.
node/proto/pb/platformvm carries //go:build grpc so its protobuf-
generated types only compile under -tags grpc. warp.go consumes
those types; without the same tag, the package failed to build at
the platformvm import. Gate this file the same way: the rest of
p/network builds clean by default, and warp validator-registration
verification opts in via -tags grpc when protobuf cross-stack
compat is needed.