consensus

package
v1.11.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2025 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package consensus provides the consensus engine for Lux node

Package consensus provides consensus integration for VMs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAcceptorGroup

func NewAcceptorGroup(log log.Logger) *acceptorGroup

NewAcceptorGroup creates a new AcceptorGroup

Types

type FPCEngine added in v1.11.14

type FPCEngine struct {
	// contains filtered or unexported fields
}

FPCEngine provides fast-path consensus for the Lux node

func NewFPCEngine added in v1.11.14

func NewFPCEngine(f int) *FPCEngine

NewFPCEngine creates a new FPC consensus engine

func (*FPCEngine) Executable added in v1.11.14

func (e *FPCEngine) Executable() []ids.ID

Executable returns transactions ready for execution

func (*FPCEngine) Propose added in v1.11.14

func (e *FPCEngine) Propose(txID ids.ID) error

Propose adds a transaction to consensus

func (*FPCEngine) Query added in v1.11.14

func (e *FPCEngine) Query(txID ids.ID) (bool, error)

Query checks if a transaction is finalized

func (*FPCEngine) Start added in v1.11.14

func (e *FPCEngine) Start(ctx context.Context) error

Start initializes the consensus engine

func (*FPCEngine) Stop added in v1.11.14

func (e *FPCEngine) Stop() error

Stop shuts down the consensus engine

type Transaction added in v1.11.14

type Transaction interface {
	Hash() [32]byte
	Witness() []byte
}

Transaction interface for VM transactions

type VerkleIntegration added in v1.11.14

type VerkleIntegration struct {
	// contains filtered or unexported fields
}

VerkleIntegration bridges VMs with Verkle+FPC consensus

func NewVerkleIntegration added in v1.11.14

func NewVerkleIntegration(engine *FPCEngine, db database.NodeDatabase) *VerkleIntegration

NewVerkleIntegration creates VM-consensus bridge

func (*VerkleIntegration) GetExecutable added in v1.11.14

func (v *VerkleIntegration) GetExecutable() []ids.ID

GetExecutable returns transactions ready for execution

func (*VerkleIntegration) ProcessTransactions added in v1.11.14

func (v *VerkleIntegration) ProcessTransactions(ctx context.Context, txs []Transaction) error

ProcessTransactions processes transactions through consensus

Directories

Path Synopsis
Package consensustest provides test utilities for consensus operations
Package consensustest provides test utilities for consensus operations
engine
chain/block
Package block provides block chain engine functionality
Package block provides block chain engine functionality
networking
router
Package router provides networking router functionality
Package router provides networking router functionality
tracker
Package tracker provides network tracking functionality
Package tracker provides network tracking functionality
Package validators provides validator management functionality
Package validators provides validator management functionality
validatorsmock
Package validatorsmock provides mock validators for testing
Package validatorsmock provides mock validators for testing
validatorstest
Package validatorstest provides test utilities for validators
Package validatorstest provides test utilities for validators

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL