From 328f7e800601b9b3172a66550b7b609ef6e180db Mon Sep 17 00:00:00 2001 From: danielxiangzl Date: Fri, 13 Dec 2024 15:34:12 -0800 Subject: [PATCH] use rotating leader --- types/src/on_chain_config/consensus_config.rs | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/types/src/on_chain_config/consensus_config.rs b/types/src/on_chain_config/consensus_config.rs index d46718d6b09b3..da5f95a1c4298 100644 --- a/types/src/on_chain_config/consensus_config.rs +++ b/types/src/on_chain_config/consensus_config.rs @@ -374,22 +374,23 @@ impl Default for ConsensusConfigV1 { back_pressure_limit: 10, exclude_round: 40, max_failed_authors_to_store: 10, - proposer_election_type: ProposerElectionType::LeaderReputation( - LeaderReputationType::ProposerAndVoterV2(ProposerAndVoterConfig { - active_weight: 1000, - inactive_weight: 10, - failed_weight: 1, - failure_threshold_percent: 10, // = 10% - // In each round we get stastics for the single proposer - // and large number of validators. So the window for - // the proposers needs to be significantly larger - // to have enough useful statistics. - proposer_window_num_validators_multiplier: 10, - voter_window_num_validators_multiplier: 1, - weight_by_voting_power: true, - use_history_from_previous_epoch_max_count: 5, - }), - ), + proposer_election_type: ProposerElectionType::RotatingProposer(1), + // ProposerElectionType::LeaderReputation( + // LeaderReputationType::ProposerAndVoterV2(ProposerAndVoterConfig { + // active_weight: 1000, + // inactive_weight: 10, + // failed_weight: 1, + // failure_threshold_percent: 10, // = 10% + // // In each round we get stastics for the single proposer + // // and large number of validators. So the window for + // // the proposers needs to be significantly larger + // // to have enough useful statistics. + // proposer_window_num_validators_multiplier: 10, + // voter_window_num_validators_multiplier: 1, + // weight_by_voting_power: true, + // use_history_from_previous_epoch_max_count: 5, + // }), + // ), } } }