Documentation
¶
Index ¶
- Variables
- func VerifyBlock(b *Block, pkGroup []byte, q *quasarState) error
- type Block
- type CertBundle
- type Engine
- func (e *Engine) Broadcast(msg interface{}) error
- func (e *Engine) BroadcastBlock(block *Block) error
- func (e *Engine) LastBlockID() ids.ID
- func (e *Engine) RecordSlashEvent(nodeID ids.NodeID, amount uint64, reason string) error
- func (e *Engine) SelfID() ids.NodeID
- func (e *Engine) SignBLS(data []byte) ([]byte, error)
- type Header
- type Proposer
- type ProposerConfig
- type QuasarConfig
- type SlashEvent
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func VerifyBlock ¶
VerifyBlock performs fast-path verification with no extra locks
Types ¶
type Block ¶
type Block struct {
Header
Certs CertBundle
Txs [][]byte
}
Block represents a Beam consensus block with dual certificates
type CertBundle ¶
type CertBundle struct {
BLSAgg [96]byte // BLS aggregate signature
RTCert []byte // Ringtail certificate (nil until aggregated)
}
CertBundle contains both BLS and Ringtail certificates for dual finality
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine represents the Beam consensus engine
func (*Engine) BroadcastBlock ¶
BroadcastBlock broadcasts a block to all peers
func (*Engine) LastBlockID ¶
LastBlockID returns the last block ID
func (*Engine) RecordSlashEvent ¶
RecordSlashEvent records a slashing event
type Proposer ¶
type Proposer struct {
// contains filtered or unexported fields
}
Proposer manages block proposal with dual-certificate requirement
func NewProposer ¶
func NewProposer(cfg ProposerConfig, quasar *quasarState, engine *Engine) *Proposer
NewProposer creates a new proposer instance
func (*Proposer) ProcessSlashEvents ¶
func (p *Proposer) ProcessSlashEvents(events []SlashEvent) [][]byte
ProcessSlashEvents handles slashing for the previous block
type ProposerConfig ¶
type ProposerConfig struct {
QuasarTimeout time.Duration // e.g., 50ms for mainnet, 5ms for devnet
SlashAmount uint64 // Amount to slash for missing RT cert
}
ProposerConfig contains proposer-specific settings
Click to show internal directories.
Click to hide internal directories.