Optimize stakes cache and rewards at epoch boundaries (#20432)
* Optimize stakes cache and rewards at epoch boundaries * Fetch from accounts db * Add cli flag for disabling epoch boundary optimization
This commit is contained in:
@@ -161,6 +161,7 @@ pub struct ValidatorConfig {
|
||||
pub validator_exit: Arc<RwLock<Exit>>,
|
||||
pub no_wait_for_vote_to_start_leader: bool,
|
||||
pub accounts_shrink_ratio: AccountShrinkThreshold,
|
||||
pub disable_epoch_boundary_optimization: bool,
|
||||
}
|
||||
|
||||
impl Default for ValidatorConfig {
|
||||
@@ -221,6 +222,7 @@ impl Default for ValidatorConfig {
|
||||
no_wait_for_vote_to_start_leader: true,
|
||||
accounts_shrink_ratio: AccountShrinkThreshold::default(),
|
||||
accounts_db_config: None,
|
||||
disable_epoch_boundary_optimization: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -820,6 +822,7 @@ impl Validator {
|
||||
rocksdb_max_compaction_jitter: config.rocksdb_compaction_interval,
|
||||
wait_for_vote_to_start_leader,
|
||||
accounts_shrink_ratio: config.accounts_shrink_ratio,
|
||||
disable_epoch_boundary_optimization: config.disable_epoch_boundary_optimization,
|
||||
},
|
||||
&max_slots,
|
||||
&cost_model,
|
||||
|
Reference in New Issue
Block a user