-
Notifications
You must be signed in to change notification settings - Fork 130
perf(l1)!: enable BlobDB for account bytecodes #5300
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 |
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.
Pull Request Overview
This PR enables RocksDB BlobDB functionality for the account_codes column family to improve read performance by storing bytecodes in separate blob files rather than in the LSM tree. This is particularly beneficial for bytecodes of varying sizes.
- Enables BlobDB for
account_codesCF with Lz4 compression - Sets minimum blob size to 32 bytes to keep small bytecodes inline
- Adds
lz4feature to rocksdb dependency
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/storage/store_db/rocksdb.rs | Separates CF_ACCOUNT_CODES configuration from CF_RECEIPTS and enables BlobDB with Lz4 compression and 32-byte minimum blob size |
| Cargo.toml | Adds lz4 feature to rocksdb dependency to support blob compression |
| Cargo.lock | Adds lz4-sys dependency required by rocksdb lz4 feature |
| CHANGELOG.md | Documents the BlobDB feature addition for account_codes column family |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Small bytecodes should go inline (mainly for delegation indicators) | ||
| cf_opts.set_min_blob_size(32); |
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.
Good call.
Oppen
left a comment
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. I'll try it in ethrex-sync-3 as a smoke test. If it syncs and runs Hoodi OK for while it's green on my side.
Motivation
Description
This PR changes the account_codes CF to use RocksDB BlobDB functionality, which moves values outside from the tree, to independent files. We expect this to increase the read performance, since bytecodes can have vastly different sizes, and some occupy multiple page lines.