lodestar
lodestar copied to clipboard
feat: improve prepareNextEpoch
Motivation
Reduce prepareNextEpoch time for lodestar
Description
- use hashtree for batch hash implemented in ssz
- copy the implementation of ListValidatorTreeViewDU from the ssz branch, the main thing is to compute validators' roots in batch during commit() phase
- batch hash validators, execute HashComputation[] in batch
- avoid memory allocation:
- no tree creation when we modify/add validator
- reuse balances tree