teku icon indicating copy to clipboard operation
teku copied to clipboard

Don't store deposits prior to current finalised state deposit index

Open ajsutton opened this issue 3 years ago • 0 comments

Description

When a node starts up it currently replays all deposits - either from storage or from the eth1-endpoint. Each deposit is passed to DepositProvider so that it can update the deposit merkle tree. Currently it is also storing all of those deposit events and then pruning them when the next finalized checkpoint update occurs.

For deposits that would be pruned based on the current finalised checkpoint, we should use them to update the merkle tree (and check they are in order with no gaps) but skip adding them to the depositNavigableMap entirely.

ajsutton avatar Jun 01 '22 02:06 ajsutton