-
Notifications
You must be signed in to change notification settings - Fork 906
Description
Description
Presently block processing on the tree-states
branch is a little bit slower than on unstable
. Last I benchmarked it was around 3-4x slower (20ms) than unstable
(5ms) for core block processing.
One of the reasons for this is the O(log n)
lookups of validators and validator participation bits during attestation processing. I started adding an EpochCache
which stores the pre-computed base_rewards for attestation processing, but it isn't fully integrated yet.
We could integrate either by storing it as a cache field on the BeaconState
, and/or by storing it separately in a map. I think my current preference is to attach it to the BeaconState
behind an Arc
(it is immutable after initialization, and we want to share it between states in the same epoch).