Skip to content

Conversation

@bamrith
Copy link
Contributor

@bamrith bamrith commented Nov 12, 2025

No description provided.

omegablitz
omegablitz previously approved these changes Nov 13, 2025
@bamrith bamrith marked this pull request as ready for review November 13, 2025 20:26
Copilot AI review requested due to automatic review settings November 13, 2025 20:26
Copilot finished reviewing on behalf of bamrith November 13, 2025 20:29
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the u64-based leader schedule implementation from the codebase and simplifies the leader election mechanism to only use U256-based weighted round-robin scheduling. The key changes include removing the Epoch parameter from the get_leader trait method and eliminating the staking_activation configuration that previously determined which algorithm to use.

  • Simplified the LeaderElection trait by removing the epoch parameter from get_leader method
  • Removed u64-based leader schedule generation and the associated staking_activation epoch configuration
  • Updated WeightedRoundRobin to use Default trait instead of new() constructor

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
monad-validator/src/leader_election.rs Removed Epoch parameter from get_leader trait method signature and cleaned up imports
monad-validator/src/weighted_round_robin.rs Removed staking_activation field, replaced new() with Default impl, removed u64-based functions (randomize, generate_random_validator_u64), simplified get_leader implementation, and removed obsolete test
monad-validator/src/simple_round_robin.rs Removed unused _epoch parameter from get_leader implementation and cleaned up imports
monad-testutil/src/proposal.rs Updated get_leader call site to remove epoch argument
monad-state/src/lib.rs Updated get_leader call sites and changed instantiation to use WeightedRoundRobin::default()
monad-node/src/main.rs Changed WeightedRoundRobin instantiation to use default() instead of new(staking_activation)
monad-node/examples/ledger-tail.rs Removed unused ChainConfig and MonadChainConfig imports, removed staking activation lookup code, updated leader election instantiation to use default()
monad-debugger/src/graphql/mod.rs Updated get_leader call sites to remove epoch argument
monad-consensus/tests/proposal.rs Removed unused _epoch parameter from test implementation of LeaderElection trait
monad-consensus/src/validation/signing.rs Updated all get_leader call sites and changed test instantiations to use WeightedRoundRobin::default()
monad-consensus-state/src/lib.rs Updated all get_leader call sites throughout the consensus state machine to remove epoch argument
monad-blocksync/src/blocksync.rs Updated test get_leader call site to remove epoch argument

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

michael-yxchen
michael-yxchen previously approved these changes Nov 19, 2025
@bamrith bamrith added this pull request to the merge queue Nov 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 21, 2025
@bamrith bamrith force-pushed the bharath/remove_u64_leader_schedule branch from d58433c to 3fe546c Compare November 21, 2025 17:10
@bamrith bamrith dismissed stale reviews from omegablitz and michael-yxchen via af3a374 November 21, 2025 17:26
@bamrith bamrith force-pushed the bharath/remove_u64_leader_schedule branch from 3fe546c to af3a374 Compare November 21, 2025 17:26
@bamrith bamrith added this pull request to the merge queue Nov 26, 2025
Merged via the queue into master with commit f5fb259 Nov 26, 2025
3 checks passed
@bamrith bamrith deleted the bharath/remove_u64_leader_schedule branch November 26, 2025 16:05
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.

5 participants