consensus

package module
v1.22.41 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: BSD-3-Clause Imports: 7 Imported by: 17

README ยถ

Lux Consensus

CI Status Coverage Go Version Release

Lux Quasar: Post Quantum Consensus Engine with Photonic Selection

Quasar upgrades traditional consensus mechanisms with a Quantum Finality engine. Quasar combines traditional BLS signature aggregation with parallel lattice encryption to deliver 2-round finality with both classical and quantum security. Every chain in the Lux primary network - Q, C, X - run Quasar, reaching Quantum Finality, in < 1 second.

Why Quasar?

Traditional consensus engines have limitations:

  • Different engines for different chain types
  • No native post-quantum security
  • Complex multi-layer architecture

Quasar solves all these with "One engine to rule them all":

  • Unified Protocol: Same engine for DAG, linear, EVM, MPC chains
  • Quantum Finality: Every block requires post quantum certificates
  • 2-Round Total: BLS Signatures (1 round) + Lattice Signatures (2 phases) = quantum finality
  • Zero Leaders: Fully decentralized, leaderless, highly secure
  • Sub-Second Performance: <1s finality with quantum security

๐Ÿš€ Recent Updates (v1.22.0 - January 2025)

Simplified Single-Import API ๐Ÿš€
  • NEW: Complete package restructure with shallow, obvious paths
  • NEW: Single-import convenience for all SDKs (Go, Python, Rust)
  • NEW: Unified consensus.Chain API replacing complex factory patterns
  • NEW: Type aliases for zero-friction development
  • BREAKING: Migrated from deep nested paths to clean root exports
Multi-Language SDK with 100% Test Parity ๐ŸŽ‰
  • NEW: Complete C implementation with optimized hash tables (9M+ blocks/sec)
  • NEW: Rust FFI bindings with safe wrappers and Criterion benchmarks
  • NEW: Python SDK via Cython with Pythonic API (6.7M blocks/sec)
  • NEW: Go CGO integration for seamless C/Go switching
  • NEW: Quantum-resistant OP Stack integration example
  • 100% test parity across all 4 language implementations
  • 15 comprehensive test categories with full coverage
  • Performance benchmarks exceeding all targets
Previous: Photon/Emitter Refactoring โœ…
  • Replaced Sampler/Sample pattern with light-themed Emitter/Emit
  • Implemented luminance tracking (10-1000 lux range) for node selection
  • Performance-based weighting adjusts selection probability
  • 96%+ test coverage maintained
  • CI fully green with all lint checks passing

Quick Start

Installation
Go (Default)
go get github.com/luxfi/consensus@v1.22.0
C Library (High Performance)
cd consensus/c
make && sudo make install
# Enable with: CGO_ENABLED=1 USE_C_CONSENSUS=1
Rust
# Add to Cargo.toml
[dependencies]
lux-consensus = "1.22.0"
Python
cd consensus/python
python3 setup.py install
# Or: pip install lux-consensus
Basic Usage
import "github.com/luxfi/consensus" // Single clean import!

// Create chain with default config
chain := consensus.NewChain(consensus.DefaultConfig())

// Start the chain
ctx := context.Background()
if err := chain.Start(ctx); err != nil {
    panic(err)
}
defer chain.Stop()

// Add a block
block := &consensus.Block{
    ID:       consensus.NewID(),
    ParentID: consensus.GenesisID,
    Height:   1,
    Payload:  []byte("Hello, Lux!"),
}
if err := chain.Add(ctx, block); err != nil {
    panic(err)
}
Running Tests
# Run all tests
go test ./...

# Run with coverage
go test -cover ./...

# Run benchmarks
go test -bench=. ./...

Architecture

