Skip to content

Conversation

@iovoid
Copy link
Contributor

@iovoid iovoid commented Nov 11, 2025

Motivation

Currently doing merkelization we do trie-traversal to avoid reading stale FKVs, marking the trie as dirty the first time it's changed. However, this could be done on a per-key basis.

Description

Keeps track of modified keys in a trie and does traversal for those.

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

github-actions bot commented Nov 11, 2025

Lines of code report

Total lines added: 0
Total lines removed: 1
Total lines changed: 1

Detailed view
+-----------------------------------+-------+------+
| File                              | Lines | Diff |
+-----------------------------------+-------+------+
| ethrex/crates/common/trie/trie.rs | 971   | -1   |
+-----------------------------------+-------+------+

@github-actions
Copy link

Benchmark for 6a52787

Click to view benchmark
Test Base PR %
Trie/cita-trie insert 10k 31.6±1.45ms 32.1±1.32ms +1.58%
Trie/cita-trie insert 1k 2.8±0.06ms 2.8±0.13ms 0.00%
Trie/ethrex-trie insert 10k 26.6±1.32ms 28.4±1.38ms +6.77%
Trie/ethrex-trie insert 1k 2.1±0.03ms 2.2±0.02ms +4.76%

@github-actions
Copy link

Benchmark for 2a3c495

Click to view benchmark
Test Base PR %
Trie/cita-trie insert 10k 27.9±0.58ms 28.4±0.49ms +1.79%
Trie/cita-trie insert 1k 2.9±0.01ms 2.9±0.15ms 0.00%
Trie/ethrex-trie insert 10k 25.0±0.54ms 25.9±0.44ms +3.60%
Trie/ethrex-trie insert 1k 2.2±0.03ms 2.3±0.01ms +4.55%

@github-actions
Copy link

Benchmark for a2962a1

Click to view benchmark
Test Base PR %
Trie/cita-trie insert 10k 29.6±1.53ms 27.7±0.43ms -6.42%
Trie/cita-trie insert 1k 2.9±0.01ms 2.9±0.11ms 0.00%
Trie/ethrex-trie insert 10k 24.7±0.85ms 27.4±1.21ms +10.93%
Trie/ethrex-trie insert 1k 2.2±0.02ms 2.3±0.01ms +4.55%

@github-actions
Copy link

github-actions bot commented Nov 11, 2025

Benchmark Block Execution Results Comparison Against Main

Command Mean [s] Min [s] Max [s] Relative
base 59.323 ± 0.208 58.923 59.596 1.00
head 59.934 ± 0.416 59.527 60.904 1.01 ± 0.01

@github-actions
Copy link

Benchmark for faf95d6

Click to view benchmark
Test Base PR %
Trie/cita-trie insert 10k 28.7±1.14ms 28.4±1.30ms -1.05%
Trie/cita-trie insert 1k 2.9±0.02ms 2.9±0.17ms 0.00%
Trie/ethrex-trie insert 10k 24.4±0.86ms 25.8±0.95ms +5.74%
Trie/ethrex-trie insert 1k 2.2±0.01ms 2.3±0.09ms +4.55%

@github-actions
Copy link

Benchmark for 0164775

Click to view benchmark
Test Base PR %
Trie/cita-trie insert 10k 27.6±0.28ms 27.7±0.39ms +0.36%
Trie/cita-trie insert 1k 2.9±0.02ms 2.9±0.12ms 0.00%
Trie/ethrex-trie insert 10k 24.3±0.43ms 24.8±0.41ms +2.06%
Trie/ethrex-trie insert 1k 2.2±0.02ms 2.3±0.04ms +4.55%

@github-actions
Copy link

Benchmark for 2912687

Click to view benchmark
Test Base PR %
Trie/cita-trie insert 10k 28.0±1.45ms 27.7±0.76ms -1.07%
Trie/cita-trie insert 1k 2.9±0.02ms 2.9±0.28ms 0.00%
Trie/ethrex-trie insert 10k 24.0±0.59ms 24.5±1.34ms +2.08%
Trie/ethrex-trie insert 1k 2.1±0.01ms 2.2±0.01ms +4.76%

