-
Notifications
You must be signed in to change notification settings - Fork 107
perf(l1): filter empty storages from snapshots #4590
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
Conversation
Lines of code reportTotal lines added: Detailed view
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR optimizes L1 network performance by filtering out empty storage entries from snapshots before encoding them. The change reduces the size of encoded snapshots by excluding accounts with no storage data.
- Adds filtering to remove empty storage collections from account snapshots
- Applied consistently across two snapshot creation locations in the peer handler
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Benchmark Block Execution Results Comparison Against Main
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Left a small nit
|
||
### 2025-09-24 | ||
|
||
- Avoid dumping empty storage accounts to disk [#4590](https://github.com/lambdaclass/ethrex/pull/4590) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: this needs more context
- Avoid dumping empty storage accounts to disk [#4590](https://github.com/lambdaclass/ethrex/pull/4590) | |
- Avoid dumping empty storage accounts to disk during snap sync [#4590](https://github.com/lambdaclass/ethrex/pull/4590) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Removed from the merge queue until it is tested enough. |
During snap sync, specifically when downloading storages, we were accidentally dumping all account addresses in every file, even when that file had no storages for most of them.
By filtering, we reduce from 40GiB to 27GiB the auxiliary files in Sepolia, and the sync goes from 3h10' to 3h2' in
ethrex-sync-3
, and for mainnet inethrex-sync-2
we got from 185GiB to 40GiB and from 8h6' to 7h7'.