lighthouse/testing
Paul Hauner 21bcc8848d Add caching for state.eth1_data_votes (#919)
## Issue Addressed

NA

## Proposed Changes

Adds additional tree hash caching for `state.eth1_data_votes`.

Presently, each time we tree hash the `BeaconState`, we recompute the `state.eth1_data_votes` tree in it's entirety. This is because we only previous had support for caching fixed-length lists.

This PR adds the `Eth1DataVotesTreeHashCache` which provides caching for the `state.eth1_data_votes` list. The cache is aware of `SLOTS_PER_ETH1_VOTING_PERIOD` and will reset itself whenever that boundary is crossed.

This cache adds a new (but somewhat fundamental) restriction to tree hash caching:

*For some state `s`, `s.tree_hash_cache` is only valid for `s` or descendants of `s` that have been reached via state transitions that are faithful to the specification (invalid blocks are permitted, as long as they are faithfully processed).*
2020-07-24 02:19:47 +00:00
..
ef_tests Add caching for state.eth1_data_votes (#919) 2020-07-24 02:19:47 +00:00
eth1_test_rig Improve tokio task execution (#1181) 2020-06-04 21:48:05 +10:00
node_test_rig Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
simulator Fix clippy warnings (#1385) 2020-07-23 14:18:00 +00:00
state_transition_vectors Bump all spec tags to v0.12.1 (#1275) 2020-06-19 11:18:27 +10:00