Files
zeekay 7cf87b230b node-unified is the node
The module already called itself github.com/luxfi/node while containing no node
in Go: cmd/luxd was twenty-one lines that printed the size of a few types, and
the Go column of the matrix measured a VM plugin. A repo that fetches the thing
it claims to be has not replaced it, so the Go sources move in — 1515 files,
the daemon and everything under it — and the build reaches outside this module
for nothing.

Rust and C++ sit beside it unchanged and are still measured against it by the
differential. That is the point of one repo: the reference implementation and
the two ports are the same checkout, so parity is a thing you can run rather
than a thing you assert.

Verified: builds, and the closure carries no lux-private — checked at build time
rather than believed. The daemon starts twelve chains on a local network
(P X C Q Z A B G K M F, plus D through its plugin) and reports healthy.
2026-09-07 16:15:25 -07:00

225 lines
9.2 KiB
Go

// Code generated by zip; DO NOT EDIT.
package security
import (
"fmt"
"strings"
json "github.com/luxfi/node/utils/json"
zap "github.com/zap-proto/go"
)
// ---- BlockSecurityArgs -------------------------------------------------
const (
blockSecurityArgsBlockNumberAt = 0
blockSecurityArgsChainAt = 8
blockSecurityArgsSize = 16
)
var _ interface {
MarshalZAP() ([]byte, error)
UnmarshalZAP([]byte) error
} = (*BlockSecurityArgs)(nil)
// MarshalZAP writes BlockSecurityArgs from constant offsets.
func (x *BlockSecurityArgs) MarshalZAP() ([]byte, error) {
if x == nil {
return nil, nil
}
b := zap.NewBuilder(blockSecurityArgsSize + 256)
ob := b.StartObject(blockSecurityArgsSize)
ob.SetUint64(blockSecurityArgsBlockNumberAt, uint64(x.BlockNumber))
ob.SetText(blockSecurityArgsChainAt, string(x.Chain))
ob.FinishAsRoot()
return b.Finish(), nil
}
// UnmarshalZAP reads BlockSecurityArgs out of the buffer that arrived.
func (x *BlockSecurityArgs) UnmarshalZAP(data []byte) error {
if x == nil || len(data) == 0 {
return nil
}
m, err := zap.Parse(data)
if err != nil {
return fmt.Errorf("BlockSecurityArgs: %w", err)
}
o := m.Root()
x.BlockNumber = json.Uint64(o.Uint64(blockSecurityArgsBlockNumberAt))
x.Chain = string(strings.Clone(o.Text(blockSecurityArgsChainAt)))
return nil
}
// ---- BlockSecurityReply ------------------------------------------------
const (
blockSecurityReplySecurityProfileIDAt = 0
blockSecurityReplySecurityProfileNameAt = 8
blockSecurityReplyPulsarMSignatureValidAt = 16
blockSecurityReplyProofBackendIDAt = 20
blockSecurityReplyProofBackendNameAt = 24
blockSecurityReplyPostQuantumEndToEndAt = 32
blockSecurityReplySize = 40
)
var _ interface {
MarshalZAP() ([]byte, error)
UnmarshalZAP([]byte) error
} = (*BlockSecurityReply)(nil)
// MarshalZAP writes BlockSecurityReply from constant offsets.
func (x *BlockSecurityReply) MarshalZAP() ([]byte, error) {
if x == nil {
return nil, nil
}
b := zap.NewBuilder(blockSecurityReplySize + 256)
ob := b.StartObject(blockSecurityReplySize)
ob.SetUint32(blockSecurityReplySecurityProfileIDAt, uint32(x.SecurityProfileID))
ob.SetText(blockSecurityReplySecurityProfileNameAt, string(x.SecurityProfileName))
ob.SetBool(blockSecurityReplyPulsarMSignatureValidAt, bool(x.PulsarMSignatureValid))
ob.SetUint32(blockSecurityReplyProofBackendIDAt, uint32(x.ProofBackendID))
ob.SetText(blockSecurityReplyProofBackendNameAt, string(x.ProofBackendName))
ob.SetBool(blockSecurityReplyPostQuantumEndToEndAt, bool(x.PostQuantumEndToEnd))
ob.FinishAsRoot()
return b.Finish(), nil
}
// UnmarshalZAP reads BlockSecurityReply out of the buffer that arrived.
func (x *BlockSecurityReply) UnmarshalZAP(data []byte) error {
if x == nil || len(data) == 0 {
return nil
}
m, err := zap.Parse(data)
if err != nil {
return fmt.Errorf("BlockSecurityReply: %w", err)
}
o := m.Root()
x.SecurityProfileID = uint32(o.Uint32(blockSecurityReplySecurityProfileIDAt))
x.SecurityProfileName = string(strings.Clone(o.Text(blockSecurityReplySecurityProfileNameAt)))
x.PulsarMSignatureValid = bool(o.Bool(blockSecurityReplyPulsarMSignatureValidAt))
x.ProofBackendID = uint32(o.Uint32(blockSecurityReplyProofBackendIDAt))
x.ProofBackendName = string(strings.Clone(o.Text(blockSecurityReplyProofBackendNameAt)))
x.PostQuantumEndToEnd = bool(o.Bool(blockSecurityReplyPostQuantumEndToEndAt))
return nil
}
// ---- ProfileReply ------------------------------------------------------
const (
profileReplyProfileIDAt = 0
profileReplyProfileNameAt = 8
profileReplyProfileHashAt = 16
profileReplyPostQuantumEndToEndAt = 24
profileReplyNISTFriendlyAt = 25
profileReplyLuxCanonicalAt = 26
profileReplyHashSuiteAt = 32
profileReplyWalletSchemeAt = 40
profileReplyTxSchemeAt = 48
profileReplyContractAuthAt = 56
profileReplyValidatorSchemeAt = 64
profileReplyFinalitySchemeAt = 72
profileReplyHighValueSchemeAt = 80
profileReplyProofPolicyAt = 88
profileReplyKeyExchangeAt = 96
profileReplyHighValueKEMAt = 104
profileReplyRecoverySchemeAt = 112
profileReplyForbidECDSAWalletsAt = 120
profileReplyForbidECDSAContractAuthAt = 121
profileReplyForbidBLSContractAuthAt = 122
profileReplyForbidClassicalKEMAt = 123
profileReplyRequireTypedTxAuthAt = 124
profileReplyForbidPairingsAt = 125
profileReplyForbidKZGAt = 126
profileReplyForbidTrustedSetupAt = 127
profileReplyForbidClassicalSNARKsAt = 128
profileReplyForbidDevProofsAt = 129
profileReplyForbidFallbacksAt = 130
profileReplySize = 136
)
var _ interface {
MarshalZAP() ([]byte, error)
UnmarshalZAP([]byte) error
} = (*ProfileReply)(nil)
// MarshalZAP writes ProfileReply from constant offsets.
func (x *ProfileReply) MarshalZAP() ([]byte, error) {
if x == nil {
return nil, nil
}
b := zap.NewBuilder(profileReplySize + 256)
ob := b.StartObject(profileReplySize)
ob.SetUint32(profileReplyProfileIDAt, uint32(x.ProfileID))
ob.SetText(profileReplyProfileNameAt, string(x.ProfileName))
ob.SetText(profileReplyProfileHashAt, string(x.ProfileHash))
ob.SetBool(profileReplyPostQuantumEndToEndAt, bool(x.PostQuantumEndToEnd))
ob.SetBool(profileReplyNISTFriendlyAt, bool(x.NISTFriendly))
ob.SetBool(profileReplyLuxCanonicalAt, bool(x.LuxCanonical))
ob.SetText(profileReplyHashSuiteAt, string(x.HashSuite))
ob.SetText(profileReplyWalletSchemeAt, string(x.WalletScheme))
ob.SetText(profileReplyTxSchemeAt, string(x.TxScheme))
ob.SetText(profileReplyContractAuthAt, string(x.ContractAuth))
ob.SetText(profileReplyValidatorSchemeAt, string(x.ValidatorScheme))
ob.SetText(profileReplyFinalitySchemeAt, string(x.FinalityScheme))
ob.SetText(profileReplyHighValueSchemeAt, string(x.HighValueScheme))
ob.SetText(profileReplyProofPolicyAt, string(x.ProofPolicy))
ob.SetText(profileReplyKeyExchangeAt, string(x.KeyExchange))
ob.SetText(profileReplyHighValueKEMAt, string(x.HighValueKEM))
ob.SetText(profileReplyRecoverySchemeAt, string(x.RecoveryScheme))
ob.SetBool(profileReplyForbidECDSAWalletsAt, bool(x.ForbidECDSAWallets))
ob.SetBool(profileReplyForbidECDSAContractAuthAt, bool(x.ForbidECDSAContractAuth))
ob.SetBool(profileReplyForbidBLSContractAuthAt, bool(x.ForbidBLSContractAuth))
ob.SetBool(profileReplyForbidClassicalKEMAt, bool(x.ForbidClassicalKEM))
ob.SetBool(profileReplyRequireTypedTxAuthAt, bool(x.RequireTypedTxAuth))
ob.SetBool(profileReplyForbidPairingsAt, bool(x.ForbidPairings))
ob.SetBool(profileReplyForbidKZGAt, bool(x.ForbidKZG))
ob.SetBool(profileReplyForbidTrustedSetupAt, bool(x.ForbidTrustedSetup))
ob.SetBool(profileReplyForbidClassicalSNARKsAt, bool(x.ForbidClassicalSNARKs))
ob.SetBool(profileReplyForbidDevProofsAt, bool(x.ForbidDevProofs))
ob.SetBool(profileReplyForbidFallbacksAt, bool(x.ForbidFallbacks))
ob.FinishAsRoot()
return b.Finish(), nil
}
// UnmarshalZAP reads ProfileReply out of the buffer that arrived.
func (x *ProfileReply) UnmarshalZAP(data []byte) error {
if x == nil || len(data) == 0 {
return nil
}
m, err := zap.Parse(data)
if err != nil {
return fmt.Errorf("ProfileReply: %w", err)
}
o := m.Root()
x.ProfileID = uint32(o.Uint32(profileReplyProfileIDAt))
x.ProfileName = string(strings.Clone(o.Text(profileReplyProfileNameAt)))
x.ProfileHash = string(strings.Clone(o.Text(profileReplyProfileHashAt)))
x.PostQuantumEndToEnd = bool(o.Bool(profileReplyPostQuantumEndToEndAt))
x.NISTFriendly = bool(o.Bool(profileReplyNISTFriendlyAt))
x.LuxCanonical = bool(o.Bool(profileReplyLuxCanonicalAt))
x.HashSuite = string(strings.Clone(o.Text(profileReplyHashSuiteAt)))
x.WalletScheme = string(strings.Clone(o.Text(profileReplyWalletSchemeAt)))
x.TxScheme = string(strings.Clone(o.Text(profileReplyTxSchemeAt)))
x.ContractAuth = string(strings.Clone(o.Text(profileReplyContractAuthAt)))
x.ValidatorScheme = string(strings.Clone(o.Text(profileReplyValidatorSchemeAt)))
x.FinalityScheme = string(strings.Clone(o.Text(profileReplyFinalitySchemeAt)))
x.HighValueScheme = string(strings.Clone(o.Text(profileReplyHighValueSchemeAt)))
x.ProofPolicy = string(strings.Clone(o.Text(profileReplyProofPolicyAt)))
x.KeyExchange = string(strings.Clone(o.Text(profileReplyKeyExchangeAt)))
x.HighValueKEM = string(strings.Clone(o.Text(profileReplyHighValueKEMAt)))
x.RecoveryScheme = string(strings.Clone(o.Text(profileReplyRecoverySchemeAt)))
x.ForbidECDSAWallets = bool(o.Bool(profileReplyForbidECDSAWalletsAt))
x.ForbidECDSAContractAuth = bool(o.Bool(profileReplyForbidECDSAContractAuthAt))
x.ForbidBLSContractAuth = bool(o.Bool(profileReplyForbidBLSContractAuthAt))
x.ForbidClassicalKEM = bool(o.Bool(profileReplyForbidClassicalKEMAt))
x.RequireTypedTxAuth = bool(o.Bool(profileReplyRequireTypedTxAuthAt))
x.ForbidPairings = bool(o.Bool(profileReplyForbidPairingsAt))
x.ForbidKZG = bool(o.Bool(profileReplyForbidKZGAt))
x.ForbidTrustedSetup = bool(o.Bool(profileReplyForbidTrustedSetupAt))
x.ForbidClassicalSNARKs = bool(o.Bool(profileReplyForbidClassicalSNARKsAt))
x.ForbidDevProofs = bool(o.Bool(profileReplyForbidDevProofsAt))
x.ForbidFallbacks = bool(o.Bool(profileReplyForbidFallbacksAt))
return nil
}