mirror of
https://github.com/luxfi/zap.git
synced 2026-10-30 15:04:16 +00:00
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.)
211 lines
12 KiB
JSON
211 lines
12 KiB
JSON
{
|
|
"lp": "lp-182",
|
|
"description": "Lux consensus wire (LP-182 §Wire schemas). 8 envelopes declared; 5 deferred pending spec amendment. Schema IDs 0x01..0x0D in the consensus wire registry (~/work/lux/consensus/pkg/wire/zap/schemas.go is the canonical source-of-truth once landed). Each bytes-tail occupies an 8-byte slot in the fixed section (Off uint32 + Len uint32), per ZAP SetBytes layout (builder.go:208). The 0x01..0x0D kind bytes are local to the consensus wire registry, not the global zapv2.DefaultRegistry — skip_registry suppresses init() registration that would otherwise collide with LP-186 chains-VM kinds.",
|
|
"skip_registry": true,
|
|
"schemas": [
|
|
{
|
|
"wire_name": "QuasarCert",
|
|
"go_name": "QuasarCertSchema",
|
|
"kind": "0x01",
|
|
"size": 72,
|
|
"package": "consensuswire",
|
|
"out": "lp-182/quasar_cert_zap.go",
|
|
"fields": [
|
|
{ "name": "Epoch", "type": "uint64", "offset": 8 },
|
|
{ "name": "FinalityUnixNano", "type": "int64", "offset": 16 },
|
|
{ "name": "Validators", "type": "uint32", "offset": 24 },
|
|
{ "name": "BLSOff", "type": "uint32", "offset": 32 },
|
|
{ "name": "BLSLen", "type": "uint32", "offset": 36 },
|
|
{ "name": "CoronaOff", "type": "uint32", "offset": 40 },
|
|
{ "name": "CoronaLen", "type": "uint32", "offset": 44 },
|
|
{ "name": "PulsarOff", "type": "uint32", "offset": 48 },
|
|
{ "name": "PulsarLen", "type": "uint32", "offset": 52 },
|
|
{ "name": "MagnetarOff", "type": "uint32", "offset": 56 },
|
|
{ "name": "MagnetarLen", "type": "uint32", "offset": 60 },
|
|
{ "name": "MLDSARollupOff", "type": "uint32", "offset": 64 },
|
|
{ "name": "MLDSARollupLen", "type": "uint32", "offset": 68 }
|
|
]
|
|
},
|
|
{
|
|
"wire_name": "QBlock",
|
|
"go_name": "QBlockSchema",
|
|
"kind": "0x02",
|
|
"size": 512,
|
|
"package": "consensuswire",
|
|
"out": "lp-182/qblock_zap.go",
|
|
"fields": [
|
|
{ "name": "Version", "type": "uint16", "offset": 2 },
|
|
{ "name": "NetworkID", "type": "uint32", "offset": 4 },
|
|
{ "name": "ChainID", "type": "uint32", "offset": 8 },
|
|
{ "name": "Height", "type": "uint64", "offset": 16 },
|
|
{ "name": "RoundOrView", "type": "uint32", "offset": 24 },
|
|
{ "name": "ProfileID", "type": "uint32", "offset": 28 },
|
|
{ "name": "ParentQBlockHash", "type": "bytes32", "offset": 32 },
|
|
{ "name": "StateRoot", "type": "bytes48", "offset": 64 },
|
|
{ "name": "ZChainStateRoot", "type": "bytes48", "offset": 112 },
|
|
{ "name": "ValidatorSetRoot", "type": "bytes48", "offset": 160 },
|
|
{ "name": "CommitteeRoot", "type": "bytes48", "offset": 208 },
|
|
{ "name": "DKGTranscriptRoot", "type": "bytes48", "offset": 256 },
|
|
{ "name": "GroupPublicKeyHash", "type": "bytes48", "offset": 304 },
|
|
{ "name": "PayloadRoot", "type": "bytes48", "offset": 352 },
|
|
{ "name": "DARoot", "type": "bytes48", "offset": 400 },
|
|
{ "name": "ProofPolicyID", "type": "uint8", "offset": 448 },
|
|
{ "name": "ProofBackendID", "type": "uint8", "offset": 449 },
|
|
{ "name": "ProofFormatID", "type": "uint8", "offset": 450 },
|
|
{ "name": "VerifierID", "type": "uint16", "offset": 451 },
|
|
{ "name": "HashSuiteID", "type": "uint8", "offset": 453 },
|
|
{ "name": "IdentitySchemeID", "type": "uint8", "offset": 454 },
|
|
{ "name": "FinalitySchemeID", "type": "uint8", "offset": 455 },
|
|
{ "name": "SignerBitmapCommitment", "type": "bytes48", "offset": 456 },
|
|
{ "name": "PulsarMSigOff", "type": "uint32", "offset": 504 },
|
|
{ "name": "PulsarMSigLen", "type": "uint32", "offset": 508 }
|
|
]
|
|
},
|
|
{
|
|
"wire_name": "WitnessProof",
|
|
"go_name": "WitnessProofSchema",
|
|
"kind": "0x03",
|
|
"size": 96,
|
|
"package": "consensuswire",
|
|
"out": "lp-182/witness_proof_zap.go",
|
|
"fields": [
|
|
{ "name": "BlockHeight", "type": "uint64", "offset": 8 },
|
|
{ "name": "Timestamp", "type": "uint64", "offset": 16 },
|
|
{ "name": "CommitmentOff", "type": "uint32", "offset": 24 },
|
|
{ "name": "CommitmentLen", "type": "uint32", "offset": 28 },
|
|
{ "name": "PathOff", "type": "uint32", "offset": 32 },
|
|
{ "name": "PathLen", "type": "uint32", "offset": 36 },
|
|
{ "name": "OpeningProofOff", "type": "uint32", "offset": 40 },
|
|
{ "name": "OpeningProofLen", "type": "uint32", "offset": 44 },
|
|
{ "name": "PQSignatureOff", "type": "uint32", "offset": 48 },
|
|
{ "name": "PQSignatureLen", "type": "uint32", "offset": 52 },
|
|
{ "name": "BLSAggregateOff", "type": "uint32", "offset": 56 },
|
|
{ "name": "BLSAggregateLen", "type": "uint32", "offset": 60 },
|
|
{ "name": "CoronaBitsOff", "type": "uint32", "offset": 64 },
|
|
{ "name": "CoronaBitsLen", "type": "uint32", "offset": 68 },
|
|
{ "name": "ValidatorSetOff", "type": "uint32", "offset": 72 },
|
|
{ "name": "ValidatorSetLen", "type": "uint32", "offset": 76 },
|
|
{ "name": "StateRootOff", "type": "uint32", "offset": 80 },
|
|
{ "name": "StateRootLen", "type": "uint32", "offset": 84 }
|
|
]
|
|
},
|
|
{
|
|
"wire_name": "MagnetarAggregateCert",
|
|
"go_name": "MagnetarAggregateCertSchema",
|
|
"kind": "0x04",
|
|
"size": 32,
|
|
"package": "consensuswire",
|
|
"out": "lp-182/magnetar_aggregate_zap.go",
|
|
"fields": [
|
|
{ "name": "Mode", "type": "uint8", "offset": 1 },
|
|
{ "name": "SignerCount", "type": "uint32", "offset": 4 },
|
|
{ "name": "SignersOff", "type": "uint32", "offset": 8 },
|
|
{ "name": "SignersLen", "type": "uint32", "offset": 12 },
|
|
{ "name": "PubKeysOff", "type": "uint32", "offset": 16 },
|
|
{ "name": "PubKeysLen", "type": "uint32", "offset": 20 },
|
|
{ "name": "SigsOff", "type": "uint32", "offset": 24 },
|
|
{ "name": "SigsLen", "type": "uint32", "offset": 28 }
|
|
]
|
|
},
|
|
{
|
|
"wire_name": "PolarisLegs",
|
|
"go_name": "PolarisLegsSchema",
|
|
"kind": "0x05",
|
|
"size": 72,
|
|
"package": "consensuswire",
|
|
"out": "lp-182/polaris_legs_zap.go",
|
|
"fields": [
|
|
{ "name": "Epoch", "type": "uint64", "offset": 8 },
|
|
{ "name": "FinalityUnixNano", "type": "int64", "offset": 16 },
|
|
{ "name": "Validators", "type": "uint32", "offset": 24 },
|
|
{ "name": "BLSOff", "type": "uint32", "offset": 32 },
|
|
{ "name": "BLSLen", "type": "uint32", "offset": 36 },
|
|
{ "name": "PulsarOff", "type": "uint32", "offset": 40 },
|
|
{ "name": "PulsarLen", "type": "uint32", "offset": 44 },
|
|
{ "name": "CoronaOff", "type": "uint32", "offset": 48 },
|
|
{ "name": "CoronaLen", "type": "uint32", "offset": 52 },
|
|
{ "name": "MagnetarOff", "type": "uint32", "offset": 56 },
|
|
{ "name": "MagnetarLen", "type": "uint32", "offset": 60 },
|
|
{ "name": "MLDSARollupOff", "type": "uint32", "offset": 64 },
|
|
{ "name": "MLDSARollupLen", "type": "uint32", "offset": 68 }
|
|
]
|
|
},
|
|
{
|
|
"wire_name": "QuasarSig",
|
|
"go_name": "QuasarSigSchema",
|
|
"kind": "0x06",
|
|
"size": 56,
|
|
"package": "consensuswire",
|
|
"out": "lp-182/quasar_sig_zap.go",
|
|
"fields": [
|
|
{ "name": "IsThreshold", "type": "uint8", "offset": 1 },
|
|
{ "name": "SignerIndex", "type": "int32", "offset": 4 },
|
|
{ "name": "BLSOff", "type": "uint32", "offset": 8 },
|
|
{ "name": "BLSLen", "type": "uint32", "offset": 12 },
|
|
{ "name": "CoronaOff", "type": "uint32", "offset": 16 },
|
|
{ "name": "CoronaLen", "type": "uint32", "offset": 20 },
|
|
{ "name": "PulsarOff", "type": "uint32", "offset": 24 },
|
|
{ "name": "PulsarLen", "type": "uint32", "offset": 28 },
|
|
{ "name": "MLDSAOff", "type": "uint32", "offset": 32 },
|
|
{ "name": "MLDSALen", "type": "uint32", "offset": 36 },
|
|
{ "name": "ValidatorIDOff", "type": "uint32", "offset": 40 },
|
|
{ "name": "ValidatorIDLen", "type": "uint32", "offset": 44 },
|
|
{ "name": "PublicKeyOff", "type": "uint32", "offset": 48 },
|
|
{ "name": "PublicKeyLen", "type": "uint32", "offset": 52 }
|
|
]
|
|
},
|
|
{
|
|
"wire_name": "TxAuthEnvelope",
|
|
"go_name": "TxAuthEnvelopeSchema",
|
|
"kind": "0x0A",
|
|
"size": 336,
|
|
"package": "consensuswire",
|
|
"out": "lp-182/tx_auth_envelope_zap.go",
|
|
"fields": [
|
|
{ "name": "ProfileID", "type": "uint8", "offset": 1 },
|
|
{ "name": "WalletSchemeID", "type": "uint8", "offset": 2 },
|
|
{ "name": "HashSuiteID", "type": "uint8", "offset": 3 },
|
|
{ "name": "Version", "type": "uint16", "offset": 4 },
|
|
{ "name": "ChainID", "type": "uint32", "offset": 8 },
|
|
{ "name": "NetworkID", "type": "uint32", "offset": 12 },
|
|
{ "name": "Nonce", "type": "uint64", "offset": 16 },
|
|
{ "name": "ExpiryHeight", "type": "uint64", "offset": 24 },
|
|
{ "name": "GasLimit", "type": "uint64", "offset": 32 },
|
|
{ "name": "AccountID", "type": "bytes48", "offset": 40 },
|
|
{ "name": "FeePayer", "type": "bytes48", "offset": 88 },
|
|
{ "name": "MaxFee", "type": "bytes32", "offset": 136 },
|
|
{ "name": "CallRoot", "type": "bytes32", "offset": 168 },
|
|
{ "name": "AccessListRoot", "type": "bytes32", "offset": 200 },
|
|
{ "name": "ZIdentityRoot", "type": "bytes32", "offset": 232 },
|
|
{ "name": "AccountStateRoot", "type": "bytes32", "offset": 264 },
|
|
{ "name": "PublicKeyRef", "type": "bytes32", "offset": 296 },
|
|
{ "name": "SignatureOff", "type": "uint32", "offset": 328 },
|
|
{ "name": "SignatureLen", "type": "uint32", "offset": 332 }
|
|
]
|
|
},
|
|
{
|
|
"wire_name": "PQPermit",
|
|
"go_name": "PQPermitSchema",
|
|
"kind": "0x0B",
|
|
"size": 232,
|
|
"package": "consensuswire",
|
|
"out": "lp-182/pq_permit_zap.go",
|
|
"fields": [
|
|
{ "name": "ProfileID", "type": "uint8", "offset": 1 },
|
|
{ "name": "AuthSchemeID", "type": "uint8", "offset": 2 },
|
|
{ "name": "HashSuiteID", "type": "uint8", "offset": 3 },
|
|
{ "name": "Version", "type": "uint16", "offset": 4 },
|
|
{ "name": "ChainID", "type": "uint32", "offset": 8 },
|
|
{ "name": "Nonce", "type": "uint64", "offset": 16 },
|
|
{ "name": "Deadline", "type": "uint64", "offset": 24 },
|
|
{ "name": "VerifyingContract", "type": "bytes48", "offset": 32 },
|
|
{ "name": "OwnerAccountID", "type": "bytes48", "offset": 80 },
|
|
{ "name": "Spender", "type": "bytes48", "offset": 128 },
|
|
{ "name": "Value", "type": "bytes32", "offset": 176 },
|
|
{ "name": "SignatureOff", "type": "uint32", "offset": 224 },
|
|
{ "name": "SignatureLen", "type": "uint32", "offset": 228 }
|
|
]
|
|
}
|
|
]
|
|
}
|