mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
- Rename quasar files to simpler names: - quasar_aggregator.go → core.go - quasar_impl.go → engine.go - quasar.go → bls.go - event_horizon.go → horizon.go - hybrid_consensus.go → hybrid.go - verkle_witness.go → witness.go - prism_dag.go → dag.go - Rename types for clarity: - PChain → BLS (BLS signature aggregation) - NewPChain → NewBLS - QuasarHybridConsensus alias added for backward compatibility - Add missing documentation: - protocol/nova/doc.go - linear blockchain consensus - protocol/nebula/doc.go - DAG consensus mode - protocol/chain/doc.go - blockchain primitives All tests pass. Backward-compatible aliases provided.
23 lines
641 B
Go
23 lines
641 B
Go
package prism
|
|
|
|
import "github.com/luxfi/consensus/core/types"
|
|
|
|
// Frontier represents a cut/frontier in the DAG partial order
|
|
type Frontier struct {
|
|
Height uint64
|
|
Vertices []types.NodeID
|
|
}
|
|
|
|
// Refractor analyzes light paths through the DAG structure
|
|
// to determine optimal ordering and conflict resolution
|
|
type Refractor interface {
|
|
// ComputeFrontier returns the current frontier of the DAG
|
|
ComputeFrontier() Frontier
|
|
|
|
// RefractPath determines the optimal path through conflicting vertices
|
|
RefractPath(from, to types.NodeID) []types.NodeID
|
|
|
|
// Interference checks if two vertices conflict
|
|
Interference(a, b types.NodeID) bool
|
|
}
|