nimbus-eth2/tests/official
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
..
all_fixtures_require_ssz.nim update nim-beacon-chain to nimbus-eth2 in beacon_chain/, ncli/, tests/, and README.md (#1843) 2020-10-08 19:02:05 +00:00
fixtures_utils.nim speed up shuffling 2020-08-21 16:05:10 +03:00
test_fixture_bls.nim Generate markdown test reports 2020-03-13 14:38:59 +00:00
test_fixture_const_sanity_check.nim update v1.0.0-rc.0 preset spec references (#1891) 2020-10-19 13:53:23 +00:00
test_fixture_operations_attestations.nim restore EpochRef and flush statecaches on epoch transitions (#1312) 2020-07-15 12:44:18 +02:00
test_fixture_operations_attester_slashings.nim restore EpochRef and flush statecaches on epoch transitions (#1312) 2020-07-15 12:44:18 +02:00
test_fixture_operations_block_header.nim Bump nim-blscurve (#1491) 2020-08-15 19:33:58 +02:00
test_fixture_operations_deposits.nim Merge devel and resolve the conflicts 2020-07-08 15:36:03 +03:00
test_fixture_operations_proposer_slashings.nim fix output of proposer slashing test fixture (#1780) 2020-09-30 13:12:03 +00:00
test_fixture_operations_voluntary_exit.nim use cache in process_voluntary_exit() (#1507) 2020-08-14 12:42:59 +00:00
test_fixture_rewards.nim speed up reward/penalty calculation 2020-10-23 19:23:36 +03:00
test_fixture_sanity_blocks.nim add EF finality tests (#1515) 2020-08-17 07:19:48 +00:00
test_fixture_sanity_slots.nim stop discarding future epochs; remove a StateCache() construction (#1610) 2020-09-07 15:04:33 +00:00
test_fixture_ssz_consensus_objects.nim cache block hash (#1329) 2020-07-16 15:16:51 +02:00
test_fixture_ssz_consensus_objects.nim.cfg Ssz fixes (#566) 2019-11-19 12:04:51 +01:00
test_fixture_ssz_generic_types.nim reorder ssz (#1099) 2020-06-03 15:52:02 +02:00
test_fixture_state_transition_epoch.nim speed up reward/penalty calculation 2020-10-23 19:23:36 +03:00