Skip to content

refactor(levm): use more descriptive names when popping call_frame #2730

Merged
JereSalo merged 1 commit into
mainfrom
refactor_call_frame_names
May 12, 2025
Merged

refactor(levm): use more descriptive names when popping call_frame #2730
JereSalo merged 1 commit into
mainfrom
refactor_call_frame_names

Conversation

@DiegoCivi
Copy link
Copy Markdown
Contributor

Motivation

Give a better description of call_frame related variables in run_execution().

Description

  • Use executed_call_frame in scenarios in which the callframe has already been executed.
  • Use parent_call_frame in scenarios in which a callframe has been popped before, to we are working with the previous one.

Closes #2569

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2025

Lines of code report

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

Detailed view
+----------------------------------------+-------+------+
| File                                   | Lines | Diff |
+----------------------------------------+-------+------+
| ethrex/crates/storage/store_db/redb.rs | 1218  | -1   |
+----------------------------------------+-------+------+

@DiegoCivi DiegoCivi changed the title refactor(LEVM): use more descriptive names when popping call_frame refactor(levm): use more descriptive names when popping call_frame May 9, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2025

Benchmark Results Comparison

PR Results

Benchmark Results: Factorial

Command Mean [ms] Min [ms] Max [ms] Relative
revm_Factorial 246.5 ± 1.2 244.8 248.2 1.00
levm_Factorial 834.7 ± 29.9 818.7 918.7 3.39 ± 0.12

Benchmark Results: Factorial - Recursive

Command Mean [s] Min [s] Max [s] Relative
revm_FactorialRecursive 1.530 ± 0.116 1.422 1.710 1.00
levm_FactorialRecursive 13.060 ± 0.321 12.907 13.967 8.54 ± 0.68

Benchmark Results: Fibonacci

Command Mean [ms] Min [ms] Max [ms] Relative
revm_Fibonacci 220.1 ± 1.0 218.5 221.6 1.00
levm_Fibonacci 839.2 ± 13.7 821.5 868.0 3.81 ± 0.06

Benchmark Results: ManyHashes

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ManyHashes 8.7 ± 0.1 8.6 8.9 1.00
levm_ManyHashes 17.4 ± 0.7 17.1 19.2 1.99 ± 0.08

Benchmark Results: BubbleSort

Command Mean [s] Min [s] Max [s] Relative
revm_BubbleSort 3.250 ± 0.021 3.230 3.299 1.00
levm_BubbleSort 5.629 ± 0.151 5.532 6.018 1.73 ± 0.05

Benchmark Results: ERC20 - Transfer

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ERC20Transfer 250.6 ± 2.3 248.4 254.3 1.00
levm_ERC20Transfer 501.6 ± 2.5 499.0 507.4 2.00 ± 0.02

Benchmark Results: ERC20 - Mint

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ERC20Mint 142.7 ± 1.1 141.6 145.1 1.00
levm_ERC20Mint 324.7 ± 4.3 320.5 331.0 2.28 ± 0.03

Benchmark Results: ERC20 - Approval

Command Mean [s] Min [s] Max [s] Relative
revm_ERC20Approval 1.040 ± 0.019 1.020 1.088 1.00
levm_ERC20Approval 1.885 ± 0.006 1.873 1.893 1.81 ± 0.03

Main Results

Benchmark Results: Factorial

Command Mean [ms] Min [ms] Max [ms] Relative
revm_Factorial 241.6 ± 0.7 240.8 242.9 1.00
levm_Factorial 832.8 ± 3.8 825.8 836.8 3.45 ± 0.02

Benchmark Results: Factorial - Recursive

Command Mean [s] Min [s] Max [s] Relative
revm_FactorialRecursive 1.534 ± 0.077 1.421 1.655 1.00
levm_FactorialRecursive 13.044 ± 0.060 12.966 13.168 8.50 ± 0.43

Benchmark Results: Fibonacci

Command Mean [ms] Min [ms] Max [ms] Relative
revm_Fibonacci 212.5 ± 0.9 211.2 213.8 1.00
levm_Fibonacci 844.4 ± 12.7 828.8 867.8 3.97 ± 0.06

Benchmark Results: ManyHashes

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ManyHashes 8.7 ± 0.1 8.6 8.7 1.00
levm_ManyHashes 17.3 ± 0.2 17.2 17.7 2.00 ± 0.02

Benchmark Results: BubbleSort

Command Mean [s] Min [s] Max [s] Relative
revm_BubbleSort 3.232 ± 0.028 3.203 3.292 1.00
levm_BubbleSort 5.717 ± 0.077 5.629 5.851 1.77 ± 0.03

Benchmark Results: ERC20 - Transfer

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ERC20Transfer 249.0 ± 3.5 246.6 257.7 1.00
levm_ERC20Transfer 510.0 ± 2.6 506.5 516.0 2.05 ± 0.03

Benchmark Results: ERC20 - Mint

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ERC20Mint 140.9 ± 0.6 140.2 141.8 1.00
levm_ERC20Mint 327.6 ± 4.5 322.8 339.2 2.32 ± 0.03

Benchmark Results: ERC20 - Approval

Command Mean [s] Min [s] Max [s] Relative
revm_ERC20Approval 1.034 ± 0.014 1.023 1.067 1.00
levm_ERC20Approval 1.915 ± 0.010 1.896 1.931 1.85 ± 0.03

@DiegoCivi DiegoCivi marked this pull request as ready for review May 9, 2025 18:49
@DiegoCivi DiegoCivi requested a review from a team as a code owner May 9, 2025 18:49
@JereSalo JereSalo added this pull request to the merge queue May 12, 2025
Merged via the queue into main with commit d1003c1 May 12, 2025
37 of 38 checks passed
@JereSalo JereSalo deleted the refactor_call_frame_names branch May 12, 2025 16:30
fmoletta pushed a commit that referenced this pull request May 15, 2025
…2730)

**Motivation**

Give a better description of call_frame related variables in
run_execution().

**Description**

- Use `executed_call_frame` in scenarios in which the callframe has
already been executed.
- Use `parent_call_frame` in scenarios in which a callframe has been
popped before, to we are working with the previous one.

<!-- Link to issues: Resolves #111, Resolves #222 -->

Closes #2569
pedrobergamini pushed a commit to pedrobergamini/ethrex that referenced this pull request Aug 24, 2025
…ambdaclass#2730)

**Motivation**

Give a better description of call_frame related variables in
run_execution().

**Description**

- Use `executed_call_frame` in scenarios in which the callframe has
already been executed.
- Use `parent_call_frame` in scenarios in which a callframe has been
popped before, to we are working with the previous one.

<!-- Link to issues: Resolves lambdaclass#111, Resolves lambdaclass#222 -->

Closes lambdaclass#2569
edg-l added a commit that referenced this pull request Apr 22, 2026
Migrate Amsterdam support from bal@v5.6.1 to bal@v5.7.0 (eels_commit
524b44617e410ab21b5122f0be5113b62a0e76ee, devnets/bal/4).

- EIP-7928 (PR #2730): widen BAL index from u16 to u32 across
  StorageChange/CodeChange/BalanceChange/NonceChange, recorder,
  checkpoint, BalAddressIndex and all helpers.
- EIP-8037 (PR #2687): dynamic cost_per_state_byte derived from
  block gas limit. New VM fields for per-block state-gas costs,
  gated by Fork::Amsterdam. 120M block gas keeps cpsb = 1174.
- EIP-8037 (PRs #2698, #2733): SSTORE 0->N->0 reservoir refill via
  clamp-and-spill; per-frame state_gas_refund absorbed on success,
  discarded on revert; remainder spills to VM-level pending reservoir.
- EIP-7976: calldata floor raised from 10 to 16 gas per token
  (Amsterdam-gated), with unweighted token count per spec.
- EIP-7981: access-list data bytes (20/addr, 32/key) folded into
  floor-token count; applies in both regular and floor arms; mempool
  intrinsic-gas path mirrored.
- EIP-8037 (PR #2689): top-level tx failure zeroes execution
  state_gas_used and refunds the reservoir; intrinsic state gas
  preserved. Routed through refund_sender.
- EIP-7708 (PR #2717): audit confirmed invariants (lex-ordered burn
  logs, no coinbase priority-fee log, SELFDESTRUCT-dest coalescing)
  already held; added regression tests.
- EIP-8037 (PR #2595): audit confirmed code-deposit state-gas
  discard on both oversized-code and deposit-OOG halts; added
  regression tests.

Infra: .fixtures_url_amsterdam, Makefile, hive config and docs
bumped to bal@v5.7.0 / devnets/bal/4.

Tests: 185 levm tests green; new files cover EIP-8037 CPSB, refund
clamp-and-spill, top-level reset, code-deposit discard, and combined
EIP-7976+7981 scenarios.
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: Change name when popping call_frame to something more descriptive

3 participants