lighthouse/consensus
Paul Hauner 61d5b592cb Memory usage reduction (#1522)
## Issue Addressed

NA

## Proposed Changes

- Adds a new function to allow getting a state with a bad state root history for attestation verification. This reduces unnecessary tree hashing during attestation processing, which accounted for 23% of memory allocations (by bytes) in a recent `heaptrack` observation.
- Don't clone caches on intermediate epoch-boundary states during block processing.
- Reject blocks that are known to fork choice earlier during gossip processing, instead of waiting until after state has been loaded (this only happens in edge-case).
- Avoid multiple re-allocations by creating a "forced" exact size iterator.

## Additional Info

NA
2020-08-17 08:05:13 +00:00
..
cached_tree_hash Update smallvec (#1339) 2020-07-07 16:57:27 +10:00
fork_choice Restrict fork choice getters to finalized blocks (#1475) 2020-08-14 06:36:38 +00:00
int_to_bytes Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
merkle_proof Deny warnings on CI (#1372) 2020-07-21 05:51:33 +00:00
proto_array Restrict fork choice getters to finalized blocks (#1475) 2020-08-14 06:36:38 +00:00
safe_arith Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
serde_hex Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
ssz Fix clippy warnings (#1385) 2020-07-23 14:18:00 +00:00
ssz_derive Fix eval order lint in ssz_derive (#1210) 2020-05-28 11:37:40 +10:00
ssz_types Fix clippy warnings (#1385) 2020-07-23 14:18:00 +00:00
state_processing Support multiple BLS implementations (#1335) 2020-07-25 02:03:18 +00:00
swap_or_not_shuffle Bump all spec tags to v0.12.1 (#1275) 2020-06-19 11:18:27 +10:00
tree_hash Add caching for state.eth1_data_votes (#919) 2020-07-24 02:19:47 +00:00
tree_hash_derive Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
types Memory usage reduction (#1522) 2020-08-17 08:05:13 +00:00