mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-02 07:40:13 +00:00
Consensus context with proposer index caching (#3604)
## Issue Addressed Closes https://github.com/sigp/lighthouse/issues/2371 ## Proposed Changes Backport some changes from `tree-states` that remove duplicated calculations of the `proposer_index`. With this change the proposer index should be calculated only once for each block, and then plumbed through to every place it is required. ## Additional Info In future I hope to add more data to the consensus context that is cached on a per-epoch basis, like the effective balances of validators and the base rewards. There are some other changes to remove indexing in tests that were also useful for `tree-states` (the `tree-states` types don't implement `Index`).
This commit is contained in:
@@ -121,7 +121,7 @@ pub fn run<T: EthSpec>(mut env: Environment<T>, matches: &ArgMatches) -> Result<
|
||||
};
|
||||
|
||||
for i in 0..runs {
|
||||
let mut state = state.clone_with(CloneConfig::committee_caches_only());
|
||||
let mut state = state.clone_with(CloneConfig::all());
|
||||
|
||||
let start = Instant::now();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user