Core Consensus Components
consensus/
โ”œโ”€โ”€ photon/                # ๐ŸŒŸ K-of-N committee selection (NEW)
โ”‚   โ”œโ”€โ”€ emitter.go        # Light emission-based peer selection
โ”‚   โ””โ”€โ”€ luminance.go      # Node brightness tracking (lux units)
โ”‚
โ”œโ”€โ”€ core/
โ”‚   โ”œโ”€โ”€ wave/             # ๐ŸŒŠ Wave consensus mechanism
โ”‚   โ”‚   โ””โ”€โ”€ engine.go     # Threshold voting (ฮฑ, ฮฒ parameters)
โ”‚   โ”œโ”€โ”€ dag/              # ๐Ÿ“Š DAG structure & ordering
โ”‚   โ”‚   โ”œโ”€โ”€ flare/        # Certificate generation
โ”‚   โ”‚   โ””โ”€โ”€ horizon/      # Frontier management
โ”‚   โ””โ”€โ”€ focus/            # ๐ŸŽฏ Confidence tracking
โ”‚
โ”œโ”€โ”€ protocol/
โ”‚   โ”œโ”€โ”€ quasar/          # โš›๏ธ Post-quantum security
โ”‚   โ”‚   โ””โ”€โ”€ ringtail.go  # Quantum-resistant signatures
โ”‚   โ”œโ”€โ”€ nebula/          # โ˜๏ธ State sync protocol
โ”‚   โ””โ”€โ”€ nova/            # โญ Parallel chain support
โ”‚
โ”œโ”€โ”€ qzmq/                # ๐Ÿ” Post-quantum transport
โ”‚   โ”œโ”€โ”€ session.go       # Hybrid key exchange
โ”‚   โ””โ”€โ”€ messages.go      # Wire protocol
โ”‚
โ””โ”€โ”€ engine/              # ๐ŸŽฎ Consensus engines
    โ”œโ”€โ”€ chain/          # Linear blockchain
    โ””โ”€โ”€ dag/            # DAG-based chains

Framework for Quasar Consensus

Quasar is built on two core components that provide both classical and quantum finality:

1. Nova DAG (Classical Finality)
  • Sampling: k-peer sampling for vote collection
  • Confidence: Build confidence d(T) through repeated sampling
  • Thresholds: ฮฒโ‚ for early preference, ฮฒโ‚‚ for decision
  • Time: ~600-700ms to classical finality
2. Quasar (Quantum Finality)
  • Phase I - Propose: Sample DAG frontier, propose highest confidence
  • Phase II - Commit: Aggregate threshold signatures if > ฮฑ๐šŒ agree
  • Certificates: Lattice-based post-quantum certificates
  • Time: ~200-300ms additional for quantum finality

Quantum Finality

Every block header now contains:

type CertBundle struct {
    BLSAgg  []byte  // 96B BLS aggregate signature
    PQCert  []byte  // ~3KB lattice certificate
}

// Block is only final when BOTH certificates are valid
isFinal := verifyBLS(blsAgg, quorum) && verifyPQ(pqCert, quorum)

Key Hierarchy

Layer Key Type Purpose Storage
Node-ID ed25519 P2P transport auth $HOME/.lux/node.key
Validator-BLS bls12-381 Fast finality votes $HOME/.lux/bls.key
Validator-PQ lattice PQ finality shares $HOME/.lux/rt.key
Wallet (EVM) secp256k1 or Lamport User tx signatures In wallet
Wallet (X-Chain) secp256k1 or Dilithium UTXO locking In wallet

The same rt.key registered on Q-Chain is reused by all chains - no extra onboarding.

Quick Start

package main

import (
  "context"
  "log"

  "github.com/luxfi/consensus/config"
  "github.com/luxfi/consensus/engine/quasar"
  "github.com/luxfi/ids"
)

func main() {
  // 1. Configure Quasar parameters
  cfg := config.Parameters{
    K:               21,  // Validators to sample
    AlphaPreference: 15,  // Preference threshold
    AlphaConfidence: 18,  // Confidence threshold
    Beta:            8,   // Finalization rounds
    QRounds:         2,   // Quantum rounds
  }

  // 2. Create Quasar engine
  nodeID := ids.GenerateNodeID()
  engine := quasar.NewQuasar(cfg, nodeID)

  // 3. Initialize with both BLS and PQ keys
  engine.Initialize(ctx, blsKey, pqKey)

  // 4. Process vertices/blocks
  engine.AddVertex(ctx, vertex)

  // 5. Dual-certificate finality
  engine.SetFinalizedCallback(func(qBlock QBlock) {
    log.Printf("Q-block %d finalized with quantum certificates\n", qBlock.Height)
  })
}

Performance Metrics

Consensus Performance
Network Validators Finality Block Time Configuration
Mainnet 21 9.63s 200ms Production ready
Testnet 11 6.3s 100ms Testing network
Local 5 3.69s 10ms Development
X-Chain 5 5ms 1ms 100Gbps networks
Benchmark Results (Apple M1 Max)
Component Operation Time/Op Memory Allocations
Wave Consensus Vote Round 3.38ฮผs 2.3KB 8 allocs
Photon Emitter K-of-N Selection 3.03ฮผs 3.0KB 2 allocs
Luminance Brightness Update 72ns 0B 0 allocs
Quasar Phase I 0.33ns 0B 0 allocs
Quasar Phase II 40.7ns 0B 0 allocs

Both BLS and post-quantum certificates complete within one consensus slot.

Security Model

  1. Pre-quantum: Attacker must corrupt โ‰ฅโ…“ stake to fork
  2. Q-day (BLS broken): Attacker can forge BLS but not lattice
    • Block fails quantum check
    • Consensus halts rather than accepting unsafe fork
  3. Post-quantum: Security rests on lattice SVP (2ยนโถโฐ ops)

Attack window โ‰ค PQ round time (โ‰ค50ms mainnet).

Chain Integration

Chain Integration Rule
Q-Chain Q-blocks as internal txs All chains read Q-blocks
C-Chain Every block has CertBundle Invalid without quantum certs
X-Chain Vertex metadata references Q-block Epoch sealed by quantum cert
M-Chain MPC rounds reference Q-block height Custody requires PQ proof

Account-Level PQ Options

EVM (C-Chain)
  • Lamport-XMSS multisig contracts
  • Gas: ~300k for VERIFY_LAMPORT
  • EIP-4337 AA wrapper available
X-Chain
  • New LatticeOutput type with PQ pubkey
  • Spend verifies single RT signature (~1.8KB)
  • CLI: lux-wallet generate --pq

Research Tools

# Interactive parameter tuning
consensus params tune

# Distributed benchmark with Quasar
consensus bench --engine quasar

# Simulate quantum state progression
consensus sim --quantum

# Analyze quantum-certificate safety
consensus check --quantum-cert

Implementation Roadmap

Priority Task Status
P0 Quasar engine core (Nova + Quasar) โœ“ Complete
P0 Quantum-certificate block headers โœ“ Complete
P0 Quantum key generation & registration In Progress
P1 Quasar service with precompute Planned
P1 PQ account options (Lamport) โœ“ Complete
P1 PQ account options (Dilithium) Planned

Testing

# Unit tests with quantum scenarios
go test ./engine/quasar/...

# Benchmark dual-certificate performance
go test -bench=QuantumCert ./lattice/

# Fuzz test certificate aggregation
go test -fuzz=Certificate ./testing/

Summary

Quasar is not an add-on or extra layer - it IS the consensus engine for Lux. By combining Nova DAG with Quasar PQ in a unified protocol, Quasar delivers:

  • 2-round finality with both classical and quantum security
  • Dual certificates required for every block
  • One engine for all chain types
  • Sub-second performance even with PQ security

Welcome to the quantum era of consensus.

License

BSD 3-Clause โ€” free for academic & commercial use. See LICENSE.

Documentation ยถ

Overview ยถ

Package consensus provides a clean, single-import interface to the Lux consensus system. This is the main SDK surface for applications using Lux consensus.

For VM-related types (State, Message, Fx), use github.com/luxfi/vm

Package consensus provides advanced consensus mechanisms for blockchain systems, featuring AI-powered validation and quantum-secure networking.

