Skip to content

Commit

Permalink
[consensus] Remove unused mysticeti_leader_scoring_and_schedule flag (#…
Browse files Browse the repository at this point in the history
…19800)

## Description 

Leader scoring & leader schedule are enabled in mainnet

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] REST API:
  • Loading branch information
arun-koshy authored Oct 10, 2024
1 parent 75264b9 commit e7948cc
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 522 deletions.
20 changes: 5 additions & 15 deletions consensus/core/src/authority_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use crate::{
core::{Core, CoreSignals},
core_thread::{ChannelCoreThreadDispatcher, CoreThreadHandle},
dag_state::DagState,
leader_schedule::{LeaderSchedule, LeaderSwapTable},
leader_schedule::LeaderSchedule,
leader_timeout::{LeaderTimeoutTask, LeaderTimeoutTaskHandle},
metrics::initialise_metrics,
network::{
Expand Down Expand Up @@ -233,20 +233,10 @@ where
let block_manager =
BlockManager::new(context.clone(), dag_state.clone(), block_verifier.clone());

let leader_schedule = if context
.protocol_config
.mysticeti_leader_scoring_and_schedule()
{
Arc::new(LeaderSchedule::from_store(
context.clone(),
dag_state.clone(),
))
} else {
Arc::new(LeaderSchedule::new(
context.clone(),
LeaderSwapTable::default(),
))
};
let leader_schedule = Arc::new(LeaderSchedule::from_store(
context.clone(),
dag_state.clone(),
));

let commit_consumer_monitor = commit_consumer.monitor();
commit_consumer_monitor
Expand Down
10 changes: 0 additions & 10 deletions consensus/core/src/commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,16 +518,6 @@ pub(crate) struct CommitInfo {
pub(crate) reputation_scores: ReputationScores,
}

impl CommitInfo {
// Returns a new CommitInfo.
pub(crate) fn new(committed_rounds: Vec<Round>, reputation_scores: ReputationScores) -> Self {
CommitInfo {
committed_rounds,
reputation_scores,
}
}
}

/// CommitRange stores a range of CommitIndex. The range contains the start (inclusive)
/// and end (inclusive) commit indices and can be ordered for use as the key of a table.
///
Expand Down
Loading

0 comments on commit e7948cc

Please sign in to comment.