@jrchatruc jrchatruc marked this pull request as ready for review November 12, 2025 21:25
@jrchatruc jrchatruc requested a review from a team as a code owner November 12, 2025 21:25
@github-actions
Copy link

Benchmark for 794c259

Click to view benchmark
Test Base PR %
Trie/cita-trie insert 10k 27.6±0.35ms 28.3±0.60ms +2.54%
Trie/cita-trie insert 1k 2.9±0.02ms 2.8±0.08ms -3.45%
Trie/ethrex-trie insert 10k 24.1±0.50ms 24.3±0.47ms +0.83%
Trie/ethrex-trie insert 1k 2.1±0.01ms 2.2±0.01ms +4.76%

@github-project-automation github-project-automation bot moved this to In Review in ethrex_l1 Nov 12, 2025
@jrchatruc jrchatruc enabled auto-merge November 12, 2025 21:42
@github-actions
Copy link

Benchmark for 668e621

Click to view benchmark
Test Base PR %
Trie/cita-trie insert 10k 31.1±1.99ms 31.5±1.88ms +1.29%
Trie/cita-trie insert 1k 2.9±0.02ms 2.9±0.16ms 0.00%
Trie/ethrex-trie insert 10k 26.4±1.09ms 26.9±0.81ms +1.89%
Trie/ethrex-trie insert 1k 2.2±0.01ms 2.2±0.01ms 0.00%

@github-actions
Copy link

Benchmark for 6c37c90

Click to view benchmark
Test Base PR %
Trie/cita-trie insert 10k 28.1±0.46ms 28.1±0.87ms 0.00%
Trie/cita-trie insert 1k 2.9±0.01ms 2.9±0.09ms 0.00%
Trie/ethrex-trie insert 10k 24.2±0.57ms 24.9±0.82ms +2.89%
Trie/ethrex-trie insert 1k 2.2±0.02ms 2.2±0.01ms 0.00%

@jrchatruc jrchatruc disabled auto-merge November 12, 2025 23:01
@github-actions
Copy link

Benchmark for 03a3fbe

Click to view benchmark
Test Base PR %
Trie/cita-trie insert 10k 33.1±1.67ms 31.2±2.40ms -5.74%
Trie/cita-trie insert 1k 2.9±0.01ms 2.9±0.10ms 0.00%
Trie/ethrex-trie insert 10k 27.0±1.06ms 27.3±0.82ms +1.11%
Trie/ethrex-trie insert 1k 2.2±0.03ms 2.2±0.04ms 0.00%

@github-actions
Copy link

Benchmark for adcd587

Click to view benchmark
Test Base PR %
Trie/cita-trie insert 10k 28.0±0.22ms 27.4±0.19ms -2.14%
Trie/cita-trie insert 1k 2.9±0.01ms 2.8±0.12ms -3.45%
Trie/ethrex-trie insert 10k 23.9±0.35ms 24.3±0.71ms +1.67%
Trie/ethrex-trie insert 1k 2.2±0.11ms 2.2±0.01ms 0.00%

@github-actions
Copy link

Benchmark for 16f96d4

Click to view benchmark
Test Base PR %
Trie/cita-trie insert 10k 31.6±2.16ms 33.8±1.65ms +6.96%
Trie/cita-trie insert 1k 2.9±0.18ms 2.9±0.12ms 0.00%
Trie/ethrex-trie insert 10k 26.4±1.62ms 27.4±1.08ms +3.79%
Trie/ethrex-trie insert 1k 2.2±0.01ms 2.2±0.03ms 0.00%

@jrchatruc jrchatruc enabled auto-merge November 13, 2025 00:14
@jrchatruc jrchatruc added this pull request to the merge queue Nov 13, 2025
Merged via the queue into main with commit d9fff5e Nov 13, 2025
44 checks passed
@jrchatruc jrchatruc deleted the partial_dirtying branch November 13, 2025 01:09
@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l1 Nov 13, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in ethrex_performance Nov 13, 2025
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
Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants