ChainSafe / lodestar

🌟 TypeScript Implementation of Ethereum Consensus
https://lodestar.chainsafe.io
Apache License 2.0
1.19k stars 291 forks source link

feat: implement BalancesTreeCache #7084

Closed twoeths closed 2 months ago

twoeths commented 2 months ago

Motivation

Screenshot 2024-09-14 at 14 33 10

Description

Resolves #6229

Testing

Screenshot 2024-09-14 at 14 42 13 Screenshot 2024-09-14 at 14 47 28
twoeths commented 2 months ago

a note about BalancesTreeCache, if network is not finalized in an epoch then we'll miss the cache

Screenshot 2024-09-14 at 15 16 09

it's not likely to miss the cache if we go with n-historical flag

with an average time of ~830s afterProcessEpoch

Screenshot 2024-09-14 at 15 17 10

we can expect the prepareNextEpoch on holesky to be around 1.35s - 0.8s ~= 550ms

twoeths commented 1 month ago

works well for a while (more than 2w of testing)

Screenshot 2024-10-01 at 15 55 22