Skip to content

Conversation

@avilagaston9
Copy link
Contributor

@avilagaston9 avilagaston9 commented Oct 30, 2025

Motivation

First step toward our shared bridge implementation, ensuring transaction availability through blobs and simplifying our L1 fee mechanism.

Description

Currently, data availability is achieved by publishing State diffs through blobs.
In this PR, we change that approach by directly publishing all the blocks of a batch (RLP-encoded) within the blobs, along with their corresponding Fee configs.

#5235 was created to improve our estimate gas mechanism.

Closes None

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

Lines of code report

Total lines added: 356
Total lines removed: 383
Total lines changed: 739

Detailed view
+--------------------------------------------------------------+-------+------+
| File                                                         | Lines | Diff |
+--------------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/l2/command.rs                              | 643   | +15  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/common/types/l2.rs                             | 2     | -1   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/common/types/l2/fee_config.rs                  | 232   | +207 |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/common/types/transaction.rs                    | 2858  | +6   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/based/block_fetcher.rs                      | 365   | -143 |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/common/src/lib.rs                           | 6     | -1   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/src/guest_program/src/execution.rs   | 356   | -55  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/block_producer/payload_builder.rs | 194   | -83  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/errors.rs                         | 380   | -5   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/l1_committer.rs                   | 1073  | -2   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/utils/error.rs                              | 34    | +13  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/utils/mod.rs                                | 4     | +1   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/utils/state_reconstruct.rs                  | 99    | +99  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/eth/transaction.rs              | 578   | +3   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/vm/backends/levm/mod.rs                        | 630   | +12  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/vm/levm/src/hooks/hook.rs                      | 30    | -3   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/vm/levm/src/hooks/l2_hook.rs                   | 234   | -13  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/vm/levm/src/utils.rs                           | 419   | -77  |
+--------------------------------------------------------------+-------+------+

@avilagaston9 avilagaston9 self-assigned this Nov 3, 2025
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

Benchmark Results Comparison

No significant difference was registered for any benchmark run.

Detailed Results

Benchmark Results: BubbleSort

Command Mean [s] Min [s] Max [s] Relative
main_revm_BubbleSort 2.994 ± 0.016 2.976 3.017 1.00
main_levm_BubbleSort 3.069 ± 0.063 3.015 3.214 1.02 ± 0.02
pr_revm_BubbleSort 2.999 ± 0.032 2.968 3.057 1.00 ± 0.01
pr_levm_BubbleSort 3.094 ± 0.020 3.080 3.147 1.03 ± 0.01

Benchmark Results: ERC20Approval

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Approval 977.9 ± 9.9 966.0 996.2 1.00 ± 0.02
main_levm_ERC20Approval 1075.4 ± 14.8 1063.3 1113.6 1.10 ± 0.02
pr_revm_ERC20Approval 975.1 ± 11.3 966.9 1002.6 1.00
pr_levm_ERC20Approval 1112.1 ± 9.3 1093.3 1123.3 1.14 ± 0.02

Benchmark Results: ERC20Mint

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Mint 131.8 ± 1.1 129.9 133.4 1.00
main_levm_ERC20Mint 161.5 ± 0.6 160.7 162.9 1.23 ± 0.01
pr_revm_ERC20Mint 132.9 ± 0.9 131.3 134.3 1.01 ± 0.01
pr_levm_ERC20Mint 166.9 ± 3.9 164.2 177.6 1.27 ± 0.03

Benchmark Results: ERC20Transfer

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ERC20Transfer 232.6 ± 1.5 231.1 235.7 1.00
main_levm_ERC20Transfer 276.5 ± 5.1 272.2 287.3 1.19 ± 0.02
pr_revm_ERC20Transfer 233.1 ± 1.9 230.5 235.3 1.00 ± 0.01
pr_levm_ERC20Transfer 280.2 ± 1.7 277.2 282.5 1.20 ± 0.01

