mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
Verified every protocol/*.go against its doc.go. Fixed all inaccuracies: - README.md: rewrote to match actual code; removed bogus SDK claims (C/Rust/C++ stubs presented as "100% test parity"), impossible benchmark numbers (0.33ns Quasar Phase I = sub-clock-cycle), stale version badge (v1.22.0 vs actual v1.22.84), wrong protocol descriptions (nebula as "state sync", nova as "parallel chain"), missing protocols (ray, field not listed) - doc.go: stripped AI fiction (QZMQ, shared hallucinations, AI-powered validation, Dilithium/Kyber naming), replaced with accurate Quasar family description - LLM.md: stripped 40KB of old session logs down to essential reference; accurate protocol table, honest SDK status, measured benchmarks only - docs/index.mdx: fixed nebula/nova labels, removed impossible benchmark - protocol/nebula/doc.go: fixed "consensus utils" typo
36 lines
1.3 KiB
Go
36 lines
1.3 KiB
Go
// Copyright (C) 2025, Lux Industries Inc All rights reserved.
|
|
|
|
// Package nebula provides DAG consensus mode.
|
|
//
|
|
// Nebula implements directed acyclic graph (DAG) consensus where vertices can
|
|
// have multiple parents and progress in parallel. It wraps the field engine
|
|
// to provide DAG-specific semantics: frontier tracking, vertex proposal, and
|
|
// parallel finality.
|
|
//
|
|
// In the cosmic metaphor, a nebula is a stellar nursery - a cloud of possibilities
|
|
// collapsing into ordered structure, representing parallel block creation that
|
|
// eventually achieves consensus.
|
|
//
|
|
// Nebula is designed for high-throughput chains that benefit from parallel
|
|
// block production, such as the X-Chain for asset transfers.
|
|
//
|
|
// Key concepts:
|
|
// - DAG structure: vertices can have multiple parents
|
|
// - Parallel finality: multiple vertices can be finalized concurrently
|
|
// - Frontier tracking: maintains the DAG tips (unfinalized vertices)
|
|
// - Causal ordering: ensures consistent total ordering of finalized vertices
|
|
//
|
|
// Usage:
|
|
//
|
|
// cfg := nebula.Config{
|
|
// PollSize: 20,
|
|
// Alpha: 0.8,
|
|
// Beta: 15,
|
|
// RoundTO: 250 * time.Millisecond,
|
|
// }
|
|
// n := nebula.NewNebula(cfg, cut, transport, store, proposer, committer)
|
|
// n.Start(ctx)
|
|
//
|
|
// See also: field (underlying engine), wave (voting primitive), horizon (finality).
|
|
package nebula
|