Overview ยถ

The Lux consensus package implements multiple consensus engines with AI integration, supporting Chain (linear), DAG (parallel), and PQ (post-quantum) consensus algorithms. It features dynamic AI-managed consensus through the Photonโ†’Quasar flow and shared hallucinations across network nodes.

Architecture ยถ

The consensus system is organized into several key components:

  • ai/ AI consensus agents and models
  • engine/ Consensus engine implementations (chain, dag, pq)
  • protocol/ Consensus protocols (photon, quasar)
  • core/ Core interfaces and types
  • utils/ Utilities (qzmq for quantum-secure messaging)
  • examples/ Progressive tutorial examples

AI Consensus ยถ

The AI consensus system allows machine learning models to participate in consensus:

// Create AI model for block validation
model := ai.NewSimpleModel("block-validator")

// Create consensus agent
agent := ai.New(nodeID, model, quasarEngine, photonEngine)

// AI proposes decision following Photonโ†’Quasar flow
decision, err := agent.ProposeDecision(ctx, blockData, context)

AI agents can use various model types:

  • SimpleModel: Feedforward neural network
  • LLMModel: Large language model integration
  • NeuralModel: Custom neural architectures
  • EnsembleModel: Combination of multiple models

Consensus Engines ยถ

Multiple consensus engines are available:

// Chain consensus (linear blockchain)
chainEngine := chain.NewEngine(db, validators)

// DAG consensus (parallel processing)
dagEngine := dag.NewEngine(config)

// Post-quantum consensus
pqEngine := pq.NewEngine(quantumConfig)

Each engine implements the core consensus.Engine interface and can be hot-swapped at runtime for dynamic consensus algorithm selection.

Photonโ†’Quasar Flow ยถ

The Photonโ†’Quasar consensus flow provides fast, quantum-secure finalization:

  1. Photon Phase: Emit proposals at light speed
  2. Wave Phase: Amplify through network via QZMQ
  3. Focus Phase: Converge on best options using AI
  4. Prism Phase: Refract through DAG for validation
  5. Horizon Phase: Finalize with quantum certificate

Example:

// Photon emits proposal
proposal, err := photon.Emit(blockData)

// Quasar validates through DAG
cert, err := quasar.Finalize(proposal)

Quantum-Secure Networking ยถ

All network communication uses QZMQ (Quantum-Secure ZeroMQ) with post-quantum cryptography:

// Create quantum-secure publisher
pub, err := qzmq.NewPublisher(config)

// Messages signed with Dilithium, encrypted with Kyber
err = pub.Send(qzmq.Message{
	From: nodeID,
	Data: proposalData,
	Type: qzmq.TypeConsensus,
})

QZMQ provides:

  • Dilithium signatures (post-quantum)
  • Kyber encryption (quantum-resistant)
  • Forward secrecy
  • Replay protection

Shared Hallucinations ยถ

AI agents share "hallucinations" (model states) across the network for distributed learning and consensus:

// Update shared hallucination
agent.AddTrainingData(example)

// Synchronize with network
err := agent.SyncSharedMemory(ctx)

// Get hallucination
hallucination, exists := agent.GetSharedHallucination(id)

Shared hallucinations enable:

  • Distributed model training
  • Consensus on AI decisions
  • Evolutionary model improvement
  • Byzantine fault tolerance

Cross-Chain Integration ยถ

The consensus system integrates with the Lux DEX for cross-chain operations:

import "github.com/luxfi/dex/pkg/lx"

// Use production bridge
bridge := lx.NewCrossChainBridge(config)

// Wrap with AI validation
adapter := NewAIBridgeAdapter(bridge, agent, nodeID)

// Process cross-chain payment with AI consensus
result, err := adapter.ProcessAIPayment(ctx, request)

Performance ยถ

Benchmark results (Apple M1 Max):

