Files
zeekay af88152c6f rename v2 -> v1: the typed-view API + codegen is the canonical 1.0 (no v2, ever)
There is one perfected typed ZAP layer and it lives at github.com/luxfi/zap/v1 —
forwards-only, no backwards-compat baggage, never a breaking major. Mechanical,
behavior-preserving: v2/ -> v1/ (git mv), package zapv2 -> zapv1, import path
.../zap/v2 -> .../zap/v1 (incl. the codegen's emitted banner + import so
generated files reference /v1). Codegen golden tests pass; typed layer vets
clean. (Pre-existing CGO 'resolv' link failures in the root package are
unrelated env noise.)
2026-06-23 15:05:15 -07:00

216 lines
7.2 KiB
JSON

{
"lp": "lp-201",
"description": "ZAP P2P transport — 16 stream types (LP-201 §Wire schemas). Schema IDs 0xD0..0xDF.",
"schemas": [
{
"wire_name": "ConsensusVote",
"go_name": "ConsensusVoteSchema",
"kind": "0xD0",
"size": 65,
"package": "p2pwire",
"out": "lp-201/consensus_vote_zap.go",
"fields": [
{ "name": "Round", "type": "uint64", "offset": 1 },
{ "name": "BlockID", "type": "bytes32", "offset": 9 },
{ "name": "SignerID", "type": "bytes20", "offset": 41 },
{ "name": "SigOff", "type": "uint32", "offset": 61 }
]
},
{
"wire_name": "ConsensusProposal",
"go_name": "ConsensusProposalSchema",
"kind": "0xD1",
"size": 105,
"package": "p2pwire",
"out": "lp-201/consensus_proposal_zap.go",
"fields": [
{ "name": "Round", "type": "uint64", "offset": 1 },
{ "name": "BlockID", "type": "bytes32", "offset": 9 },
{ "name": "ParentID", "type": "bytes32", "offset": 41 },
{ "name": "PayloadHash", "type": "bytes32", "offset": 73 }
]
},
{
"wire_name": "ConsensusCert",
"go_name": "ConsensusCertSchema",
"kind": "0xD2",
"size": 53,
"package": "p2pwire",
"out": "lp-201/consensus_cert_zap.go",
"fields": [
{ "name": "Round", "type": "uint64", "offset": 1 },
{ "name": "BlockID", "type": "bytes32", "offset": 9 },
{ "name": "SigBitmapOff", "type": "uint32", "offset": 41 },
{ "name": "AggSigOff", "type": "uint32", "offset": 45 },
{ "name": "WitnessTier", "type": "uint8", "offset": 49 },
{ "name": "ReservedB", "type": "uint8", "offset": 50 },
{ "name": "ReservedC", "type": "uint8", "offset": 51 },
{ "name": "ReservedD", "type": "uint8", "offset": 52 }
]
},
{
"wire_name": "BlockRequest",
"go_name": "BlockRequestSchema",
"kind": "0xD3",
"size": 33,
"package": "p2pwire",
"out": "lp-201/block_request_zap.go",
"fields": [
{ "name": "BlockID", "type": "bytes32", "offset": 1 }
]
},
{
"wire_name": "BlockResponse",
"go_name": "BlockResponseSchema",
"kind": "0xD4",
"size": 14,
"package": "p2pwire",
"out": "lp-201/block_response_zap.go",
"fields": [
{ "name": "Encoding", "type": "uint8", "offset": 1 },
{ "name": "BlockOff", "type": "uint32", "offset": 2 },
{ "name": "ChunksOff", "type": "uint32", "offset": 6 },
{ "name": "ChunkCount", "type": "uint32", "offset": 10 }
]
},
{
"wire_name": "TxGossip",
"go_name": "TxGossipSchema",
"kind": "0xD5",
"size": 42,
"package": "p2pwire",
"out": "lp-201/tx_gossip_zap.go",
"fields": [
{ "name": "TxID", "type": "bytes32", "offset": 1 },
{ "name": "Encoding", "type": "uint8", "offset": 33 },
{ "name": "TxBytesOff", "type": "uint32", "offset": 34 },
{ "name": "ContentHashOff", "type": "uint32", "offset": 38 }
]
},
{
"wire_name": "TxRequest",
"go_name": "TxRequestSchema",
"kind": "0xD6",
"size": 33,
"package": "p2pwire",
"out": "lp-201/tx_request_zap.go",
"fields": [
{ "name": "TxID", "type": "bytes32", "offset": 1 }
]
},
{
"wire_name": "TxResponse",
"go_name": "TxResponseSchema",
"kind": "0xD7",
"size": 5,
"package": "p2pwire",
"out": "lp-201/tx_response_zap.go",
"fields": [
{ "name": "TxBytesOff", "type": "uint32", "offset": 1 }
]
},
{
"wire_name": "FilterAdvertise",
"go_name": "FilterAdvertiseSchema",
"kind": "0xD8",
"size": 9,
"package": "p2pwire",
"out": "lp-201/filter_advertise_zap.go",
"fields": [
{ "name": "Generation", "type": "uint32", "offset": 1 },
{ "name": "FilterOff", "type": "uint32", "offset": 5 }
]
},
{
"wire_name": "SnapshotAdvertise",
"go_name": "SnapshotAdvertiseSchema",
"kind": "0xD9",
"size": 73,
"package": "p2pwire",
"out": "lp-201/snapshot_advertise_zap.go",
"fields": [
{ "name": "Height", "type": "uint64", "offset": 1 },
{ "name": "StateRoot", "type": "bytes32", "offset": 9 },
{ "name": "ContentHash", "type": "bytes32", "offset": 41 }
]
},
{
"wire_name": "ChunkRequest",
"go_name": "ChunkRequestSchema",
"kind": "0xDA",
"size": 33,
"package": "p2pwire",
"out": "lp-201/chunk_request_zap.go",
"fields": [
{ "name": "ContentHash", "type": "bytes32", "offset": 1 }
]
},
{
"wire_name": "ChunkResponse",
"go_name": "ChunkResponseSchema",
"kind": "0xDB",
"size": 5,
"package": "p2pwire",
"out": "lp-201/chunk_response_zap.go",
"fields": [
{ "name": "ChunkBytesOff", "type": "uint32", "offset": 1 }
]
},
{
"wire_name": "PeerInfo",
"go_name": "PeerInfoSchema",
"kind": "0xDC",
"size": 45,
"package": "p2pwire",
"out": "lp-201/peer_info_zap.go",
"fields": [
{ "name": "NodeID", "type": "bytes20", "offset": 1 },
{ "name": "Version", "type": "uint64", "offset": 21 },
{ "name": "ChainSetOff", "type": "uint32", "offset": 29 },
{ "name": "PubKeyOff", "type": "uint32", "offset": 33 },
{ "name": "SigOff", "type": "uint32", "offset": 37 },
{ "name": "Reserved", "type": "uint32", "offset": 41 }
]
},
{
"wire_name": "DHTFindNode",
"go_name": "DHTFindNodeSchema",
"kind": "0xDD",
"size": 37,
"package": "p2pwire",
"out": "lp-201/dht_find_node_zap.go",
"fields": [
{ "name": "TargetID", "type": "bytes32", "offset": 1 },
{ "name": "ClosestOff", "type": "uint32", "offset": 33 }
]
},
{
"wire_name": "DHTFindValue",
"go_name": "DHTFindValueSchema",
"kind": "0xDE",
"size": 41,
"package": "p2pwire",
"out": "lp-201/dht_find_value_zap.go",
"fields": [
{ "name": "ContentHash", "type": "bytes32", "offset": 1 },
{ "name": "ValueOff", "type": "uint32", "offset": 33 },
{ "name": "ClosestOff", "type": "uint32", "offset": 37 }
]
},
{
"wire_name": "DHTStore",
"go_name": "DHTStoreSchema",
"kind": "0xDF",
"size": 42,
"package": "p2pwire",
"out": "lp-201/dht_store_zap.go",
"fields": [
{ "name": "ContentHash", "type": "bytes32", "offset": 1 },
{ "name": "ValueOff", "type": "uint32", "offset": 33 },
{ "name": "TTLSec", "type": "uint32", "offset": 37 },
{ "name": "Ack", "type": "uint8", "offset": 41 }
]
}
]
}