Skip to content

Conversation

xqft
Copy link
Contributor

@xqft xqft commented Oct 13, 2025

Motivation

Includes comparisons between different optimizations in proving times and zkVM cycles

@xqft xqft requested a review from a team as a code owner October 13, 2025 20:22
@Copilot Copilot AI review requested due to automatic review settings October 13, 2025 20:22
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds comprehensive documentation for the ethrex-prover performance optimizations, including detailed analysis of proving times and zkVM cycle improvements.

  • Adds a new performance documentation file with optimization comparisons
  • Documents trie optimization strategies and their impact on proving performance
  • Provides detailed flamegraph analysis and technical explanations of optimization approaches

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions github-actions bot added the L2 Rollup client label Oct 13, 2025
@ilitteri ilitteri requested a review from Oppen October 15, 2025 14:21
@xqft xqft marked this pull request as draft October 16, 2025 16:08
@xqft xqft marked this pull request as ready for review October 17, 2025 04:13
Copy link

Lines of code report

Total lines added: 952
Total lines removed: 1172
Total lines changed: 2124

Detailed view
+------------------------------------------------------------+-------+------+
| File                                                       | Lines | Diff |
+------------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/bench/build_block_benchmark.rs           | 232   | +232 |
+------------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/bench/import_blocks_benchmark.rs         | 37    | +37  |
+------------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/build.rs                                 | 395   | +364 |
+------------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/cli.rs                                   | 516   | -54  |
+------------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/initializers.rs                          | 408   | -50  |
+------------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/l2/command.rs                            | 649   | +17  |
+------------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/l2/initializers.rs                       | 244   | -5   |
+------------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/l2/options.rs                            | 855   | -133 |
+------------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/lib.rs                                   | 5     | -1   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/blockchain.rs                     | 884   | -2   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/fork_choice.rs                    | 129   | -5   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/metrics/metrics_blocks.rs         | 77    | -45  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/payload.rs                        | 660   | -5   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/common/crypto/kzg.rs                         | 131   | -6   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/common/rkyv_utils.rs                         | 227   | -15  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/common/trie/db.rs                            | 64    | -30  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/common/trie/nibbles.rs                       | 260   | -46  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/common/trie/node.rs                          | 243   | -3   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/common/trie/node/branch.rs                   | 522   | -7   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/common/trie/node/extension.rs                | 430   | -1   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/common/trie/trie.rs                          | 902   | -12  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/common/trie/trie_iter.rs                     | 203   | -3   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/common/trie/trie_sorted.rs                   | 429   | -8   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/common/types/batch.rs                        | 15    | +15  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/common/types/block_execution_witness.rs      | 423   | +4   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/common/types/mod.rs                          | 24    | -1   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/common/types/transaction.rs                  | 2837  | -1   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/l2/networking/rpc/clients.rs                 | 45    | -12  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/l2/networking/rpc/l2/mod.rs                  | 3     | -1   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/l2/networking/rpc/rpc.rs                     | 198   | -2   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/src/backend/sp1.rs                 | 135   | -1   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/src/guest_program/src/execution.rs | 381   | -11  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/src/guest_program/src/input.rs     | 30    | -4   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/src/prover.rs                      | 149   | -1   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/block_producer.rs               | 226   | -9   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/configs.rs                      | 98    | -1   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/l1_committer.rs                 | 721   | -1   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/proof_coordinator.rs            | 583   | -8   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/l2/tee/quote-gen/src/sender.rs               | 80    | -1   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/discv4/peer_table.rs          | 992   | +86  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/discv4/server.rs              | 487   | +7   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/metrics.rs                    | 564   | -25  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/network.rs                    | 358   | -5   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/peer_handler.rs               | 1800  | +50  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/connection/codec.rs      | 290   | -28  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/connection/handshake.rs  | 506   | -22  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/connection/server.rs     | 862   | -123 |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/error.rs                 | 100   | -19  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/eth/backend.rs           | 92    | -5   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/eth/eth68/status.rs      | 112   | -3   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/eth/eth69/status.rs      | 112   | -3   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/eth/update.rs            | 65    | -3   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/initiator.rs             | 95    | -6   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/l2/l2_connection.rs      | 431   | -26  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/l2/messages.rs           | 162   | -3   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/message.rs               | 295   | -41  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/mod.rs                   | 10    | -1   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/sync.rs                       | 1487  | +9   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/sync/state_healing.rs         | 367   | -14  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/sync/storage_healing.rs       | 562   | -6   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/tx_broadcaster.rs             | 309   | +3   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/types.rs                      | 496   | -14  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/utils.rs                      | 262   | +70  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/clients/eth/errors.rs         | 280   | -9   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/eth/account.rs                | 270   | +9   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/rpc.rs                        | 772   | -40  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/utils.rs                      | 378   | -4   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/storage/api.rs                               | 225   | -8   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/storage/error.rs                             | 37    | -2   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/storage/lib.rs                               | 13    | -1   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/storage/store.rs                             | 1430  | -75  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/storage/store_db/in_memory.rs                | 532   | -65  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/storage/store_db/rocksdb.rs                  | 1113  | -94  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/storage/trie_db/mod.rs                       | 4     | -1   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/storage/trie_db/rocksdb_locked.rs            | 64    | +6   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/vm/backends/levm/mod.rs                      | 470   | +1   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/vm/backends/mod.rs                           | 150   | -6   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/vm/levm/src/account.rs                       | 70    | -13  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/vm/levm/src/call_frame.rs                    | 354   | -1   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/vm/levm/src/db/gen_db.rs                     | 336   | -2   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/vm/levm/src/hooks/hook.rs                    | 29    | -1   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/vm/levm/src/hooks/l2_hook.rs                 | 62    | -17  |
+------------------------------------------------------------+-------+------+
| ethrex/crates/vm/levm/src/precompiles.rs                   | 1549  | +5   |
+------------------------------------------------------------+-------+------+
| ethrex/crates/vm/levm/src/utils.rs                         | 423   | -1   |
+------------------------------------------------------------+-------+------+
| ethrex/tooling/ef_tests/blockchain/test_runner.rs          | 350   | +17  |
+------------------------------------------------------------+-------+------+
| ethrex/tooling/ef_tests/state/parser.rs                    | 254   | +6   |
+------------------------------------------------------------+-------+------+
| ethrex/tooling/ef_tests/state/runner/levm_runner.rs        | 455   | +14  |
+------------------------------------------------------------+-------+------+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L2 Rollup client

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant