-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid reprocessing deposits at startup #5432
Comments
potentially related: https://eips.ethereum.org/EIPS/eip-4881 |
New deposit merkle tree supporting snapshots has now been integrated but we're not actually using the snapshot functionality to avoid replaying deposits. |
I think I got a clear view on this finally and think it could be split into several PRs:
After 2nd we could be confident on performance of the approach and adjust a plan |
Yep I think that looks good. The snapshot format should just be the |
@ajsutton I think we could close this one as completed. |
I think we keep it open as long as the options are still |
Got you
I forgot about this part, will try do something for it |
Completed with #7039 |
Description
Currently at startup Teku loads all deposits from disk and replays them to recreate the merkle tree. We should investigate ways to store the merkle tree to disk instead to avoid the need to replay these deposits.
I believe you can just store the right hand edge of the tree since deposits always append but we'd likely have to update our merkle tree implementation to handle that.
Also need to ensure we can still create blocks that may need to get the merkle tree root omitting some of the more recent deposits (ie we may have received up to deposit 1000, but the Eth1Data in the current state is only at deposit 900, so we need to act as if we had a merkle tree only containing the 900 deposits).
The text was updated successfully, but these errors were encountered: