Gulshan Yadav
3e68f72743
fix: resolve 35 clippy warnings across Rust and Dart codebases
...
## Rust Fixes (35 warnings resolved)
- Remove unused imports (synor-vm, synor-bridge, tests)
- Remove unused variables and prefix intentional ones with underscore
- Use derive for Default implementations (6 structs)
- Replace manual is_multiple_of with standard method (3 occurrences)
- Fix needless borrows by using direct expressions (12 occurrences)
- Suppress false-positive variant assignment warnings with allow attributes
- Fix Default field initialization pattern in synor-crypto
- Rename MerklePath::to_string() to path() to avoid conflict with Display trait
## Flutter/Dart Fixes
- Add const constructors for immutable objects (8 instances)
- Remove unused imports (dart:convert, collection package, tensor.dart)
## Impact
- Reduced clippy warnings from 49 to 10 (79% reduction)
- Remaining 10 warnings are "too many arguments" requiring architectural refactoring
- All library code compiles successfully
- Code quality and maintainability improved
2026-01-26 17:08:57 +05:30
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