nimbus-eth2/beacon_chain
Jacek Sieka 7501f10587
60% state replay speedup (#4434)
* 60% state replay speedup

* don't use HashList for epoch participation - in addition to the code
currently clearing the caches several times redundantly, clearing has to
be done each block nullifying the benefit (35%)
* introduce active balance cache - computing it is slow due to cache
unfriendliness in the random access pattern and bounds checking and we
do it for every block - this cache follows the same update pattern as
the active validator index cache (20%)
* avoid recomputing base reward several times per attestation (5%)

Applying 1024 blocks goes from 20s to ~8s on my laptop - these kinds of
requests happen on historical REST queries but also whenever there's a
reorg.

* fix test and diffs
2022-12-19 14:01:49 +02:00
..
2022-12-19 14:01:49 +02:00
2022-12-14 18:30:56 +01:00
2022-04-08 16:22:49 +00:00
2022-12-19 14:01:49 +02:00
2022-12-12 20:18:57 +02:00