Skip to content

Conversation

@Arkenan
Copy link
Collaborator

@Arkenan Arkenan commented Oct 27, 2025

The goal is to separate both the trie nodes and flat key value representation for accounts and storage, as they can be updated separately.

@github-actions
Copy link

github-actions bot commented Oct 27, 2025

Lines of code report

Total lines added: 47
Total lines removed: 15
Total lines changed: 62

Detailed view
+-------------------------------------------------+-------+------+
| File                                            | Lines | Diff |
+-------------------------------------------------+-------+------+
| ethrex/crates/storage/store.rs                  | 1494  | -15  |
+-------------------------------------------------+-------+------+
| ethrex/crates/storage/store_db/rocksdb.rs       | 1637  | +31  |
+-------------------------------------------------+-------+------+
| ethrex/crates/storage/trie_db/rocksdb.rs        | 209   | +15  |
+-------------------------------------------------+-------+------+
| ethrex/crates/storage/trie_db/rocksdb_locked.rs | 76    | +1   |
+-------------------------------------------------+-------+------+

@Arkenan Arkenan changed the title Separate Account and storage Column families perf: separate Account and storage Column families Nov 5, 2025
@Arkenan Arkenan changed the title perf: separate Account and storage Column families perf(l1): separate Account and storage Column families Nov 5, 2025
@edg-l edg-l marked this pull request as ready for review November 11, 2025 14:07
@edg-l edg-l requested a review from a team as a code owner November 11, 2025 14:07
Comment on lines +557 to +558
// TODO(#5195): committing each storage trie individually is inefficient.
// We would benefit form a mass storage node insertion method.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can't we do it like before, with Trie::collect_changes_since_last_hash()? We can store the changes inside a shared buffer, and dump it in the DB at the end.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, we already have commit_without_storing for that.
That said, the genesis runs exactly once and I think it's quick enough as it is.

@MegaRedHand MegaRedHand changed the title perf(l1): separate Account and storage Column families perf(l1)!: separate Account and storage Column families Nov 11, 2025
@jrchatruc jrchatruc added this pull request to the merge queue Nov 12, 2025
Merged via the queue into main with commit 120e1c7 Nov 12, 2025
41 checks passed
@jrchatruc jrchatruc deleted the separate-accounts-and-storage-rocksdb branch November 12, 2025 21:47
@github-project-automation github-project-automation bot moved this from In Progress to Done in ethrex_performance Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants