Skip to content

evm: Reset the execution state in the VM context - #1877

Open
chfast wants to merge 1 commit into
mainfrom
evm/vm-context-enter
Open

chfast wants to merge 1 commit into
mainfrom
evm/vm-context-enter

Conversation

@chfast

@chfast chfast commented Dec 2, 2026

Copy link
Copy Markdown
Member

Add VMContext::enter() that returns the execution state of the message depth, reset for the message, so that the context can also set up the EVM stack and memory of the execution. Previously, Baseline and Advanced each took the state and reset it.

@codspeed

codspeed Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will degrade performance by 1.88%

1 warning

⚠️ 3 benchmarks with a significant change ran on different hardware

Their base and head results were measured on machines with a different CPU, core count or memory, so the changes might not come from the code. Run base and head on the same runner type.

Learn more about Macro Runners

See affected benchmarks

❌ 3 regressed benchmarks
✅ 1043 untouched benchmarks
⏩ 770 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ baseline/analyse/main/structarray_alloc 5 µs 5.1 µs -2.16%
❌ baseline/execute/main/swap_math/insufficient_liquidity 28.5 µs 29 µs -1.74%
❌ baseline/execute/main/swap_math/received 38.1 µs 38.8 µs -1.73%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing evm/vm-context-enter (97c7d10) with main (4554961)

Open in CodSpeed

Footnotes

  1. 770 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@codecov

codecov Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.23%. Comparing base (4554961) to head (97c7d10).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1877   +/-   ##
=======================================
  Coverage   98.23%   98.23%           
=======================================
  Files         191      191           
  Lines       17423    17423           
  Branches     3977     3977           
=======================================
  Hits        17115    17115           
  Misses        237      237           
  Partials       71       71           
Flag Coverage Δ
eest-develop-gmp 27.14% <75.00%> (+<0.01%) ⬆️
eest-legacy 17.06% <75.00%> (+<0.01%) ⬆️
eest-libsecp256k1 28.95% <75.00%> (+<0.01%) ⬆️
eest-stable 83.84% <100.00%> (-0.01%) ⬇️
evmone-unittests 94.10% <100.00%> (ø)
riscv64 94.96% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
core 96.63% <100.00%> (ø)
tooling 94.80% <ø> (ø)
tests 99.80% <ø> (ø)
Files with missing lines Coverage Δ
lib/evmone/advanced_execution.cpp 100.00% <100.00%> (ø)
lib/evmone/baseline_execution.cpp 97.60% <100.00%> (-0.02%) ⬇️
lib/evmone/vm_context.cpp 100.00% <100.00%> (ø)
lib/evmone/vm_context.hpp 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Add VMContext::enter() that returns the execution state of the message
depth, reset for the message, so that the context can also set up the
EVM stack and memory of the execution. Previously, Baseline and
Advanced each took the state and reset it.
@chfast
chfast force-pushed the evm/vm-context-enter branch from 1f97aff to 97c7d10 Compare December 3, 2026 18:19

This branch has not been deployed

No deployments
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.

1 participant