Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Perf

### 2025-11-13

- Use BlobDB for account_codes column family [#5300](https://github.com/lambdaclass/ethrex/pull/5300)

### 2025-11-12

- Only mark individual values as dirty instead of the whole trie [#5282](https://github.com/lambdaclass/ethrex/pull/5282)
Expand Down
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ uuid = { version = "1.18.1", features = ["v4"] }
tower-http = { version = "0.6.2", features = ["cors"] }
indexmap = { version = "2.11.4" }

rocksdb = { version="0.24.0", default-features = false, features = ["bindgen-runtime"] }
rocksdb = { version = "0.24.0", default-features = false, features = [
"bindgen-runtime",
"lz4",
] }

[patch.crates-io]
secp256k1 = { git = "https://github.com/sp1-patches/rust-secp256k1", tag = "patch-0.30.0-sp1-5.0.0" }
Expand Down
16 changes: 15 additions & 1 deletion crates/storage/store_db/rocksdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,21 @@ impl Store {
block_opts.set_bloom_filter(10.0, false); // 10 bits per key
cf_opts.set_block_based_table_factory(&block_opts);
}
CF_RECEIPTS | CF_ACCOUNT_CODES => {
CF_ACCOUNT_CODES => {
cf_opts.set_write_buffer_size(128 * 1024 * 1024); // 128MB
cf_opts.set_max_write_buffer_number(3);
cf_opts.set_target_file_size_base(256 * 1024 * 1024); // 256MB

cf_opts.set_enable_blob_files(true);
// Small bytecodes should go inline (mainly for delegation indicators)
cf_opts.set_min_blob_size(32);
Comment on lines +311 to +312
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call.

cf_opts.set_blob_compression_type(rocksdb::DBCompressionType::Lz4);

let mut block_opts = BlockBasedOptions::default();
block_opts.set_block_size(32 * 1024); // 32KB
cf_opts.set_block_based_table_factory(&block_opts);
}
CF_RECEIPTS => {
cf_opts.set_write_buffer_size(128 * 1024 * 1024); // 128MB
cf_opts.set_max_write_buffer_number(3);
cf_opts.set_target_file_size_base(256 * 1024 * 1024); // 256MB
Expand Down