nimbus-eth2/tests/spec_epoch_processing
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 Fix comments in j/f tests + add a readme for scaled image 2019-08-28 16:22:48 +02:00
epoch_utils.nim speed up reward/penalty calculation 2020-10-23 19:23:36 +03:00
eth2-finalization.png v0.8.1 tests refactor (#326) 2019-08-28 12:07:00 +00:00
justification_finalization_helpers.nim spec cleanups (#1379) 2020-07-27 16:04:44 +00:00
test_process_justification_and_finalization.nim Prefer converting int` to uint64 and switch foo.len.uint64 to .len64 (#1375) 2020-07-26 20:55:48 +02:00

README.md

Epoch state transition

Finalization and justification