lighthouse/consensus
Michael Sproul 59ec6b71b8 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`).
2022-10-15 22:25:54 +00:00
..
cached_tree_hash Update and consolidate dependencies (#3136) 2022-04-04 00:26:16 +00:00
fork_choice Strict count unrealized (#3522) 2022-09-05 04:50:47 +00:00
int_to_bytes Update to Rust 1.59 and 2021 edition (#3038) 2022-02-25 00:10:17 +00:00
merkle_proof New rust lints for rustc 1.64.0 (#3602) 2022-09-23 03:52:46 +00:00
proto_array Strict count unrealized (#3522) 2022-09-05 04:50:47 +00:00
safe_arith Inline safe_arith methods (#3229) 2022-05-31 06:09:12 +00:00
serde_utils Add a u256_hex_be module to encode/decode U256 types (#3321) 2022-07-15 07:31:21 +00:00
ssz Pre-allocate vectors in SSZ decoding (#3417) 2022-09-16 11:54:17 +00:00
ssz_derive Update to Rust 1.59 and 2021 edition (#3038) 2022-02-25 00:10:17 +00:00
ssz_types New rust lints for rustc 1.64.0 (#3602) 2022-09-23 03:52:46 +00:00
state_processing Consensus context with proposer index caching (#3604) 2022-10-15 22:25:54 +00:00
swap_or_not_shuffle Update and consolidate dependencies (#3136) 2022-04-04 00:26:16 +00:00
tree_hash Use SmallVec for TreeHash packed encoding (#3581) 2022-09-16 08:54:06 +00:00
tree_hash_derive Use SmallVec for TreeHash packed encoding (#3581) 2022-09-16 08:54:06 +00:00
types Optimise HTTP validator lookups (#3559) 2022-10-15 22:25:51 +00:00