Skip to content

Conversation

Oppen
Copy link
Contributor

@Oppen Oppen commented Oct 14, 2025

  • add benching util
  • edit root cargo.toml
  • basic pathbased impl
  • improve serialization
  • read optimization
  • fixes
  • start fixing snapsync
  • cleanup
  • validate node fetches
  • fix opening hash
  • fix state healing node fetch
  • fix merge
  • cleanup
  • remove contains_X_node APIs
  • lint
  • heal terminal leaves too
  • fix rocksdb test
  • save rollback logs
  • Revert "save rollback logs"
  • re-add full-path leaves
  • lint&fix
  • basic trie layer implementation
  • add passthrough for trie wrapper, for now
  • flush batch to cache instead of db
  • clippy
  • fix insert ordering
  • better find the state root
  • fix storage handling
  • fix insert-after-remove
  • revert head to last state
  • direct trie and fixes
  • fix incorrect miss
  • snapsync fixes
  • also delete from db
  • add healing logic
  • healing fixes
  • docs: add comment
  • refactor: add delete_range function in Store
  • Revert "refactor: add delete_range function in Store"
  • delete range improvement
  • Reapply "refactor: add delete_range function in Store"
  • fix extension range delete
  • fix: add logs and add fix to storage healing
  • fix delete path calculation
  • Improved logs for speed
  • Update storage_healing.rs
  • test: add test for computing subtree ranges
  • chore: comment out spammy print
  • perf: remove unnecessary clone
  • fix: use full path when computing storage range
  • chore: remove logs
  • chore: remove commented print
  • do not return empty value nodes
  • fix: remove nodes when writing empty
  • refactor: improve InconsistentTree error messages
  • move storage healing to db thread
  • also delete leaf-related paths
  • chore: enable warn-on-block feature in spawned
  • fix
  • chore: disable warn-on-block again
  • fix failed insertion error
  • Change vec for btreemap on nodes to write state healing
  • avoid costly deletions when not needed
  • Add delete range batch
  • Add delete ranges log
  • fix deleting the wrong nodes
  • remove unneeded apply_prefix
  • feat: add failed block hash to log
  • also free peers in healing
  • avoid concurrent writes
  • regnerate snapshot from leaves after healing
  • rename and update val
  • fixes
  • disable snapshots
  • restore snap cycle size
  • remove spammy log
  • chore: run cargo fmt
  • chore: remove libmdbx
  • chore: fix some clippy issues
  • chore: add some changes from old branch
  • chore: remove unused delete_range functions
  • fix: implement eth_getProof again
  • fix bug in storage insertion
  • fix: implement new functionality for InMemoryDb
  • chore: remove get_node_checked
  • chore: UNCOMMENT CONDITION
  • chore: fix lints
  • fix: update Trie::get_node
  • chore: update archive_sync
  • chore: bump max diff-layers to 128
  • chore: ignore unused parameter
  • chore: fix lint issue and add comment
  • Path based merge optimizations (Path based merge optimizations #4825)
  • fix: use direct DB access in reset_to_head
  • chore: remove panic
  • chore: remove snapshot code
  • chore: update comment
  • chore: remove more snapshot logic
  • chore: remove unused async
  • chore: remove more snapshot logic
  • refctor: minimize async closure
  • chore: remove unneeded async
  • chore: remove unneeded async and clones
  • chore: fix clippy lints
  • docs: document reset_to_head
  • fix: update latest header in remove_block
  • fix: update chain metadata when removing block
  • fix: move spawn inside start_test_api
  • fix: set correct trie root in InMemoryDB
  • fix: use direct DB access for genesis setup
  • chore: avoid holding mutex through await
  • chore: add scope so mutex is dropped
  • Revert "fix: update chain metadata when removing block"
  • Revert "fix: update latest header in remove_block"
  • docs: add comment to clarify todo!
  • fix: remove deadlock
  • refactor: remove unnecessary clones
  • test: use different paths in test_trie_db_batch_operations
  • refactor: move parameter to variable
  • fix: handle state cycles in layering logic
  • chore: remove old comment
  • chore: add comment
  • fix: store code hashes when updating InMemoryStore
  • fix: remove call to removed function
  • test: improve ef tests errors
  • chore: bump max number of layers
  • Revert "chore: bump max number of layers"
  • fix: move commit threshold setting to each store
  • chore: comment new check
  • fix?: make has_state_root return true for empty trie
  • Revert "chore: comment new check"
  • refactor: make Nibbles.data field private
  • fix(l2): state reconstruct test (fix(l2): state reconstruct test #4858)
  • Fix lint
  • fix: return an error when state is not available
  • fix: invert if condition
  • chore(l1): path based cleanup (chore(l1): path based cleanup #4837)

Motivation

Description

Closes #issue_number

MegaRedHand and others added 26 commits October 13, 2025 13:33
> [!NOTE]
> This PR points to `main` to trigger the workflow `pr-main_l2` that
runs the state diff test.

**Motivation**

<!-- Why does this pull request exist? What are its goals? -->

**Description**

<!-- A clear and concise general description of the changes this PR
introduces -->

<!-- Link to issues: Resolves #111, Resolves #222 -->

Closes #issue_number
Based on `path_based` branch.

---------

Co-authored-by: Ivan Litteri <[email protected]>
Co-authored-by: ilitteri <[email protected]>
Copy link

Lines of code report

Total lines added: 531
Total lines removed: 51
Total lines changed: 582

Detailed view
+------------------------------------------------------+-------+------+
| File                                                 | Lines | Diff |
+------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/initializers.rs                    | 446   | +37  |
+------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/l2/command.rs                      | 635   | -14  |
+------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/blockchain.rs               | 886   | -1   |
+------------------------------------------------------+-------+------+
| ethrex/crates/common/trie/db.rs                      | 94    | +30  |
+------------------------------------------------------+-------+------+
| ethrex/crates/common/trie/nibbles.rs                 | 306   | +46  |
+------------------------------------------------------+-------+------+
| ethrex/crates/common/trie/node.rs                    | 246   | +3   |
+------------------------------------------------------+-------+------+
| ethrex/crates/common/trie/node/branch.rs             | 529   | +7   |
+------------------------------------------------------+-------+------+
| ethrex/crates/common/trie/node/extension.rs          | 431   | +1   |
+------------------------------------------------------+-------+------+
| ethrex/crates/common/trie/trie.rs                    | 911   | +9   |
+------------------------------------------------------+-------+------+
| ethrex/crates/common/trie/trie_iter.rs               | 206   | +3   |
+------------------------------------------------------+-------+------+
| ethrex/crates/common/trie/trie_sorted.rs             | 437   | +8   |
+------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/sync.rs                 | 1455  | -21  |
+------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/sync/state_healing.rs   | 381   | +12  |
+------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/sync/storage_healing.rs | 568   | +5   |
+------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/eth/account.rs          | 261   | -9   |
+------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/utils.rs                | 380   | +2   |
+------------------------------------------------------+-------+------+
| ethrex/crates/storage/api.rs                         | 233   | +8   |
+------------------------------------------------------+-------+------+
| ethrex/crates/storage/error.rs                       | 41    | +4   |
+------------------------------------------------------+-------+------+
| ethrex/crates/storage/lib.rs                         | 14    | +1   |
+------------------------------------------------------+-------+------+
| ethrex/crates/storage/store.rs                       | 1488  | +58  |
+------------------------------------------------------+-------+------+
| ethrex/crates/storage/store_db/in_memory.rs          | 597   | +65  |
+------------------------------------------------------+-------+------+
| ethrex/crates/storage/store_db/rocksdb.rs            | 1207  | +94  |
+------------------------------------------------------+-------+------+
| ethrex/crates/storage/trie_db/layering.rs            | 134   | +134 |
+------------------------------------------------------+-------+------+
| ethrex/crates/storage/trie_db/mod.rs                 | 5     | +1   |
+------------------------------------------------------+-------+------+
| ethrex/crates/storage/trie_db/rocksdb_locked.rs      | 58    | -6   |
+------------------------------------------------------+-------+------+
| ethrex/tooling/ef_tests/blockchain/test_runner.rs    | 353   | +3   |
+------------------------------------------------------+-------+------+

Copy link

Benchmark for af0b088

Click to view benchmark
Test Base PR %
Trie/cita-trie insert 10k 35.2±0.61ms 35.2±0.55ms 0.00%
Trie/cita-trie insert 1k 3.5±0.02ms 3.6±0.17ms +2.86%
Trie/ethrex-trie insert 10k 54.7±0.52ms 62.2±0.61ms +13.71%
Trie/ethrex-trie insert 1k 6.1±0.04ms 8.0±0.05ms +31.15%

@Oppen Oppen closed this Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants