Skip to content

Conversation

@edg-l
Copy link
Contributor

@edg-l edg-l commented Dec 23, 2025

Motivation

Removes needless allocations due to the current api requiring a ref to a Vec

Description

Checklist

  • Updated STORE_SCHEMA_VERSION (crates/storage/lib.rs) if the PR includes breaking changes to the Store requiring a re-sync.

Closes #issue_number

@github-actions github-actions bot added L1 Ethereum client performance Block execution throughput and performance in general labels Dec 23, 2025
@github-actions
Copy link

github-actions bot commented Dec 23, 2025

Lines of code report

Total lines added: 3
Total lines removed: 0
Total lines changed: 3

Detailed view
+-------------------------------------------+-------+------+
| File                                      | Lines | Diff |
+-------------------------------------------+-------+------+
| ethrex/crates/common/trie/trie.rs         | 980   | +1   |
+-------------------------------------------+-------+------+
| ethrex/crates/common/trie/verify_range.rs | 565   | +1   |
+-------------------------------------------+-------+------+
| ethrex/crates/storage/store.rs            | 2587  | +1   |
+-------------------------------------------+-------+------+

@github-actions
Copy link

Benchmark for 6edc622

Click to view benchmark
Test Base PR %
Trie/cita-trie insert 10k 28.0±0.26ms 27.7±0.33ms -1.07%
Trie/cita-trie insert 1k 2.8±0.01ms 2.8±0.03ms 0.00%
Trie/ethrex-trie insert 10k 24.5±0.48ms 24.3±0.28ms -0.82%
Trie/ethrex-trie insert 1k 2.2±0.04ms 2.2±0.05ms 0.00%

@edg-l edg-l force-pushed the perf_remove_storage_allocs branch from f3d1762 to 53567f7 Compare December 23, 2025 10:44
@github-actions
Copy link

Benchmark for 4551ae1

Click to view benchmark
Test Base PR %
Trie/cita-trie insert 10k 28.6±1.14ms 27.4±0.22ms -4.20%
Trie/cita-trie insert 1k 2.8±0.01ms 2.9±0.13ms +3.57%
Trie/ethrex-trie insert 10k 24.8±0.81ms 24.8±1.63ms 0.00%
Trie/ethrex-trie insert 1k 2.2±0.12ms 2.2±0.01ms 0.00%

@edg-l edg-l force-pushed the perf_remove_storage_allocs branch from 24a02f4 to 19d29a7 Compare December 23, 2025 10:55
@edg-l edg-l marked this pull request as ready for review December 23, 2025 10:55
@edg-l edg-l requested a review from a team as a code owner December 23, 2025 10:55
@ethrex-project-sync ethrex-project-sync bot moved this to In Review in ethrex_l1 Dec 23, 2025
@github-actions
Copy link

Benchmark for 992cae6

Click to view benchmark
Test Base PR %
Trie/cita-trie insert 10k 27.9±0.43ms 27.9±0.47ms 0.00%
Trie/cita-trie insert 1k 2.9±0.01ms 2.9±0.01ms 0.00%
Trie/ethrex-trie insert 10k 24.3±0.34ms 25.1±0.40ms +3.29%
Trie/ethrex-trie insert 1k 2.2±0.03ms 2.2±0.12ms 0.00%

@github-actions
Copy link

Benchmark for 93f4f73

Click to view benchmark
Test Base PR %
Trie/cita-trie insert 10k 27.6±0.33ms 27.5±0.19ms -0.36%
Trie/cita-trie insert 1k 2.8±0.02ms 2.9±0.09ms +3.57%
Trie/ethrex-trie insert 10k 24.7±0.39ms 25.0±0.18ms +1.21%
Trie/ethrex-trie insert 1k 2.2±0.01ms 2.2±0.06ms 0.00%

@github-actions
Copy link

Benchmark for 66fa6fd

Click to view benchmark
Test Base PR %
Trie/cita-trie insert 10k 30.7±3.31ms 32.1±3.61ms +4.56%
Trie/cita-trie insert 1k 2.8±0.05ms 2.9±0.18ms +3.57%
Trie/ethrex-trie insert 10k 26.5±1.85ms 27.0±2.03ms +1.89%
Trie/ethrex-trie insert 1k 2.2±0.01ms 2.2±0.02ms 0.00%

@github-actions
Copy link

Benchmark for f738be7

Click to view benchmark
Test Base PR %
Trie/cita-trie insert 10k 38.8±3.24ms 33.2±2.82ms -14.43%
Trie/cita-trie insert 1k 2.9±0.03ms 2.9±0.16ms 0.00%
Trie/ethrex-trie insert 10k 29.6±1.59ms 27.6±0.64ms -6.76%
Trie/ethrex-trie insert 1k 2.2±0.02ms 2.2±0.02ms 0.00%

@github-actions
Copy link

Benchmark for cea1356

Click to view benchmark
Test Base PR %
Trie/cita-trie insert 10k 27.8±0.50ms 27.6±0.59ms -0.72%
Trie/cita-trie insert 1k 2.9±0.02ms 2.9±0.11ms 0.00%
Trie/ethrex-trie insert 10k 24.3±0.26ms 24.4±0.42ms +0.41%
Trie/ethrex-trie insert 1k 2.2±0.04ms 2.2±0.01ms 0.00%

Copy link
Contributor

@pablodeymo pablodeymo left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

Benchmark for c6f7f60

Click to view benchmark
Test Base PR %
Trie/cita-trie insert 10k 35.2±1.46ms 34.9±1.32ms -0.85%
Trie/cita-trie insert 1k 2.7±0.02ms 2.8±0.13ms +3.70%
Trie/ethrex-trie insert 10k 28.4±0.71ms 29.1±1.97ms +2.46%
Trie/ethrex-trie insert 1k 2.1±0.01ms 2.1±0.06ms 0.00%

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

Benchmark Block Execution Results Comparison Against Main

Command Mean [s] Min [s] Max [s] Relative
base 63.400 ± 0.203 63.042 63.846 1.00
head 63.958 ± 0.290 63.674 64.469 1.01 ± 0.01

@edg-l edg-l added this pull request to the merge queue Jan 5, 2026
Merged via the queue into main with commit d7d991d Jan 5, 2026
47 checks passed
@edg-l edg-l deleted the perf_remove_storage_allocs branch January 5, 2026 15:08
@github-project-automation github-project-automation bot moved this from Todo to Done in ethrex_performance Jan 5, 2026
@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l1 Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L1 Ethereum client performance Block execution throughput and performance in general

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants