Skip to content

docs(levm): add type 4 transaction validations #3085

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fmoletta
Copy link
Contributor

@fmoletta fmoletta commented Jun 9, 2025

Add type 4 transaction validations to validations.md docs

Closes #2545

@fmoletta fmoletta marked this pull request as ready for review June 9, 2025 17:32
@fmoletta fmoletta requested a review from a team as a code owner June 9, 2025 17:32
Copy link

github-actions bot commented Jun 9, 2025

Lines of code report

Total lines added: 751
Total lines removed: 924
Total lines changed: 1675

Detailed view
+--------------------------------------------------------------+-------+------+
| File                                                         | Lines | Diff |
+--------------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/l2/command.rs                              | 349   | -1   |
+--------------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/l2/options.rs                              | 374   | -85  |
+--------------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex_replay/src/cli.rs                          | 275   | -33  |
+--------------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex_replay/src/main.rs                         | 20    | -1   |
+--------------------------------------------------------------+-------+------+
| ethrex/cmd/ethrex_replay/src/run.rs                          | 63    | -7   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/blockchain.rs                       | 491   | -9   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/constants.rs                        | 12    | -1   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/error.rs                            | 107   | -2   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/mempool.rs                          | 600   | -11  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/payload.rs                          | 556   | -8   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/blockchain/tracing.rs                          | 87    | -41  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/common/types/blobs_bundle.rs                   | 326   | -2   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/contracts/bin/deployer/cli.rs               | 345   | -13  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/contracts/bin/deployer/main.rs              | 626   | -13  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/src/backends/exec.rs                 | 28    | -9   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/src/backends/pico.rs                 | 68    | -9   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/src/backends/risc0.rs                | 54    | -9   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/src/backends/sp1.rs                  | 72    | -24  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/src/cli.rs                           | 62    | -11  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/src/config.rs                        | 7     | -1   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/src/prover.rs                        | 115   | -2   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/zkvm/interface/src/deposits.rs       | 53    | +53  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/zkvm/interface/src/execution.rs      | 199   | -106 |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/zkvm/interface/src/io.rs             | 57    | -25  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/zkvm/interface/src/lib.rs            | 7     | +3   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/prover/zkvm/interface/src/withdrawals.rs    | 80    | +80  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/sdk/src/calldata.rs                         | 363   | -3   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/block_producer.rs                 | 134   | +3   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/block_producer/payload_builder.rs | 347   | +2   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/configs.rs                        | 52    | -12  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/errors.rs                         | 230   | -22  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/l1_committer.rs                   | 590   | +79  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/l1_proof_sender.rs                | 212   | -82  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/mod.rs                            | 83    | -34  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/proof_coordinator.rs              | 468   | -52  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/state_diff.rs                     | 498   | +498 |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/sequencer/utils.rs                          | 13    | -109 |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/storage/src/api.rs                          | 71    | -2   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/storage/src/store.rs                        | 249   | -7   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/storage/src/store_db/in_memory.rs           | 167   | -8   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/storage/src/store_db/libmdbx.rs             | 250   | -12  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/storage/src/store_db/redb.rs                | 252   | -13  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/tee/quote-gen/src/main.rs                   | 99    | -2   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/tee/quote-gen/src/sender.rs                 | 71    | -4   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/utils/prover/proving_systems.rs             | 74    | -48  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/utils/prover/save_state.rs                  | 425   | -5   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/l2/utils/test_data_io.rs                       | 88    | +33  |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/networking/p2p/rlpx/connection.rs              | 593   | -4   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/clients/eth/mod.rs              | 1192  | -6   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/engine/fork_choice.rs           | 352   | -2   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/rpc.rs                          | 573   | -1   |
+--------------------------------------------------------------+-------+------+
| ethrex/crates/networking/rpc/tracing.rs                      | 85    | -73  |
+--------------------------------------------------------------+-------+------+

Copy link

github-actions bot commented Jun 9, 2025

Benchmark Results Comparison

PR Results

Benchmark Results: Factorial

Command Mean [ms] Min [ms] Max [ms] Relative
revm_Factorial 231.5 ± 0.6 230.7 232.9 1.00
levm_Factorial 748.7 ± 6.3 743.2 763.0 3.23 ± 0.03

Benchmark Results: Factorial - Recursive

Command Mean [s] Min [s] Max [s] Relative
revm_FactorialRecursive 1.462 ± 0.098 1.327 1.578 1.00
levm_FactorialRecursive 3.900 ± 0.025 3.858 3.938 2.67 ± 0.18

Benchmark Results: Fibonacci

Command Mean [ms] Min [ms] Max [ms] Relative
revm_Fibonacci 210.8 ± 9.0 203.0 231.8 1.00
levm_Fibonacci 747.7 ± 7.1 736.5 754.1 3.55 ± 0.15

Benchmark Results: ManyHashes

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ManyHashes 8.7 ± 0.1 8.6 8.8 1.00
levm_ManyHashes 15.9 ± 0.1 15.7 16.0 1.82 ± 0.02

Benchmark Results: BubbleSort

Command Mean [s] Min [s] Max [s] Relative
revm_BubbleSort 3.273 ± 0.013 3.252 3.298 1.00
levm_BubbleSort 5.593 ± 0.044 5.527 5.634 1.71 ± 0.02

Benchmark Results: ERC20 - Transfer

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ERC20Transfer 255.3 ± 1.5 253.8 258.7 1.00
levm_ERC20Transfer 499.1 ± 5.2 494.0 509.6 1.96 ± 0.02

Benchmark Results: ERC20 - Mint

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ERC20Mint 145.8 ± 1.4 144.4 149.4 1.00
levm_ERC20Mint 323.1 ± 3.3 320.0 329.5 2.22 ± 0.03

Benchmark Results: ERC20 - Approval

Command Mean [s] Min [s] Max [s] Relative
revm_ERC20Approval 1.063 ± 0.002 1.058 1.066 1.00
levm_ERC20Approval 1.885 ± 0.026 1.866 1.954 1.77 ± 0.02

Main Results

Benchmark Results: Factorial

Command Mean [ms] Min [ms] Max [ms] Relative
revm_Factorial 234.1 ± 2.9 228.1 239.3 1.00
levm_Factorial 780.8 ± 84.8 747.1 1021.6 3.34 ± 0.36

Benchmark Results: Factorial - Recursive

Command Mean [s] Min [s] Max [s] Relative
revm_FactorialRecursive 1.444 ± 0.087 1.332 1.587 1.00
levm_FactorialRecursive 3.884 ± 0.016 3.866 3.914 2.69 ± 0.16

Benchmark Results: Fibonacci

Command Mean [ms] Min [ms] Max [ms] Relative
revm_Fibonacci 203.7 ± 0.5 203.1 204.7 1.00
levm_Fibonacci 755.0 ± 24.8 738.0 820.5 3.71 ± 0.12

Benchmark Results: ManyHashes

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ManyHashes 8.8 ± 0.0 8.7 8.8 1.00
levm_ManyHashes 16.3 ± 0.1 16.1 16.4 1.86 ± 0.01

Benchmark Results: BubbleSort

Command Mean [s] Min [s] Max [s] Relative
revm_BubbleSort 3.243 ± 0.016 3.228 3.270 1.00
levm_BubbleSort 5.669 ± 0.072 5.586 5.774 1.75 ± 0.02

Benchmark Results: ERC20 - Transfer

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ERC20Transfer 249.6 ± 1.8 247.2 252.1 1.00
levm_ERC20Transfer 502.3 ± 3.0 499.0 507.5 2.01 ± 0.02

Benchmark Results: ERC20 - Mint

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ERC20Mint 141.2 ± 1.4 140.0 144.4 1.00
levm_ERC20Mint 326.6 ± 3.9 322.9 334.2 2.31 ± 0.04

Benchmark Results: ERC20 - Approval

Command Mean [s] Min [s] Max [s] Relative
revm_ERC20Approval 1.045 ± 0.005 1.040 1.053 1.00
levm_ERC20Approval 1.930 ± 0.024 1.902 1.971 1.85 ± 0.02

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.

LEVM: Update validations.md docs
1 participant