Operation          Latency    Throughput
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Model Inference    1.5 ฮผs     666K ops/sec
Consensus Vote     529 ns     1.9M ops/sec
Feature Extract    37 ns      27M ops/sec
Sigmoid            5.6 ns     179M ops/sec
Photon Emit        245 ms     4 proposals/sec
Full Consensus     200-300 ms 3-5 blocks/sec

Examples ยถ

Progressive tutorial examples are provided in examples/:

01-simple-bridge      Cross-chain bridge basics
02-ai-payment        AI payment validation
03-qzmq-networking   Quantum-secure messaging
04-grpc-service      gRPC API integration
05-python-client     Python integration
06-nodejs-client     TypeScript integration
07-ai-consensus      Dynamic AI consensus

Each example includes runnable code, comprehensive tests, and detailed documentation.

See examples/README.md for the complete learning path.

Testing ยถ

The package includes extensive tests:

  • Unit tests (co-located with source)
  • Integration tests (test/integration/)
  • Benchmarks (benchmarks/)
  • Example tests (in examples/ subdirectories)

Run tests:

go test ./...                    # All tests
go test -v ./ai/                 # AI package tests
go test -bench=. ./ai/           # Benchmarks
go test -tags=integration ./...  # Integration tests

Documentation ยถ

Additional documentation:

  • README.md Project overview
  • LLM.md AI assistant knowledge base
  • REFACTORING_FINAL.md Recent refactoring summary
  • EXAMPLES_COMPLETE.md Tutorial system overview
  • paper/ Academic whitepaper
  • examples/README.md Learning path guide

Security ยถ

Security features:

  • Post-quantum cryptography (Dilithium, Kyber)
  • Quantum-secure networking (QZMQ)
  • Byzantine fault tolerance
  • Cryptographic consensus proofs
  • Forward secrecy
  • Replay attack protection

Contributing ยถ

See CONTRIBUTING.md for development guidelines.

License ยถ

Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved. See LICENSE for details.

Index ยถ

Constants ยถ

View Source
const (
	// Decision outcomes
	DecideUndecided = types.DecideUndecided
	DecideAccept    = types.DecideAccept
	DecideReject    = types.DecideReject

	// Vote types
	VotePreference = types.VotePreference
	VoteCommit     = types.VoteCommit
	VoteCancel     = types.VoteCancel

	// Block status
	StatusUnknown    = types.StatusUnknown
	StatusProcessing = types.StatusProcessing
	StatusRejected   = types.StatusRejected
	StatusAccepted   = types.StatusAccepted

	// VM states
	Unknown       = interfaces.Unknown
	Starting      = interfaces.Starting
	Syncing       = interfaces.Syncing
	Bootstrapping = interfaces.Bootstrapping
	Ready         = interfaces.Ready
	Degraded      = interfaces.Degraded
	Stopping      = interfaces.Stopping
	Stopped       = interfaces.Stopped
)

Constants re-exported for convenience

Variables ยถ

View Source
var (
	// GenesisID is the ID of the genesis block
	GenesisID = types.GenesisID

	// Common errors
	ErrBlockNotFound  = types.ErrBlockNotFound
	ErrInvalidBlock   = types.ErrInvalidBlock
	ErrInvalidVote    = types.ErrInvalidVote
	ErrNoQuorum       = types.ErrNoQuorum
	ErrAlreadyVoted   = types.ErrAlreadyVoted
	ErrNotValidator   = types.ErrNotValidator
	ErrTimeout        = types.ErrTimeout
	ErrNotInitialized = types.ErrNotInitialized
	ErrUnknownState   = errors.New("unknown state")
)

Variables re-exported for convenience

Context accessor functions re-exported from context package

View Source
var (
	SingleValidatorParams = config.SingleValidatorParams
	LocalParams           = config.LocalParams
	TestnetParams         = config.TestnetParams
	MainnetParams         = config.MainnetParams
	DefaultParams         = config.DefaultParams
	XChainParams          = config.XChainParams
)

Parameter presets for convenience

Functions ยถ

func GetConfig ยถ added in v1.22.1

func GetConfig(nodeCount int) config.Parameters

GetConfig returns consensus parameters based on the number of nodes

