Commit graph

5 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
Gulshan Yadav
5c643af64c fix: resolve all clippy warnings for CI
Fix all Rust clippy warnings that were causing CI failures when built
with RUSTFLAGS=-Dwarnings. Changes include:

- Replace derivable_impls with derive macros for BlockBody, Network, etc.
- Use div_ceil() instead of manual implementation
- Fix should_implement_trait by renaming from_str to parse
- Add type aliases for type_complexity warnings
- Use or_default(), is_some_and(), is_multiple_of() where appropriate
- Remove needless borrows and redundant closures
- Fix manual_strip with strip_prefix()
- Add allow attributes for intentional patterns (too_many_arguments,
  needless_range_loop in cryptographic code, assertions_on_constants)
- Remove unused imports, mut bindings, and dead code in tests
2026-01-08 05:58:22 +05:30
Gulshan Yadav
d917f1ed22 style: format all Rust code with cargo fmt 2026-01-08 05:22:24 +05:30
Gulshan Yadav
48949ebb3f Initial commit: Synor blockchain monorepo
A complete blockchain implementation featuring:
- synord: Full node with GHOSTDAG consensus
- explorer-web: Modern React blockchain explorer with 3D DAG visualization
- CLI wallet and tools
- Smart contract SDK and example contracts (DEX, NFT, token)
- WASM crypto library for browser/mobile
2026-01-08 05:22:17 +05:30