nimbus-eth2/beacon_chain/fork_choice
Jacek Sieka 7c0b4d28d2 speed up reward/penalty calculation
Calculating rewards/penalties is slow due to how we compute sets of
attestations validators then use the sets for inclusion checks, to see
who attested. The dominant function during validated block processing /
epoch processing is hash set building and lookup.

This PR inverts the flow by removing the sets and creating a single
large validator status list, then applying all relevant state
attestations, then updating rewards and penalties.

This provides a 10x speedup to epoch processing which in turn speeds up
both empty slot and block processing - for example, on startup, we
replay all non-finalized blocks to prime fork choice - the same when
validating attestations or replaying states on reorg.
2020-10-23 19:23:36 +03:00
..
README.md bump a couple more eth2 phase0 spec refs to v0.11.1 2020-04-17 16:37:52 +03:00
fork_choice.nim speed up reward/penalty calculation 2020-10-23 19:23:36 +03:00
fork_choice_types.nim misc memory and perf fixes (#1899) 2020-10-22 12:53:33 +02:00
proto_array.nim fix some todo (#1645) 2020-09-14 14:50:03 +00:00