Commit graph

2 commits

Author SHA1 Message Date
Gulshan Yadav
4983193f63 feat(dag): add Phase 13 M1 - DAGKnight 32/100 BPS support
- Add BlockRateConfig enum with Standard (10 BPS), Enhanced (32 BPS),
  and Maximum (100 BPS) presets
- Add AdaptiveKBounds with scaled k ranges per block rate:
  - Standard: k 8-64, default 18
  - Enhanced: k 16-128, default 32
  - Maximum: k 50-255, default 64
- Add DagKnightManager::with_config() constructor for block rate selection
- Update adaptive k calculation to use configurable bounds
- Add NetworkConfig module in synor-consensus with:
  - BpsMode enum and NetworkConfig struct
  - DAA window, finality depth, pruning depth scaling
  - BPS comparison table generator
- Add comprehensive tests for all block rate configurations
2026-01-19 20:10:05 +05:30
Gulshan Yadav
e2a6a10bee feat(dag): implement DAGKnight adaptive consensus protocol
Phase 13 Milestone 1 - DAGKnight Protocol Implementation:

- Add LatencyTracker for network propagation delay measurement
  - Rolling statistics (mean, stddev, P95, P99)
  - Anticone growth rate tracking
  - Configurable sample window (1000 samples)

- Implement DagKnightManager extending GHOSTDAG
  - Adaptive k parameter based on observed network latency
  - Probabilistic confirmation time estimation
  - Confidence levels (Low/Medium/High/VeryHigh)
  - ConfirmationStatus with depth and finality tracking

- Add BlockRateConfig for throughput scaling
  - Standard: 10 BPS (100ms block time) - current
  - Enhanced: 32 BPS (31ms block time) - target
  - Maximum: 100 BPS (10ms block time) - stretch goal
  - Auto-adjusted merge/finality/pruning depths per config

- Utility functions for network analysis
  - calculate_optimal_k() for k parameter optimization
  - estimate_throughput() for TPS projection

Based on DAGKnight paper (2022) and Kaspa 2025 roadmap.
2026-01-19 09:46:50 +05:30