Types ยถ

type Block ยถ added in v1.22.0

type Block = types.Block

Core types

func NewBlock ยถ added in v1.22.0

func NewBlock(id ID, parentID ID, height uint64, payload []byte) *Block

NewBlock creates a new block with default values

type Certificate ยถ added in v1.22.0

type Certificate = types.Certificate

Type aliases for clean single-import experience

type Chain ยถ added in v1.22.0

type Chain = engine.Chain

Type aliases for clean single-import experience

func NewChain ยถ added in v1.22.0

func NewChain(cfg Config) *Chain

NewChain creates a new chain consensus engine

func QuickStart ยถ added in v1.22.0

func QuickStart(ctx context.Context) (*Chain, error)

QuickStart initializes and starts a consensus engine with default config

type Config ยถ

type Config = types.Config

Type aliases for clean single-import experience

func DefaultConfig ยถ added in v1.22.0

func DefaultConfig() Config

DefaultConfig returns the default consensus configuration

type Context ยถ

type Context = consensuscontext.Context

Context type

type Decision ยถ added in v1.22.0

type Decision = types.Decision

Type aliases for clean single-import experience

type Engine ยถ

type Engine = engine.Engine

Engine types

func NewChainEngine ยถ

func NewChainEngine() Engine

NewChainEngine creates a new chain consensus engine with default config

func NewDAG ยถ added in v1.22.0

func NewDAG(cfg Config) Engine

NewDAG creates a new DAG consensus engine (placeholder for future)

func NewDAGEngine ยถ

func NewDAGEngine() Engine

NewDAGEngine creates a new DAG consensus engine with default config

func NewPQ ยถ added in v1.22.0

func NewPQ(cfg Config) Engine

NewPQ creates a new post-quantum consensus engine (placeholder for future)

func NewPQEngine ยถ

func NewPQEngine() Engine

NewPQEngine creates a new PQ consensus engine with default config

type Hash ยถ added in v1.22.0

type Hash = types.Hash

Type aliases for clean single-import experience

type ID ยถ added in v1.22.0

type ID = types.ID

Type aliases for clean single-import experience

type NodeID ยถ added in v1.22.0

type NodeID = types.NodeID

Type aliases for clean single-import experience

type State ยถ

type State = interfaces.State

VM State type

type Status ยถ added in v1.22.0

type Status = types.Status

Type aliases for clean single-import experience

type Vote ยถ added in v1.22.0

type Vote = types.Vote

Type aliases for clean single-import experience

func NewVote ยถ added in v1.22.0

func NewVote(blockID ID, voteType VoteType, voter NodeID) *Vote

NewVote creates a new vote

type VoteType ยถ added in v1.22.0

type VoteType = types.VoteType

Type aliases for clean single-import experience

Directories ยถ

