Skip to content

Conversation

@qj0r9j0vc2
Copy link
Member

Summary

  • Implement Tendermint's weighted round-robin proposer selection algorithm
  • Create ProposerSelector struct with priority tracking using parking_lot::RwLock
  • Integrate with CipherBftContext for deterministic proposer selection
  • Add epoch transition handling and priority overflow prevention

Test Plan

  • All existing consensus tests pass (63 tests)
  • New unit tests for proposer selection algorithm
  • Clippy clean, rustfmt applied

@qj0r9j0vc2 qj0r9j0vc2 self-assigned this Jan 30, 2026
@qj0r9j0vc2 qj0r9j0vc2 force-pushed the feat/weighted-proposer branch from d88e2af to 404d244 Compare January 30, 2026 10:25
qj0r9j0vc2 and others added 6 commits January 30, 2026 20:14
Nodes starting at different heights (e.g., after syncing) were computing
different numbers of advances to reach the same (height, round), causing
proposer selection disagreement and consensus stalls.

The fix ensures all nodes compute advances from a fixed genesis point
(height 1, round Nil) on their first select_proposer call, regardless
of their initial_height. This guarantees deterministic proposer selection
across all nodes in the network.

Also fixes a test in execution_bridge.rs that wasn't destructuring the
tuple returned by create_default_bridge().

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants