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:
Justin Starry
2021-10-06 00:53:26 -04:00
committed by GitHub
parent 48d3627c8b
commit 129716f3f0
10 changed files with 731 additions and 41 deletions

View File

@ -1443,6 +1443,14 @@ pub fn main() {
.help("Allow contacting private ip addresses")
.hidden(true),
)
.arg(
Arg::with_name("disable_epoch_boundary_optimization")
.long("disable-epoch-boundary-optimization")
.takes_value(false)
.help("Disables epoch boundary optimization and overrides the \
optimize_epoch_boundary_updates feature switch if enabled.")
.hidden(true),
)
.after_help("The default subcommand is run")
.subcommand(
SubCommand::with_name("exit")
@ -2072,6 +2080,8 @@ pub fn main() {
tpu_coalesce_ms,
no_wait_for_vote_to_start_leader: matches.is_present("no_wait_for_vote_to_start_leader"),
accounts_shrink_ratio,
disable_epoch_boundary_optimization: matches
.is_present("disable_epoch_boundary_optimization"),
..ValidatorConfig::default()
};