Path Synopsis
cmd
bench command
Package main provides the bench CLI tool for consensus benchmarking
Package main provides the bench CLI tool for consensus benchmarking
checker command
Package main provides the checker CLI tool for consensus health checking
Package main provides the checker CLI tool for consensus health checking
consensus command
Package main provides the main consensus CLI tool
Package main provides the main consensus CLI tool
params command
Package main provides the params CLI tool for viewing consensus network parameters
Package main provides the params CLI tool for viewing consensus network parameters
server command
sim command
Package main provides the sim CLI tool for consensus simulation
Package main provides the sim CLI tool for consensus simulation
Package context provides consensus context for VMs
Package context provides consensus context for VMs
Package core provides core consensus interfaces and contracts.
Package core provides core consensus interfaces and contracts.
block
Package block provides block interfaces for consensus
Package block provides block interfaces for consensus
coremock
Package coremock provides mock implementations for testing
Package coremock provides mock implementations for testing
dag
interfaces
Package interfaces defines core consensus interfaces
Package interfaces defines core consensus interfaces
Package engine houses the three consensus engines: chain, dag, and pq.
Package engine houses the three consensus engines: chain, dag, and pq.
chain
Package chain implements linear consensus protocol.
Package chain implements linear consensus protocol.
chain/block/blockmock
Package blockmock is a generated GoMock package.
Package blockmock is a generated GoMock package.
chain/block/blocktest
Package blocktest provides test utilities for blocks
Package blocktest provides test utilities for blocks
chain/chainmock
Package chainmock provides mock implementations for testing
Package chainmock provides mock implementations for testing
chain/chaintest
Package chaintest provides test utilities for chains
Package chaintest provides test utilities for chains
chain/syncer
Package syncer provides state synchronization for blockchain engines
Package syncer provides state synchronization for blockchain engines
dag
Package dag provides DAG consensus functionality
Package dag provides DAG consensus functionality
enginemock
Package coremock provides mock implementations for core consensus
Package coremock provides mock implementations for core consensus
enginetest
Package enginetest provides test utilities for consensus engines
Package enginetest provides test utilities for consensus engines
enginetest/coretest
Package coretest provides test utilities for consensus engine core
Package coretest provides test utilities for consensus engine core
interfaces
Package interfaces provides consensus engine interfaces.
Package interfaces provides consensus engine interfaces.
pq
Package pq implements the post-quantum consensus engine that combines classical and quantum-resistant consensus mechanisms.
Package pq implements the post-quantum consensus engine that combines classical and quantum-resistant consensus mechanisms.
test
Package examples demonstrates integration between consensus and node packages
Package examples demonstrates integration between consensus and node packages
networking
sender/sendermock
Package sendermock provides mock implementations for message sending
Package sendermock provides mock implementations for message sending
sender/sendertest
Package sendertest provides test utilities for message sending
Package sendertest provides test utilities for message sending
protocol
chain
Package chain provides basic blockchain primitives and interfaces.
Package chain provides basic blockchain primitives and interfaces.
field
Package field orchestrates DAG finality via distributed state reduction.
Package field orchestrates DAG finality via distributed state reduction.
flare
Package flare finalizes DAG cuts via a cascading accept protocol.
Package flare finalizes DAG cuts via a cascading accept protocol.
focus
Package focus accumulates confidence by counting ฮฒ consecutive successes.
Package focus accumulates confidence by counting ฮฒ consecutive successes.
horizon
Package horizon houses DAG order-theory predicates.
Package horizon houses DAG order-theory predicates.
nebula
Package nebula provides DAG consensus mode.
Package nebula provides DAG consensus mode.
nova
Package nova provides linear blockchain consensus mode.
Package nova provides linear blockchain consensus mode.
photon
Package photon chooses a K-sized committee each round.
Package photon chooses a K-sized committee each round.
prism
Package prism provides DAG geometry: frontiers, cuts, and refractions.
Package prism provides DAG geometry: frontiers, cuts, and refractions.
quasar
Package quasar provides post-quantum overlay: dual BLS + ring certificates.
Package quasar provides post-quantum overlay: dual BLS + ring certificates.
ray
Package ray finalizes linear chains through single-threaded consensus.
Package ray finalizes linear chains through single-threaded consensus.
wave
Package wave computes per-round thresholds and drives a poll.
Package wave computes per-round thresholds and drives a poll.
wave/fpc
Package fpc implements Fast Probabilistic Consensus thresholds.
Package fpc implements Fast Probabilistic Consensus thresholds.
test
e2e
bag
Package bag provides multiset data structures for vote collection and counting.
Package bag provides multiset data structures for vote collection and counting.
codec
Package codec provides encoding/decoding for consensus types
Package codec provides encoding/decoding for consensus types
ids
set
uptime
Package uptime provides uptime calculation functionality
Package uptime provides uptime calculation functionality
uptime/uptimemock
Package uptimemock provides mock implementations for uptime tracking
Package uptimemock provides mock implementations for uptime tracking
validatorsmock
Package validatorsmock is a generated GoMock package.
Package validatorsmock is a generated GoMock package.
Package version provides version information
Package version provides version information

Jump to

Keyboard shortcuts

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