Benchmark Results: Factorial

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Factorial 227.7 ± 4.6 223.8 237.2 1.00 ± 0.03
main_levm_Factorial 265.3 ± 2.6 263.4 272.2 1.17 ± 0.02
pr_revm_Factorial 226.7 ± 4.0 223.6 237.8 1.00
pr_levm_Factorial 265.0 ± 2.4 263.6 271.8 1.17 ± 0.02

Benchmark Results: FactorialRecursive

Command Mean [s] Min [s] Max [s] Relative
main_revm_FactorialRecursive 1.676 ± 0.040 1.603 1.725 1.02 ± 0.03
main_levm_FactorialRecursive 8.378 ± 0.098 8.247 8.524 5.09 ± 0.11
pr_revm_FactorialRecursive 1.646 ± 0.032 1.600 1.706 1.00
pr_levm_FactorialRecursive 8.311 ± 0.057 8.235 8.429 5.05 ± 0.10

Benchmark Results: Fibonacci

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Fibonacci 204.6 ± 0.6 203.7 205.7 1.00
main_levm_Fibonacci 261.6 ± 1.9 259.0 264.0 1.28 ± 0.01
pr_revm_Fibonacci 205.7 ± 3.9 203.0 215.6 1.01 ± 0.02
pr_levm_Fibonacci 264.4 ± 13.3 255.2 301.8 1.29 ± 0.07

Benchmark Results: FibonacciRecursive

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_FibonacciRecursive 870.8 ± 26.2 838.9 939.4 1.15 ± 0.04
main_levm_FibonacciRecursive 763.6 ± 5.7 753.4 772.0 1.00 ± 0.01
pr_revm_FibonacciRecursive 869.3 ± 7.2 859.6 884.6 1.14 ± 0.02
pr_levm_FibonacciRecursive 760.3 ± 9.6 753.4 785.5 1.00

Benchmark Results: ManyHashes

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_ManyHashes 8.3 ± 0.1 8.2 8.5 1.01 ± 0.01
main_levm_ManyHashes 9.1 ± 0.2 9.0 9.6 1.11 ± 0.02
pr_revm_ManyHashes 8.2 ± 0.0 8.2 8.4 1.00
pr_levm_ManyHashes 9.1 ± 0.1 9.0 9.3 1.11 ± 0.01

Benchmark Results: MstoreBench

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_MstoreBench 255.0 ± 4.7 251.2 266.6 1.05 ± 0.02
main_levm_MstoreBench 245.7 ± 10.2 240.5 274.4 1.01 ± 0.04
pr_revm_MstoreBench 252.0 ± 1.1 250.5 254.5 1.04 ± 0.01
pr_levm_MstoreBench 242.3 ± 1.3 240.9 244.5 1.00

Benchmark Results: Push

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_Push 289.0 ± 2.1 287.2 294.0 1.00 ± 0.01
main_levm_Push 299.2 ± 2.3 297.2 305.1 1.04 ± 0.01
pr_revm_Push 288.4 ± 1.4 286.7 290.7 1.00
pr_levm_Push 303.1 ± 1.3 300.9 305.6 1.05 ± 0.01

Benchmark Results: SstoreBench_no_opt

Command Mean [ms] Min [ms] Max [ms] Relative
main_revm_SstoreBench_no_opt 168.9 ± 12.5 160.6 202.1 1.91 ± 0.14
main_levm_SstoreBench_no_opt 91.2 ± 7.5 88.1 112.3 1.03 ± 0.09
pr_revm_SstoreBench_no_opt 166.4 ± 5.2 160.8 173.3 1.88 ± 0.06
pr_levm_SstoreBench_no_opt 88.6 ± 0.5 88.1 89.7 1.00

@avilagaston9 avilagaston9 moved this to In Review in ethrex_l2 Nov 7, 2025
@avilagaston9 avilagaston9 added this pull request to the merge queue Nov 12, 2025
Merged via the queue into main with commit 6fbd93b Nov 12, 2025
62 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l2 Nov 12, 2025
@avilagaston9 avilagaston9 deleted the feat/l2/commit_blocks_instead_of_state_diffs branch November 12, 2025 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L2 Rollup client

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants