Documentation
¶
Index ¶
- Variables
- func NewDAGEngine(ctx *core.Context, vm interface{}) dag.Engine
- func NewLinearEngine(ctx *core.Context, vm interface{}) chain.Engine
- func NewQChainEngine(ctx *core.Context, vm interface{}) chain.Engine
- type Aggregator
- func (a *Aggregator) AddBLSShare(height uint64, nodeID ids.NodeID, sig *bls.Signature) error
- func (a *Aggregator) AddRingtailShare(height uint64, nodeID ids.NodeID, share ringtail.Share) error
- func (a *Aggregator) GetMetrics() AggregatorMetrics
- func (a *Aggregator) UpdateValidatorKeys(validators map[ids.NodeID]*ValidatorKeys)
- func (a *Aggregator) WaitForCertificate(ctx context.Context, height uint64, timeout time.Duration) (*DualCertificate, error)
- type AggregatorMetrics
- type Cert
- type DoubleSignEvidence
- type DualCertificate
- type Engine
- type EpochKeys
- type InvalidSignatureEvidence
- type KeyManager
- func (km *KeyManager) GetBLSSigner() (bls.Signer, *bls.PublicKey)
- func (km *KeyManager) GetCurrentEpoch() uint32
- func (km *KeyManager) GetGroupPublicKey(epoch uint32) []byte
- func (km *KeyManager) GetRingtailKeyPair() ([]byte, []byte)
- func (km *KeyManager) InitiateDKG(ctx context.Context, participants []ids.NodeID) error
- func (km *KeyManager) ProcessDKGMessage(from ids.NodeID, msg []byte) error
- func (km *KeyManager) SetRotationInterval(interval time.Duration)
- func (km *KeyManager) Start(ctx context.Context) error
- func (km *KeyManager) Stop()
- type MissingRingtailEvidence
- type NebulaDAGEngine
- func (n *NebulaDAGEngine) Accepted(ctx context.Context, nodeID ids.NodeID, requestID uint32, ...) error
- func (n *NebulaDAGEngine) AcceptedFrontier(ctx context.Context, nodeID ids.NodeID, requestID uint32, containerID ids.ID) error
- func (n *NebulaDAGEngine) AcceptedStateSummary(ctx context.Context, nodeID ids.NodeID, requestID uint32, summaryIDs []ids.ID) error
- func (n *NebulaDAGEngine) Ancestors(ctx context.Context, nodeID ids.NodeID, requestID uint32, containers [][]byte) error
- func (n *NebulaDAGEngine) AppGossip(ctx context.Context, nodeID ids.NodeID, msg []byte) error
- func (n *NebulaDAGEngine) AppRequest(ctx context.Context, nodeID ids.NodeID, requestID uint32, deadline time.Time, ...) error
- func (n *NebulaDAGEngine) AppResponse(ctx context.Context, nodeID ids.NodeID, requestID uint32, msg []byte) error
- func (n *NebulaDAGEngine) Chits(ctx context.Context, nodeID ids.NodeID, requestID uint32, preferredID ids.ID, ...) error
- func (n *NebulaDAGEngine) Connected(ctx context.Context, nodeID ids.NodeID, nodeVersion *version.Application) error
- func (n *NebulaDAGEngine) Context() *core.Context
- func (n *NebulaDAGEngine) CrossChainAppRequest(ctx context.Context, chainID ids.ID, requestID uint32, deadline time.Time, ...) error
- func (n *NebulaDAGEngine) CrossChainAppResponse(ctx context.Context, chainID ids.ID, requestID uint32, msg []byte) error
- func (n *NebulaDAGEngine) Disconnected(ctx context.Context, nodeID ids.NodeID) error
- func (n *NebulaDAGEngine) Get(ctx context.Context, nodeID ids.NodeID, requestID uint32, containerID ids.ID) error
- func (n *NebulaDAGEngine) GetAccepted(ctx context.Context, nodeID ids.NodeID, requestID uint32, ...) error
- func (n *NebulaDAGEngine) GetAcceptedFrontier(ctx context.Context, nodeID ids.NodeID, requestID uint32) error
- func (n *NebulaDAGEngine) GetAcceptedStateSummary(ctx context.Context, nodeID ids.NodeID, requestID uint32, heights []uint64) error
- func (n *NebulaDAGEngine) GetAncestors(ctx context.Context, nodeID ids.NodeID, requestID uint32, containerID ids.ID) error
- func (n *NebulaDAGEngine) GetStateSummaryFrontier(ctx context.Context, nodeID ids.NodeID, requestID uint32) error
- func (n *NebulaDAGEngine) GetVM() interface{}
- func (n *NebulaDAGEngine) GetVertex(vtxID ids.ID) (dag.Vertex, error)
- func (n *NebulaDAGEngine) GetVtx(vtxID ids.ID) (dag.Vertex, error)
- func (n *NebulaDAGEngine) HealthCheck(ctx context.Context) (interface{}, error)
- func (n *NebulaDAGEngine) Initialize(ctx context.Context, params dag.Parameters) error
- func (n *NebulaDAGEngine) Issued(vtx dag.Vertex) bool
- func (n *NebulaDAGEngine) Notify(ctx context.Context, msg core.Message) error
- func (n *NebulaDAGEngine) PullQuery(ctx context.Context, nodeID ids.NodeID, requestID uint32, containerID ids.ID, ...) error
- func (n *NebulaDAGEngine) PushQuery(ctx context.Context, nodeID ids.NodeID, requestID uint32, container []byte, ...) error
- func (n *NebulaDAGEngine) Put(ctx context.Context, nodeID ids.NodeID, requestID uint32, container []byte) error
- func (n *NebulaDAGEngine) QueryFailed(ctx context.Context, nodeID ids.NodeID, requestID uint32) error
- func (n *NebulaDAGEngine) Shutdown(ctx context.Context) error
- func (n *NebulaDAGEngine) Start(ctx context.Context, startReqID uint32) error
- func (n *NebulaDAGEngine) StateSummaryFrontier(ctx context.Context, nodeID ids.NodeID, requestID uint32, summary []byte) error
- func (n *NebulaDAGEngine) Stop(ctx context.Context) error
- func (n *NebulaDAGEngine) StopVertexAccepted() bool
- type NodeID
- type NovaDecision
- type NovaHook
- func (nh *NovaHook) Disable()
- func (nh *NovaHook) Enable()
- func (nh *NovaHook) GetPendingCount() int
- func (nh *NovaHook) IsFinalized(blockID ids.ID) bool
- func (nh *NovaHook) OnNovaDecided(ctx context.Context, blockID ids.ID, height uint64, blockHash []byte) error
- func (nh *NovaHook) OnQuasarFinalized(blockID ids.ID, cert *DualCertificate)
- func (nh *NovaHook) OnSlashingDetected(event *SlashingEvent)
- func (nh *NovaHook) SetFinalizedCallback(cb func(ids.ID, *DualCertificate))
- func (nh *NovaHook) SetSlashingCallback(cb func(*SlashingEvent))
- func (nh *NovaHook) Start(ctx context.Context)
- type Parameters
- type PendingBlock
- type Photon
- type Precomp
- type PrecomputePool
- type QBlock
- type QuasarBlock
- func (b *QuasarBlock) Accept() error
- func (b *QuasarBlock) Bytes() []byte
- func (b *QuasarBlock) Height() uint64
- func (b *QuasarBlock) ID() ids.ID
- func (b *QuasarBlock) Parent() ids.ID
- func (b *QuasarBlock) Reject() error
- func (b *QuasarBlock) Status() choices.Status
- func (b *QuasarBlock) Time() uint64
- func (b *QuasarBlock) Verify(context.Context) error
- type QuasarEngineWrapper
- func (w *QuasarEngineWrapper) Accepted(ctx context.Context, nodeID ids.NodeID, requestID uint32, ...) error
- func (w *QuasarEngineWrapper) AcceptedFrontier(ctx context.Context, nodeID ids.NodeID, requestID uint32, containerID ids.ID) error
- func (w *QuasarEngineWrapper) AcceptedStateSummary(ctx context.Context, nodeID ids.NodeID, requestID uint32, summaryIDs []ids.ID) error
- func (w *QuasarEngineWrapper) Ancestors(ctx context.Context, nodeID ids.NodeID, requestID uint32, containers [][]byte) error
- func (w *QuasarEngineWrapper) AppGossip(ctx context.Context, nodeID ids.NodeID, msg []byte) error
- func (w *QuasarEngineWrapper) AppRequest(ctx context.Context, nodeID ids.NodeID, requestID uint32, deadline time.Time, ...) error
- func (w *QuasarEngineWrapper) AppResponse(ctx context.Context, nodeID ids.NodeID, requestID uint32, msg []byte) error
- func (w *QuasarEngineWrapper) Chits(ctx context.Context, nodeID ids.NodeID, requestID uint32, preferredID ids.ID, ...) error
- func (w *QuasarEngineWrapper) Connected(ctx context.Context, nodeID ids.NodeID, nodeVersion *version.Application) error
- func (w *QuasarEngineWrapper) Context() *core.Context
- func (w *QuasarEngineWrapper) CrossChainAppRequest(ctx context.Context, chainID ids.ID, requestID uint32, deadline time.Time, ...) error
- func (w *QuasarEngineWrapper) CrossChainAppResponse(ctx context.Context, chainID ids.ID, requestID uint32, msg []byte) error
- func (w *QuasarEngineWrapper) Disconnected(ctx context.Context, nodeID ids.NodeID) error
- func (w *QuasarEngineWrapper) Get(ctx context.Context, nodeID ids.NodeID, requestID uint32, containerID ids.ID) error
- func (w *QuasarEngineWrapper) GetAccepted(ctx context.Context, nodeID ids.NodeID, requestID uint32, ...) error
- func (w *QuasarEngineWrapper) GetAcceptedFrontier(ctx context.Context, nodeID ids.NodeID, requestID uint32) error
- func (w *QuasarEngineWrapper) GetAcceptedStateSummary(ctx context.Context, nodeID ids.NodeID, requestID uint32, heights []uint64) error
- func (w *QuasarEngineWrapper) GetAncestor(blkID ids.ID, height uint64) (ids.ID, error)
- func (w *QuasarEngineWrapper) GetAncestors(ctx context.Context, nodeID ids.NodeID, requestID uint32, containerID ids.ID) error
- func (w *QuasarEngineWrapper) GetBlock(blkID ids.ID) (block.Block, error)
- func (w *QuasarEngineWrapper) GetFinalityChannel() <-chan *DualCertificate
- func (w *QuasarEngineWrapper) GetSlashingChannel() <-chan *SlashingEvent
- func (w *QuasarEngineWrapper) GetStateSummaryFrontier(ctx context.Context, nodeID ids.NodeID, requestID uint32) error
- func (w *QuasarEngineWrapper) GetVM() interface{}
- func (w *QuasarEngineWrapper) GetVertex(vtxID ids.ID) (dag.Vertex, error)
- func (w *QuasarEngineWrapper) GetVtx(vtxID ids.ID) (dag.Vertex, error)
- func (w *QuasarEngineWrapper) HealthCheck(ctx context.Context) (interface{}, error)
- func (w *QuasarEngineWrapper) Initialize(ctx context.Context, params dag.Parameters) error
- func (w *QuasarEngineWrapper) IsFinalized(blockID ids.ID) bool
- func (w *QuasarEngineWrapper) Issued(vtx dag.Vertex) bool
- func (w *QuasarEngineWrapper) LastAccepted() (ids.ID, uint64)
- func (w *QuasarEngineWrapper) Notify(ctx context.Context, msg core.Message) error
- func (w *QuasarEngineWrapper) OnNovaDecided(ctx context.Context, blockID ids.ID, height uint64, blockHash []byte) error
- func (w *QuasarEngineWrapper) PullQuery(ctx context.Context, nodeID ids.NodeID, requestID uint32, containerID ids.ID, ...) error
- func (w *QuasarEngineWrapper) PushQuery(ctx context.Context, nodeID ids.NodeID, requestID uint32, container []byte, ...) error
- func (w *QuasarEngineWrapper) Put(ctx context.Context, nodeID ids.NodeID, requestID uint32, container []byte) error
- func (w *QuasarEngineWrapper) QueryFailed(ctx context.Context, nodeID ids.NodeID, requestID uint32) error
- func (w *QuasarEngineWrapper) Shutdown(ctx context.Context) error
- func (w *QuasarEngineWrapper) Start(ctx context.Context, startReqID uint32) error
- func (w *QuasarEngineWrapper) StateSummaryFrontier(ctx context.Context, nodeID ids.NodeID, requestID uint32, summary []byte) error
- func (w *QuasarEngineWrapper) Stop(ctx context.Context) error
- func (w *QuasarEngineWrapper) StopVertexAccepted() bool
- func (w *QuasarEngineWrapper) VerifyHeightIndex() error
- type QuasarVertex
- func (v *QuasarVertex) Accept() error
- func (v *QuasarVertex) Bytes() []byte
- func (v *QuasarVertex) Epoch() uint32
- func (v *QuasarVertex) Height() uint64
- func (v *QuasarVertex) ID() ids.ID
- func (v *QuasarVertex) Parents() ([]ids.ID, error)
- func (v *QuasarVertex) Reject() error
- func (v *QuasarVertex) Status() choices.Status
- func (v *QuasarVertex) Timestamp() int64
- func (v *QuasarVertex) Verify(context.Context) error
- type Share
- type SignatureRecord
- type SlashingDetector
- func (sd *SlashingDetector) Analyze(block *PendingBlock, cert *DualCertificate) *SlashingEvent
- func (sd *SlashingDetector) CheckDoubleSign(height uint64, nodeID ids.NodeID, blockID ids.ID) bool
- func (sd *SlashingDetector) CleanupHeight(height uint64)
- func (sd *SlashingDetector) RecordBLSSignature(height uint64, nodeID ids.NodeID, blockID ids.ID, blockHash []byte, sig []byte) *SlashingEvent
- func (sd *SlashingDetector) RecordRingtailShare(height uint64, nodeID ids.NodeID, blockID ids.ID, share []byte) *SlashingEvent
- type SlashingEvent
- type ValidatorKeys
Constants ¶
This section is empty.
Variables ¶
var ( ErrInsufficientSignatures = errors.New("insufficient signatures for finality") ErrBLSAggregationFailed = errors.New("BLS aggregation failed") ErrRingtailAggregationFailed = errors.New("Ringtail aggregation failed") ErrDualCertMismatch = errors.New("BLS and Ringtail certificates do not match") ErrQuasarTimeout = errors.New("Quasar finality timeout") )
var ( ErrNoPrecompAvailable = errors.New("no precomputed signatures available") ErrPrecompExhausted = errors.New("precomputation pool exhausted") )
var DefaultParameters = Parameters{ K: 21, AlphaPreference: 13, AlphaConfidence: 18, Beta: 8, MaxItemProcessingTime: 9630 * time.Millisecond, }
Functions ¶
func NewDAGEngine ¶
NewDAGEngine creates a new DAG consensus engine using Nebula This is used for the X-Chain (DAG-based UTXO chain)
func NewLinearEngine ¶
NewLinearEngine creates a new linear consensus engine using Pulsar This is used for the C-Chain (EVM-compatible chain)
Types ¶
type Aggregator ¶
type Aggregator struct {
// contains filtered or unexported fields
}
Aggregator manages parallel BLS and Ringtail signature aggregation
func NewAggregator ¶
func NewAggregator(nodeID ids.NodeID, threshold int, validators map[ids.NodeID]*ValidatorKeys) *Aggregator
NewAggregator creates a new Quasar aggregator
func (*Aggregator) AddBLSShare ¶
AddBLSShare adds a BLS signature share for aggregation
func (*Aggregator) AddRingtailShare ¶
AddRingtailShare adds a Ringtail signature share for aggregation
func (*Aggregator) GetMetrics ¶
func (a *Aggregator) GetMetrics() AggregatorMetrics
GetMetrics returns aggregator performance metrics
func (*Aggregator) UpdateValidatorKeys ¶
func (a *Aggregator) UpdateValidatorKeys(validators map[ids.NodeID]*ValidatorKeys)
UpdateValidatorKeys updates the validator key set (for key rotation)
func (*Aggregator) WaitForCertificate ¶
func (a *Aggregator) WaitForCertificate(ctx context.Context, height uint64, timeout time.Duration) (*DualCertificate, error)
WaitForCertificate waits for a dual certificate to be created for a block height
type AggregatorMetrics ¶
type AggregatorMetrics struct {
BLSAggregations uint64
RingtailAggregations uint64
DualCertsCreated uint64
AggregationLatency time.Duration
}
AggregatorMetrics tracks aggregation performance
type DoubleSignEvidence ¶
type DoubleSignEvidence struct {
Height uint64
BlockID1 ids.ID
BlockID2 ids.ID
Signature1 []byte
Signature2 []byte
}
DoubleSignEvidence proves a validator signed two different blocks at same height
type DualCertificate ¶
type DualCertificate struct {
BlockID ids.ID
BlockHeight uint64
Epoch uint32
BLSSignature []byte
RingtailCert []byte
SignerIDs []ids.NodeID
Timestamp time.Time
}
DualCertificate represents a finalized block with both BLS and Ringtail signatures
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine represents the quantum consensus engine
func NewEngine ¶
func NewEngine(params Parameters, nodeID NodeID) *Engine
NewEngine creates a new quantum engine
func (*Engine) ConsensusStatus ¶
func (e *Engine) ConsensusStatus() interface{}
ConsensusStatus returns the current consensus status
func (*Engine) Initialize ¶
Initialize initializes the engine
type EpochKeys ¶
type EpochKeys struct {
Epoch uint32
GroupPublicKey []byte // For Ringtail threshold
ValidatorKeys map[ids.NodeID]*ValidatorKeys
ActivationTime time.Time
ExpirationTime time.Time
}
EpochKeys represents keys for a specific epoch
type InvalidSignatureEvidence ¶
InvalidSignatureEvidence proves a validator's signature is invalid
type KeyManager ¶
type KeyManager struct {
// contains filtered or unexported fields
}
KeyManager manages validator keys and rotation for Quasar
func NewKeyManager ¶
NewKeyManager creates a new key manager
func (*KeyManager) GetBLSSigner ¶
func (km *KeyManager) GetBLSSigner() (bls.Signer, *bls.PublicKey)
GetBLSSigner returns the current BLS signer and public key
func (*KeyManager) GetCurrentEpoch ¶
func (km *KeyManager) GetCurrentEpoch() uint32
GetCurrentEpoch returns the current key epoch
func (*KeyManager) GetGroupPublicKey ¶
func (km *KeyManager) GetGroupPublicKey(epoch uint32) []byte
GetGroupPublicKey returns the group public key for an epoch
func (*KeyManager) GetRingtailKeyPair ¶
func (km *KeyManager) GetRingtailKeyPair() ([]byte, []byte)
GetRingtailKeyPair returns the current Ringtail keypair
func (*KeyManager) InitiateDKG ¶
InitiateDKG starts distributed key generation for a new epoch
func (*KeyManager) ProcessDKGMessage ¶
func (km *KeyManager) ProcessDKGMessage(from ids.NodeID, msg []byte) error
ProcessDKGMessage handles DKG protocol messages
func (*KeyManager) SetRotationInterval ¶
func (km *KeyManager) SetRotationInterval(interval time.Duration)
SetRotationInterval updates the key rotation interval
type MissingRingtailEvidence ¶
MissingRingtailEvidence proves a validator signed BLS but not Ringtail
type NebulaDAGEngine ¶
type NebulaDAGEngine struct {
// contains filtered or unexported fields
}
NebulaDAGEngine implements DAG consensus using Nebula with Quasar validation Used for X-Chain (Exchange Chain) - UTXO-based with DAG structure
func (*NebulaDAGEngine) AcceptedFrontier ¶
func (*NebulaDAGEngine) AcceptedStateSummary ¶
func (*NebulaDAGEngine) AppRequest ¶
func (*NebulaDAGEngine) AppResponse ¶
func (*NebulaDAGEngine) Connected ¶
func (n *NebulaDAGEngine) Connected(ctx context.Context, nodeID ids.NodeID, nodeVersion *version.Application) error
func (*NebulaDAGEngine) Context ¶
func (n *NebulaDAGEngine) Context() *core.Context
func (*NebulaDAGEngine) CrossChainAppRequest ¶
func (*NebulaDAGEngine) CrossChainAppResponse ¶
func (*NebulaDAGEngine) Disconnected ¶
func (*NebulaDAGEngine) GetAccepted ¶
func (*NebulaDAGEngine) GetAcceptedFrontier ¶
func (*NebulaDAGEngine) GetAcceptedStateSummary ¶
func (*NebulaDAGEngine) GetAncestors ¶
func (*NebulaDAGEngine) GetStateSummaryFrontier ¶
func (*NebulaDAGEngine) GetVM ¶
func (n *NebulaDAGEngine) GetVM() interface{}
func (*NebulaDAGEngine) HealthCheck ¶
func (n *NebulaDAGEngine) HealthCheck(ctx context.Context) (interface{}, error)
func (*NebulaDAGEngine) Initialize ¶
func (n *NebulaDAGEngine) Initialize(ctx context.Context, params dag.Parameters) error
func (*NebulaDAGEngine) Put ¶
func (n *NebulaDAGEngine) Put(ctx context.Context, nodeID ids.NodeID, requestID uint32, container []byte) error
Put handles incoming vertices - convert to Nebula photons
func (*NebulaDAGEngine) QueryFailed ¶
func (*NebulaDAGEngine) Start ¶
func (n *NebulaDAGEngine) Start(ctx context.Context, startReqID uint32) error
func (*NebulaDAGEngine) StateSummaryFrontier ¶
func (*NebulaDAGEngine) StopVertexAccepted ¶
func (n *NebulaDAGEngine) StopVertexAccepted() bool
type NovaDecision ¶
type NovaDecision struct {
BlockID ids.ID
Height uint64
Hash []byte
Timestamp int64
Status choices.Status
}
NovaDecision represents a block decided by Nova
type NovaHook ¶
type NovaHook struct {
// contains filtered or unexported fields
}
NovaHook provides integration between Nova consensus and Quasar finality
func AttachQuasarToNova ¶
func AttachQuasarToNova(novaEngine interface{}, quasarEngine *QuasarEngineWrapper) (*NovaHook, error)
AttachQuasarToNova attaches Quasar finality to a Nova engine
func NewNovaHook ¶
func NewNovaHook(quasarEngine *QuasarEngineWrapper) *NovaHook
NewNovaHook creates a new Nova-Quasar integration hook
func (*NovaHook) Disable ¶
func (nh *NovaHook) Disable()
Disable disables Quasar finality (for testing/rollback)
func (*NovaHook) Enable ¶
func (nh *NovaHook) Enable()
Enable enables Quasar finality for Nova decisions
func (*NovaHook) GetPendingCount ¶
GetPendingCount returns the number of blocks awaiting finality
func (*NovaHook) IsFinalized ¶
IsFinalized checks if a block has achieved Quasar finality
func (*NovaHook) OnNovaDecided ¶
func (nh *NovaHook) OnNovaDecided(ctx context.Context, blockID ids.ID, height uint64, blockHash []byte) error
OnNovaDecided is called when Nova decides on a block This is the main integration point
func (*NovaHook) OnQuasarFinalized ¶
func (nh *NovaHook) OnQuasarFinalized(blockID ids.ID, cert *DualCertificate)
OnQuasarFinalized is called when Quasar achieves finality
func (*NovaHook) OnSlashingDetected ¶
func (nh *NovaHook) OnSlashingDetected(event *SlashingEvent)
OnSlashingDetected is called when misbehavior is detected
func (*NovaHook) SetFinalizedCallback ¶
func (nh *NovaHook) SetFinalizedCallback(cb func(ids.ID, *DualCertificate))
SetFinalizedCallback sets the callback for finalized blocks
func (*NovaHook) SetSlashingCallback ¶
func (nh *NovaHook) SetSlashingCallback(cb func(*SlashingEvent))
SetSlashingCallback sets the callback for slashing events
type Parameters ¶
type Parameters struct {
K int
AlphaPreference int
AlphaConfidence int
Beta int
MaxItemProcessingTime time.Duration
}
Parameters for quantum consensus
type PendingBlock ¶
PendingBlock represents a block pending finalization
type Photon ¶
type Photon struct {
ID interface{}
Frequency float64
Amplitude float64
Phase float64
Timestamp time.Time
Data []byte
}
Photon represents a quantum photon in the system
type Precomp ¶
type Precomp interface{}
Precomp represents precomputed Ringtail values
func Precompute ¶
Precompute precomputes Ringtail values from a secret key
type PrecomputePool ¶
type PrecomputePool struct {
// contains filtered or unexported fields
}
PrecomputePool manages a pool of precomputed Ringtail signatures
func NewPrecomputePool ¶
func NewPrecomputePool(targetSize int) *PrecomputePool
NewPrecomputePool creates a new precomputation pool
func (*PrecomputePool) Get ¶
func (p *PrecomputePool) Get() (ringtail.Precomp, error)
Get retrieves a precomputed signature from the pool
func (*PrecomputePool) Initialize ¶
func (p *PrecomputePool) Initialize(sk []byte) error
Initialize starts the precomputation worker with the given secret key
func (*PrecomputePool) Metrics ¶
func (p *PrecomputePool) Metrics() map[string]uint64
Metrics returns pool statistics
func (*PrecomputePool) Size ¶
func (p *PrecomputePool) Size() int
Size returns the current pool size
type QuasarBlock ¶
type QuasarBlock struct {
// contains filtered or unexported fields
}
Block implementation for Quasar
func (*QuasarBlock) Accept ¶
func (b *QuasarBlock) Accept() error
func (*QuasarBlock) Bytes ¶
func (b *QuasarBlock) Bytes() []byte
func (*QuasarBlock) Height ¶
func (b *QuasarBlock) Height() uint64
func (*QuasarBlock) ID ¶
func (b *QuasarBlock) ID() ids.ID
func (*QuasarBlock) Parent ¶
func (b *QuasarBlock) Parent() ids.ID
func (*QuasarBlock) Reject ¶
func (b *QuasarBlock) Reject() error
func (*QuasarBlock) Status ¶
func (b *QuasarBlock) Status() choices.Status
func (*QuasarBlock) Time ¶
func (b *QuasarBlock) Time() uint64
type QuasarEngineWrapper ¶
type QuasarEngineWrapper struct {
// contains filtered or unexported fields
}
QuasarEngineWrapper wraps the quantum-safe Quasar consensus engine to implement both DAG and Linear engine interfaces for the node
func (*QuasarEngineWrapper) AcceptedFrontier ¶
func (*QuasarEngineWrapper) AcceptedStateSummary ¶
func (*QuasarEngineWrapper) AppRequest ¶
func (*QuasarEngineWrapper) AppResponse ¶
func (*QuasarEngineWrapper) Connected ¶
func (w *QuasarEngineWrapper) Connected(ctx context.Context, nodeID ids.NodeID, nodeVersion *version.Application) error
func (*QuasarEngineWrapper) Context ¶
func (w *QuasarEngineWrapper) Context() *core.Context
func (*QuasarEngineWrapper) CrossChainAppRequest ¶
func (*QuasarEngineWrapper) CrossChainAppResponse ¶
func (*QuasarEngineWrapper) Disconnected ¶
func (*QuasarEngineWrapper) GetAccepted ¶
func (*QuasarEngineWrapper) GetAcceptedFrontier ¶
func (*QuasarEngineWrapper) GetAcceptedStateSummary ¶
func (*QuasarEngineWrapper) GetAncestor ¶
func (*QuasarEngineWrapper) GetAncestors ¶
func (*QuasarEngineWrapper) GetFinalityChannel ¶
func (w *QuasarEngineWrapper) GetFinalityChannel() <-chan *DualCertificate
GetFinalityChannel returns a channel that signals when finality is achieved
func (*QuasarEngineWrapper) GetSlashingChannel ¶
func (w *QuasarEngineWrapper) GetSlashingChannel() <-chan *SlashingEvent
GetSlashingChannel returns a channel that signals slashing events
func (*QuasarEngineWrapper) GetStateSummaryFrontier ¶
func (*QuasarEngineWrapper) GetVM ¶
func (w *QuasarEngineWrapper) GetVM() interface{}
func (*QuasarEngineWrapper) HealthCheck ¶
func (w *QuasarEngineWrapper) HealthCheck(ctx context.Context) (interface{}, error)
func (*QuasarEngineWrapper) Initialize ¶
func (w *QuasarEngineWrapper) Initialize(ctx context.Context, params dag.Parameters) error
func (*QuasarEngineWrapper) IsFinalized ¶
func (w *QuasarEngineWrapper) IsFinalized(blockID ids.ID) bool
IsFinalized checks if a block has achieved Quasar finality
func (*QuasarEngineWrapper) LastAccepted ¶
func (w *QuasarEngineWrapper) LastAccepted() (ids.ID, uint64)
func (*QuasarEngineWrapper) OnNovaDecided ¶
func (w *QuasarEngineWrapper) OnNovaDecided(ctx context.Context, blockID ids.ID, height uint64, blockHash []byte) error
OnNovaDecided is called when Nova DAG reaches a decision
func (*QuasarEngineWrapper) QueryFailed ¶
func (*QuasarEngineWrapper) Shutdown ¶
func (w *QuasarEngineWrapper) Shutdown(ctx context.Context) error
func (*QuasarEngineWrapper) Start ¶
func (w *QuasarEngineWrapper) Start(ctx context.Context, startReqID uint32) error
func (*QuasarEngineWrapper) StateSummaryFrontier ¶
func (*QuasarEngineWrapper) StopVertexAccepted ¶
func (w *QuasarEngineWrapper) StopVertexAccepted() bool
func (*QuasarEngineWrapper) VerifyHeightIndex ¶
func (w *QuasarEngineWrapper) VerifyHeightIndex() error
type QuasarVertex ¶
type QuasarVertex struct {
// contains filtered or unexported fields
}
Vertex implementation for Quasar
func (*QuasarVertex) Accept ¶
func (v *QuasarVertex) Accept() error
func (*QuasarVertex) Bytes ¶
func (v *QuasarVertex) Bytes() []byte
func (*QuasarVertex) Epoch ¶
func (v *QuasarVertex) Epoch() uint32
func (*QuasarVertex) Height ¶
func (v *QuasarVertex) Height() uint64
func (*QuasarVertex) ID ¶
func (v *QuasarVertex) ID() ids.ID
func (*QuasarVertex) Reject ¶
func (v *QuasarVertex) Reject() error
func (*QuasarVertex) Status ¶
func (v *QuasarVertex) Status() choices.Status
func (*QuasarVertex) Timestamp ¶
func (v *QuasarVertex) Timestamp() int64
type SignatureRecord ¶
SignatureRecord tracks signature details for slashing detection
type SlashingDetector ¶
type SlashingDetector struct {
// contains filtered or unexported fields
}
SlashingDetector detects validator misbehavior in Quasar finality
func NewSlashingDetector ¶
func NewSlashingDetector(validators map[ids.NodeID]*ValidatorKeys) *SlashingDetector
NewSlashingDetector creates a new slashing detector
func (*SlashingDetector) Analyze ¶
func (sd *SlashingDetector) Analyze(block *PendingBlock, cert *DualCertificate) *SlashingEvent
Analyze analyzes a failed certificate for misbehavior
func (*SlashingDetector) CheckDoubleSign ¶
CheckDoubleSign checks if a validator has double-signed at a height
func (*SlashingDetector) CleanupHeight ¶
func (sd *SlashingDetector) CleanupHeight(height uint64)
CleanupHeight removes tracking data for old heights
func (*SlashingDetector) RecordBLSSignature ¶
func (sd *SlashingDetector) RecordBLSSignature(height uint64, nodeID ids.NodeID, blockID ids.ID, blockHash []byte, sig []byte) *SlashingEvent
RecordBLSSignature records a BLS signature for tracking
func (*SlashingDetector) RecordRingtailShare ¶
func (sd *SlashingDetector) RecordRingtailShare(height uint64, nodeID ids.NodeID, blockID ids.ID, share []byte) *SlashingEvent
RecordRingtailShare records a Ringtail signature share