-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Description
Description
Part of issue #605: Adaptive Difficulty Adjustment for PoUW Consensus
Architectural improvement: Move difficulty adjustment policy ownership from lib-blockchain to lib-consensus, following the principle "consensus engine should own difficulty policy".
Current State
- Difficulty adjustment logic in
lib-blockchain::blockchain.rs - DAO proposal system in
lib-consensus - Parameter governance split between two crates
Desired State
lib-consensusowns difficulty adjustment algorithmlib-consensusownsDifficultyConfiglib-blockchaincallslib-consensus::adjust_difficulty()lib-consensusmanages DAO parameter updates- Clear separation of concerns
Acceptance Criteria
- Create
lib-consensus::difficulty_managermodule - Move
DifficultyConfigfromlib-blockchaintolib-consensus - Create
DifficultyManagerstruct inlib-consensus - Implement
adjust_difficulty()inDifficultyManager - Update
BlockchainConsensusCoordinatorto manage difficulty updates - Update
lib-blockchainto calllib-consensus::DifficultyManager - All existing tests pass after refactoring
- Add integration tests between crates
- Update documentation to reflect architecture
Priority
- MEDIUM - Nice to have for clean architecture
- Can be deferred until after feat: Implement adaptive difficulty adjustment for network-wide PoUW consensus #605 core implementation
Related
- Blocks issue feat: Implement adaptive difficulty adjustment for network-wide PoUW consensus #605: Adaptive Difficulty Adjustment for PoUW Consensus
Metadata
Metadata
Assignees
Labels
No labels