DAG consensus implementation with QR-Avalanche algorithm.
This module provides the core DAG (Directed Acyclic Graph) implementation with quantum-resistant consensus using a modified Avalanche protocol.
Key Types
- [
QrDag] - Main DAG consensus implementation (alias forDAGConsensus) - [
Vertex] / [VertexId] - DAG vertices and their identifiers - [
Consensus] / [QRAvalanche] - Consensus algorithms and implementations - [
Graph] - High-performance graph data structure with caching - [
Node] - Node representation with state management - [
TipSelection] - Algorithms for choosing vertices to extend
Example Usage
use ;
use HashSet;
// Create a new DAG consensus instance
let mut dag = new;
// Add a message to the DAG
let message = b"Hello, DAG!".to_vec;
dag.add_message.expect;
// Check if the message exists
assert!;
// Get current tips
let tips = dag.get_tips;
println!;
// Create a vertex directly
let vertex_id = new;
let vertex = new;
dag.add_vertex.expect;