Skip to content

fix(evm): consume all gas when a frame halts exceptionally - #605

Open
abmcar wants to merge 1 commit into
DTVMStack:mainfrom
abmcar:fix/evm-exceptional-halt-gas
Open

fix(evm): consume all gas when a frame halts exceptionally#605
abmcar wants to merge 1 commit into
DTVMStack:mainfrom
abmcar:fix/evm-exceptional-halt-gas

Conversation

@abmcar

@abmcar abmcar commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

  • N
  • Y

2. What is the scope of this PR (e.g. component or file name):

Exceptional-halt gas accounting at the three evmc_result finalisation sites:
src/vm/dt_evmc_vm.cpp and src/runtime/runtime.cpp, with the shared rule added
as a helper in src/evm/evm.h.

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

  • Affects user behaviors
  • Contains CI/CD configuration changes
  • Contains documentation changes
  • Contains experimental features
  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Other

The three places that finalise an evmc_result all ended with

Result.gas_left = <instance>.getGas();

which unconditionally overwrites whatever the halt paths had already decided. The
instance's gas counter is not authoritative after a halt: the interpreter zeroes
the frame's gas, and the JIT trap path never touches gas at all. So an
exceptional halt handed the caller back gas the EVM had already burned.

evmone states the rule directly in make_execution_result:

// An exceptional halt consumes all gas; only a success or revert keeps gas_left.
if (state.status != EVMC_SUCCESS && state.status != EVMC_REVERT)
    gas_left = 0;

This routes the three sites through one helper that applies that rule.

How it surfaced: mainnet witness replay of blocks 25818502 and 25818530, where a
nested frame halted with EVMC_INVALID_MEMORY_ACCESS and returned 339011 of its
440977 gas limit. The embedder rejects any halted result that retained gas, which
is what made it visible.

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

  • N
  • Y

A caller that observed non-zero gas_left on an exceptionally halted frame now
observes zero. That is the consensus behaviour and the reason for the change; any
consumer relying on the old value was relying on a defect. Success and revert
results are unaffected, and under the interpreter the frame's gas was already
zeroed — the difference is that the frame's decision now survives to the caller.

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

  • Unit test
  • Integration test
  • Benchmark (add benchmark stats below)
  • Manual test (add detailed scripts or steps below)
  • Other

Validation on a GCC 12 / LLVM 15 Release multipass build, configured to match the
existing EVM configuration (ZEN_ENABLE_EVM, ZEN_ENABLE_MULTIPASS_JIT,
ZEN_ENABLE_VIRTUAL_STACK, ZEN_ENABLE_CPU_EXCEPTION all ON):

  • ./tools/format.sh check: PASS
  • Release build on top of 338d123: PASS
  • EVM fixture generation (tools/easm2bytecode.sh): 209/209
  • ctest: 11/12 test binaries pass

The one failure, solidityContractTests (7 cases), is solc not found in this
environment. It fails identically on a pristine 338d123 build configured the
same way, which was built and run side by side for exactly this comparison — so
it is environmental, not a regression from this change. Every other binary
passes, including evmDifferentialTests, evmJitFrontendTests, evmStateTests,
evmInterpTests, evmModuleCacheTests, evmFallbackExecutionTests and
evmProfileGuidedJITTests.

Behavioural check: mainnet witness replay through the EVMC interface. Before, a
nested frame halting with EVMC_INVALID_MEMORY_ACCESS returned 339011 of a 440977
gas limit; after, it returns zero, which is what the embedder's halt check
expects.

Note on the two blocks above: this change is necessary but not sufficient for
them. The halt itself is a separate JIT defect — a null-pointer dereference in
generated code — which was still unlocated when this PR was opened and has since
been found and fixed in #607. This PR does not fix those blocks and does not
depend on #607; it corrects the gas rule that their halt happened to expose.

6. Release note

Zero gas_left on an exceptional halt, matching consensus behaviour; only success and revert retain gas.

The three places that finalise an evmc_result all ended with

    Result.gas_left = <instance>.getGas();

which overwrites whatever the halt paths had already decided. The instance's
gas counter is not authoritative after a halt: the interpreter zeroes the
*frame's* gas (interpreter.cpp) and the JIT trap path never touches gas at
all, so an exceptional halt handed the caller back gas the EVM had already
burned. evmone applies the opposite rule in make_execution_result - "an
exceptional halt consumes all gas; only a success or revert keeps gas_left" -
and that is the consensus behaviour.

Route the three sites through one helper that applies that rule. Observed on
mainnet blocks 25818502 and 25818530, where a nested frame halted with
EVMC_INVALID_MEMORY_ACCESS and returned 339011 of its 440977 gas limit.

This is necessary but not sufficient for those two blocks: the halt itself is
a separate JIT defect (a null-pointer dereference inside JIT'd code that the
trap handler reports as out-of-bounds memory). Both blocks replay correctly
under mode=interpreter, so the remaining defect is JIT-only.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0187PTseLY2NbzxKrnstDWwS

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is small, consistent across the identified finalization sites, and directly enforces the intended consensus rule without altering SUCCESS/REVERT behavior.

Pull request overview

This PR fixes EVMC gas accounting so that an exceptionally halted EVM frame always reports gas_left = 0 (consuming all frame gas), matching consensus behavior and aligning with evmone’s result finalization rule. It centralizes the rule in a shared helper and applies it at the EVMC result finalization points that previously overwrote halt-path decisions with Instance::getGas().

Changes:

  • Add zen::evm::setFrameGasLeft() helper implementing “only SUCCESS/REVERT retain gas; otherwise gas_left = 0”.
  • Route interpreter and JIT EVMC result finalization in dt_evmc_vm.cpp through the helper.
  • Route Runtime::callEVMMainOnPhysStack() EVMC result finalization through the helper.
File summaries
File Description
src/vm/dt_evmc_vm.cpp Uses shared helper when finalizing evmc::Result so exceptional halts no longer leak remaining gas back to the caller.
src/runtime/runtime.cpp Applies the same finalization rule when the runtime completes an EVM execution on the physical stack.
src/evm/evm.h Introduces the shared helper implementing the terminal gas rule for EVMC results.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown

⚡ Performance Regression Check Results

✅ Performance Check Passed (interpreter)

Performance Benchmark Results (threshold: 25%)

Benchmark Baseline (us) Current (us) Change Status
total/main/blake2b_huff/8415nulls 1.48 1.48 +0.3% PASS
total/main/blake2b_huff/empty 0.02 0.03 +9.0% PASS
total/main/blake2b_shifts/8415nulls 8.00 8.48 +6.0% PASS
total/main/sha1_divs/5311 5.06 5.03 -0.6% PASS
total/main/sha1_divs/empty 0.06 0.06 +4.2% PASS
total/main/sha1_shifts/5311 3.21 3.34 +4.0% PASS
total/main/sha1_shifts/empty 0.03 0.03 +8.6% PASS
total/main/snailtracer/benchmark 52.35 53.44 +2.1% PASS
total/main/structarray_alloc/nfts_rank 0.63 0.74 +16.4% PASS
total/main/swap_math/insufficient_liquidity 0.00 0.00 +2.6% PASS
total/main/swap_math/received 0.00 0.00 +1.7% PASS
total/main/swap_math/spent 0.00 0.00 +0.5% PASS
total/main/weierstrudel/1 0.19 0.19 -1.2% PASS
total/main/weierstrudel/15 2.18 2.09 -4.0% PASS
total/micro/JUMPDEST_n0/empty 1.43 1.45 +1.0% PASS
total/micro/jump_around/empty 0.05 0.05 +3.8% PASS
total/micro/loop_with_many_jumpdests/empty 35.26 40.68 +15.4% PASS
total/micro/memory_grow_mload/by1 0.11 0.10 -8.6% PASS
total/micro/memory_grow_mload/by16 0.11 0.11 +4.7% PASS
total/micro/memory_grow_mload/by32 0.07 0.07 +0.4% PASS
total/micro/memory_grow_mload/nogrow 0.06 0.06 +1.2% PASS
total/micro/memory_grow_mstore/by1 0.10 0.11 +3.1% PASS
total/micro/memory_grow_mstore/by16 0.07 0.07 -2.0% PASS
total/micro/memory_grow_mstore/by32 0.13 0.14 +3.9% PASS
total/micro/memory_grow_mstore/nogrow 0.10 0.11 +3.3% PASS
total/micro/signextend/one 0.15 0.16 +2.2% PASS
total/micro/signextend/zero 0.26 0.27 +3.8% PASS
total/synth/ADD/b0 0.97 0.98 +0.6% PASS
total/synth/ADD/b1 1.63 1.69 +4.0% PASS
total/synth/ADDRESS/a0 5.54 5.65 +2.1% PASS
total/synth/ADDRESS/a1 4.31 4.30 -0.1% PASS
total/synth/AND/b0 0.98 0.98 -0.0% PASS
total/synth/AND/b1 1.38 1.47 +6.8% PASS
total/synth/BYTE/b0 4.00 4.00 +0.0% PASS
total/synth/BYTE/b1 4.26 4.30 +1.1% PASS
total/synth/CALLDATASIZE/a0 3.19 3.29 +3.4% PASS
total/synth/CALLDATASIZE/a1 2.23 2.24 +0.3% PASS
total/synth/CALLER/a0 5.62 5.58 -0.8% PASS
total/synth/CALLER/a1 5.68 5.70 +0.3% PASS
total/synth/CALLVALUE/a0 2.12 2.18 +2.8% PASS
total/synth/CALLVALUE/a1 3.28 3.23 -1.5% PASS
total/synth/CODESIZE/a0 3.50 3.84 +9.6% PASS
total/synth/CODESIZE/a1 3.64 3.76 +3.2% PASS
total/synth/DUP1/d0 0.91 0.97 +5.9% PASS
total/synth/DUP1/d1 0.98 1.05 +7.5% PASS
total/synth/DUP10/d0 1.01 1.04 +3.1% PASS
total/synth/DUP10/d1 1.00 1.04 +3.9% PASS
total/synth/DUP11/d0 0.58 0.60 +2.8% PASS
total/synth/DUP11/d1 0.95 1.00 +4.8% PASS
total/synth/DUP12/d0 1.01 1.04 +2.9% PASS
total/synth/DUP12/d1 0.51 0.51 +0.1% PASS
total/synth/DUP13/d0 1.02 0.98 -3.3% PASS
total/synth/DUP13/d1 0.97 1.03 +5.9% PASS
total/synth/DUP14/d0 0.58 0.60 +1.8% PASS
total/synth/DUP14/d1 0.97 1.04 +8.1% PASS
total/synth/DUP15/d0 1.03 1.06 +2.4% PASS
total/synth/DUP15/d1 0.51 0.52 +0.1% PASS
total/synth/DUP16/d0 1.02 0.97 -4.9% PASS
total/synth/DUP16/d1 0.98 1.06 +8.8% PASS
total/synth/DUP2/d0 0.56 0.56 +0.7% PASS
total/synth/DUP2/d1 0.96 1.06 +10.2% PASS
total/synth/DUP3/d0 1.01 0.94 -7.6% PASS
total/synth/DUP3/d1 0.51 0.52 +0.2% PASS
total/synth/DUP4/d0 0.96 1.07 +12.2% PASS
total/synth/DUP4/d1 0.95 1.04 +8.9% PASS
total/synth/DUP5/d0 0.58 0.58 +0.9% PASS
total/synth/DUP5/d1 0.97 1.03 +6.7% PASS
total/synth/DUP6/d0 0.98 1.06 +7.8% PASS
total/synth/DUP6/d1 0.51 0.52 +0.1% PASS
total/synth/DUP7/d0 0.97 0.97 -0.4% PASS
total/synth/DUP7/d1 0.97 1.04 +7.2% PASS
total/synth/DUP8/d0 0.58 0.60 +2.6% PASS
total/synth/DUP8/d1 0.95 1.04 +9.5% PASS
total/synth/DUP9/d0 1.02 0.99 -2.6% PASS
total/synth/DUP9/d1 0.52 0.52 -0.3% PASS
total/synth/EQ/b0 2.51 2.41 -4.1% PASS
total/synth/EQ/b1 2.67 2.69 +0.7% PASS
total/synth/GAS/a0 2.53 2.65 +4.9% PASS
total/synth/GAS/a1 3.98 4.00 +0.7% PASS
total/synth/GT/b0 2.56 2.52 -1.8% PASS
total/synth/GT/b1 2.72 2.73 +0.3% PASS
total/synth/ISZERO/u0 3.74 3.69 -1.5% PASS
total/synth/JUMPDEST/n0 1.43 1.45 +1.1% PASS
total/synth/LT/b0 2.51 2.54 +1.1% PASS
total/synth/LT/b1 2.20 2.20 -0.0% PASS
total/synth/MSIZE/a0 3.36 3.25 -3.3% PASS
total/synth/MSIZE/a1 3.26 3.35 +3.0% PASS
total/synth/MUL/b0 4.01 4.01 +0.0% PASS
total/synth/MUL/b1 3.69 3.85 +4.4% PASS
total/synth/NOT/u0 1.09 1.14 +4.3% PASS
total/synth/OR/b0 1.27 1.50 +18.1% PASS
total/synth/OR/b1 0.97 1.06 +8.4% PASS
total/synth/PC/a0 3.02 3.24 +7.2% PASS
total/synth/PC/a1 2.23 2.24 +0.2% PASS
total/synth/PUSH1/p0 1.17 1.15 -1.8% PASS
total/synth/PUSH1/p1 0.82 0.83 +1.1% PASS
total/synth/PUSH10/p0 1.17 1.22 +4.9% PASS
total/synth/PUSH10/p1 0.83 0.83 +0.4% PASS
total/synth/PUSH11/p0 1.16 1.16 +0.5% PASS
total/synth/PUSH11/p1 1.22 1.23 +0.7% PASS
total/synth/PUSH12/p0 0.71 0.71 +0.1% PASS
total/synth/PUSH12/p1 1.26 1.22 -3.2% PASS
total/synth/PUSH13/p0 1.17 1.15 -2.0% PASS
total/synth/PUSH13/p1 0.83 0.83 +0.3% PASS
total/synth/PUSH14/p0 1.19 1.18 -0.9% PASS
total/synth/PUSH14/p1 1.20 1.26 +5.5% PASS
total/synth/PUSH15/p0 0.72 0.72 -0.6% PASS
total/synth/PUSH15/p1 1.21 1.25 +3.6% PASS
total/synth/PUSH16/p0 1.21 1.20 -1.4% PASS
total/synth/PUSH16/p1 0.84 0.84 +0.1% PASS
total/synth/PUSH17/p0 1.19 1.14 -4.4% PASS
total/synth/PUSH17/p1 1.22 1.32 +8.3% PASS
total/synth/PUSH18/p0 0.72 0.72 -0.1% PASS
total/synth/PUSH18/p1 1.21 1.28 +5.8% PASS
total/synth/PUSH19/p0 1.20 1.22 +1.5% PASS
total/synth/PUSH19/p1 0.84 0.84 +0.4% PASS
total/synth/PUSH2/p0 1.18 1.22 +3.4% PASS
total/synth/PUSH2/p1 1.23 1.23 -0.3% PASS
total/synth/PUSH20/p0 1.19 1.14 -3.9% PASS
total/synth/PUSH20/p1 1.21 1.29 +7.2% PASS
total/synth/PUSH21/p0 0.72 0.72 +0.6% PASS
total/synth/PUSH21/p1 1.26 1.26 -0.6% PASS
total/synth/PUSH22/p0 1.20 1.18 -1.5% PASS
total/synth/PUSH22/p1 0.84 0.84 +0.7% PASS
total/synth/PUSH23/p0 1.23 1.23 +0.2% PASS
total/synth/PUSH23/p1 1.24 1.25 +1.0% PASS
total/synth/PUSH24/p0 0.72 0.72 +0.6% PASS
total/synth/PUSH24/p1 1.20 1.25 +4.2% PASS
total/synth/PUSH25/p0 1.19 1.17 -2.2% PASS
total/synth/PUSH25/p1 0.83 0.85 +1.7% PASS
total/synth/PUSH26/p0 1.18 1.15 -2.3% PASS
total/synth/PUSH26/p1 1.27 1.24 -1.7% PASS
total/synth/PUSH27/p0 0.73 0.73 +0.0% PASS
total/synth/PUSH27/p1 1.29 1.27 -1.5% PASS
total/synth/PUSH28/p0 1.17 1.27 +8.2% PASS
total/synth/PUSH28/p1 0.85 0.85 +0.3% PASS
total/synth/PUSH29/p0 1.24 1.17 -5.7% PASS
total/synth/PUSH29/p1 1.27 1.26 -0.9% PASS
total/synth/PUSH3/p0 0.71 0.71 -0.3% PASS
total/synth/PUSH3/p1 1.21 1.29 +6.6% PASS
total/synth/PUSH30/p0 0.72 0.73 +1.0% PASS
total/synth/PUSH30/p1 1.30 1.26 -2.9% PASS
total/synth/PUSH31/p0 1.23 1.16 -5.6% PASS
total/synth/PUSH31/p1 0.84 0.84 +0.0% PASS
total/synth/PUSH32/p0 1.22 1.16 -5.0% PASS
total/synth/PUSH32/p1 1.25 1.30 +3.9% PASS
total/synth/PUSH4/p0 1.18 1.16 -1.3% PASS
total/synth/PUSH4/p1 0.83 0.84 +1.3% PASS
total/synth/PUSH5/p0 1.15 1.22 +5.9% PASS
total/synth/PUSH5/p1 1.22 1.26 +3.8% PASS
total/synth/PUSH6/p0 0.71 0.71 -0.1% PASS
total/synth/PUSH6/p1 1.24 1.26 +1.6% PASS
total/synth/PUSH7/p0 1.24 1.21 -2.3% PASS
total/synth/PUSH7/p1 0.83 0.83 +0.3% PASS
total/synth/PUSH8/p0 1.17 1.12 -4.2% PASS
total/synth/PUSH8/p1 1.28 1.26 -1.2% PASS
total/synth/PUSH9/p0 0.71 0.71 -0.2% PASS
total/synth/PUSH9/p1 1.30 1.26 -3.0% PASS
total/synth/RETURNDATASIZE/a0 2.39 2.39 +0.2% PASS
total/synth/RETURNDATASIZE/a1 3.60 3.72 +3.4% PASS
total/synth/SAR/b0 3.02 3.22 +6.6% PASS
total/synth/SAR/b1 4.48 4.59 +2.5% PASS
total/synth/SGT/b0 2.50 2.51 +0.3% PASS
total/synth/SGT/b1 2.02 2.01 -0.3% PASS
total/synth/SHL/b0 2.95 3.01 +2.0% PASS
total/synth/SHL/b1 1.14 1.15 +0.3% PASS
total/synth/SHR/b0 2.44 2.50 +2.6% PASS
total/synth/SHR/b1 1.94 2.11 +8.7% PASS
total/synth/SIGNEXTEND/b0 2.11 2.32 +9.9% PASS
total/synth/SIGNEXTEND/b1 3.48 3.48 -0.2% PASS
total/synth/SLT/b0 2.28 2.28 +0.3% PASS
total/synth/SLT/b1 2.55 2.59 +1.9% PASS
total/synth/SUB/b0 1.55 1.53 -1.6% PASS
total/synth/SUB/b1 1.65 1.73 +5.0% PASS
total/synth/SWAP1/s0 0.93 0.94 +0.7% PASS
total/synth/SWAP10/s0 0.94 0.98 +4.4% PASS
total/synth/SWAP11/s0 1.56 1.79 +14.8% PASS
total/synth/SWAP12/s0 1.56 1.62 +4.3% PASS
total/synth/SWAP13/s0 0.95 0.95 +0.3% PASS
total/synth/SWAP14/s0 1.41 1.85 +31.4% PASS
total/synth/SWAP15/s0 1.57 1.79 +14.4% PASS
total/synth/SWAP16/s0 0.95 0.96 +0.6% PASS
total/synth/SWAP2/s0 1.65 1.83 +11.0% PASS
total/synth/SWAP3/s0 1.54 1.73 +12.1% PASS
total/synth/SWAP4/s0 0.94 0.94 +0.4% PASS
total/synth/SWAP5/s0 1.57 1.62 +3.2% PASS
total/synth/SWAP6/s0 1.58 1.82 +14.8% PASS
total/synth/SWAP7/s0 0.94 0.94 +0.3% PASS
total/synth/SWAP8/s0 1.56 1.91 +22.6% PASS
total/synth/SWAP9/s0 1.54 1.69 +10.0% PASS
total/synth/XOR/b0 1.30 1.31 +0.7% PASS
total/synth/XOR/b1 1.33 1.36 +2.8% PASS
total/synth/loop_v1 5.24 5.52 +5.5% PASS
total/synth/loop_v2 5.29 5.36 +1.4% PASS

Summary: 194 benchmarks, 0 regressions


✅ Performance Check Passed (multipass)

Performance Benchmark Results (threshold: 25%)

Benchmark Baseline (us) Current (us) Change Status
total/main/blake2b_huff/8415nulls 1.36 1.36 -0.2% PASS
total/main/blake2b_huff/empty 0.02 0.02 -4.3% PASS
total/main/blake2b_shifts/8415nulls 3.49 3.58 +2.8% PASS
total/main/sha1_divs/5311 0.76 0.77 +1.1% PASS
total/main/sha1_divs/empty 0.01 0.01 -3.2% PASS
total/main/sha1_shifts/5311 0.67 0.67 +0.4% PASS
total/main/sha1_shifts/empty 0.00 0.01 +2.6% PASS
total/main/snailtracer/benchmark 37.40 37.96 +1.5% PASS
total/main/structarray_alloc/nfts_rank 0.24 0.24 -0.5% PASS
total/main/swap_math/insufficient_liquidity 0.00 0.00 +3.4% PASS
total/main/swap_math/received 0.00 0.00 -2.4% PASS
total/main/swap_math/spent 0.00 0.00 -1.5% PASS
total/main/weierstrudel/1 0.25 0.25 -0.9% PASS
total/main/weierstrudel/15 2.84 2.89 +1.7% PASS
total/micro/JUMPDEST_n0/empty 0.00 0.00 +1.7% PASS
total/micro/jump_around/empty 0.02 0.02 -2.0% PASS
total/micro/loop_with_many_jumpdests/empty 0.01 0.01 +3.0% PASS
total/micro/memory_grow_mload/by1 0.02 0.02 +2.6% PASS
total/micro/memory_grow_mload/by16 0.02 0.02 -1.1% PASS
total/micro/memory_grow_mload/by32 0.01 0.01 -0.1% PASS
total/micro/memory_grow_mload/nogrow 0.01 0.01 +0.8% PASS
total/micro/memory_grow_mstore/by1 0.02 0.02 +0.7% PASS
total/micro/memory_grow_mstore/by16 0.01 0.01 +1.6% PASS
total/micro/memory_grow_mstore/by32 0.02 0.02 +2.1% PASS
total/micro/memory_grow_mstore/nogrow 0.02 0.02 +2.9% PASS
total/micro/signextend/one 0.22 0.22 +1.6% PASS
total/micro/signextend/zero 0.28 0.28 -1.0% PASS
total/synth/ADD/b0 0.00 0.00 +2.3% PASS
total/synth/ADD/b1 0.00 0.00 +1.1% PASS
total/synth/ADDRESS/a0 0.18 0.18 -2.3% PASS
total/synth/ADDRESS/a1 0.13 0.13 +1.5% PASS
total/synth/AND/b0 0.00 0.00 +0.9% PASS
total/synth/AND/b1 0.00 0.00 +1.3% PASS
total/synth/BYTE/b0 0.00 0.00 +2.2% PASS
total/synth/BYTE/b1 0.00 0.00 +4.1% PASS
total/synth/CALLDATASIZE/a0 0.09 0.10 +8.1% PASS
total/synth/CALLDATASIZE/a1 0.06 0.06 +1.3% PASS
total/synth/CALLER/a0 0.18 0.19 +7.0% PASS
total/synth/CALLER/a1 0.18 0.17 -5.1% PASS
total/synth/CALLVALUE/a0 0.16 0.16 +0.9% PASS
total/synth/CALLVALUE/a1 0.21 0.22 +6.0% PASS
total/synth/CODESIZE/a0 0.09 0.09 -1.2% PASS
total/synth/CODESIZE/a1 0.09 0.09 +2.2% PASS
total/synth/DUP1/d0 0.00 0.00 +4.8% PASS
total/synth/DUP1/d1 0.00 0.00 +2.9% PASS
total/synth/DUP10/d0 0.00 0.00 +0.5% PASS
total/synth/DUP10/d1 0.00 0.00 +2.7% PASS
total/synth/DUP11/d0 0.00 0.00 +1.7% PASS
total/synth/DUP11/d1 0.00 0.00 +3.3% PASS
total/synth/DUP12/d0 0.00 0.00 +0.2% PASS
total/synth/DUP12/d1 0.00 0.00 -0.4% PASS
total/synth/DUP13/d0 0.00 0.00 -2.6% PASS
total/synth/DUP13/d1 0.00 0.00 +4.0% PASS
total/synth/DUP14/d0 0.00 0.00 +2.2% PASS
total/synth/DUP14/d1 0.00 0.00 +0.3% PASS
total/synth/DUP15/d0 0.00 0.00 -0.2% PASS
total/synth/DUP15/d1 0.00 0.00 +2.0% PASS
total/synth/DUP16/d0 0.00 0.00 +1.9% PASS
total/synth/DUP16/d1 0.00 0.00 +6.4% PASS
total/synth/DUP2/d0 0.00 0.00 +2.1% PASS
total/synth/DUP2/d1 0.00 0.00 -1.1% PASS
total/synth/DUP3/d0 0.00 0.00 +2.5% PASS
total/synth/DUP3/d1 0.00 0.00 -0.1% PASS
total/synth/DUP4/d0 0.00 0.00 +2.6% PASS
total/synth/DUP4/d1 0.00 0.00 -5.7% PASS
total/synth/DUP5/d0 0.00 0.00 +1.1% PASS
total/synth/DUP5/d1 0.00 0.00 +4.4% PASS
total/synth/DUP6/d0 0.00 0.00 +1.8% PASS
total/synth/DUP6/d1 0.00 0.00 +2.3% PASS
total/synth/DUP7/d0 0.00 0.00 +0.1% PASS
total/synth/DUP7/d1 0.00 0.00 +0.6% PASS
total/synth/DUP8/d0 0.00 0.00 +0.4% PASS
total/synth/DUP8/d1 0.00 0.00 -0.8% PASS
total/synth/DUP9/d0 0.00 0.00 +2.7% PASS
total/synth/DUP9/d1 0.00 0.00 +2.3% PASS
total/synth/EQ/b0 0.00 0.00 -0.7% PASS
total/synth/EQ/b1 0.00 0.00 +1.4% PASS
total/synth/GAS/a0 0.45 0.46 +2.0% PASS
total/synth/GAS/a1 0.71 0.76 +6.0% PASS
total/synth/GT/b0 0.00 0.00 +0.1% PASS
total/synth/GT/b1 0.00 0.00 +0.2% PASS
total/synth/ISZERO/u0 0.00 0.00 +2.7% PASS
total/synth/JUMPDEST/n0 0.00 0.00 +2.6% PASS
total/synth/LT/b0 0.00 0.00 +1.7% PASS
total/synth/LT/b1 0.00 0.00 +2.7% PASS
total/synth/MSIZE/a0 0.00 0.00 +1.8% PASS
total/synth/MSIZE/a1 0.00 0.00 +3.5% PASS
total/synth/MUL/b0 0.00 0.00 +3.1% PASS
total/synth/MUL/b1 0.00 0.00 +0.7% PASS
total/synth/NOT/u0 0.00 0.00 -0.3% PASS
total/synth/OR/b0 0.00 0.00 +4.0% PASS
total/synth/OR/b1 0.00 0.00 +1.6% PASS
total/synth/PC/a0 0.00 0.00 -1.4% PASS
total/synth/PC/a1 0.00 0.00 +2.6% PASS
total/synth/PUSH1/p0 0.00 0.00 +2.8% PASS
total/synth/PUSH1/p1 0.00 0.00 +1.4% PASS
total/synth/PUSH10/p0 0.00 0.00 -2.2% PASS
total/synth/PUSH10/p1 0.00 0.00 +0.4% PASS
total/synth/PUSH11/p0 0.00 0.00 -3.6% PASS
total/synth/PUSH11/p1 0.00 0.00 +5.5% PASS
total/synth/PUSH12/p0 0.00 0.00 +3.4% PASS
total/synth/PUSH12/p1 0.00 0.00 +12.6% PASS
total/synth/PUSH13/p0 0.00 0.00 -3.3% PASS
total/synth/PUSH13/p1 0.00 0.00 -0.8% PASS
total/synth/PUSH14/p0 0.00 0.00 +5.1% PASS
total/synth/PUSH14/p1 0.00 0.00 +7.5% PASS
total/synth/PUSH15/p0 0.00 0.00 +0.1% PASS
total/synth/PUSH15/p1 0.00 0.00 +3.1% PASS
total/synth/PUSH16/p0 0.00 0.00 +2.6% PASS
total/synth/PUSH16/p1 0.00 0.00 -4.9% PASS
total/synth/PUSH17/p0 0.00 0.00 +3.4% PASS
total/synth/PUSH17/p1 0.00 0.00 -3.4% PASS
total/synth/PUSH18/p0 0.00 0.00 -4.6% PASS
total/synth/PUSH18/p1 0.00 0.00 +5.4% PASS
total/synth/PUSH19/p0 0.00 0.00 +3.1% PASS
total/synth/PUSH19/p1 0.00 0.00 -3.7% PASS
total/synth/PUSH2/p0 0.00 0.00 +1.7% PASS
total/synth/PUSH2/p1 0.00 0.00 -0.3% PASS
total/synth/PUSH20/p0 0.00 0.00 +2.6% PASS
total/synth/PUSH20/p1 0.00 0.00 +1.9% PASS
total/synth/PUSH21/p0 0.00 0.00 +2.5% PASS
total/synth/PUSH21/p1 0.00 0.00 +1.5% PASS
total/synth/PUSH22/p0 1.31 1.33 +1.0% PASS
total/synth/PUSH22/p1 1.12 1.26 +12.1% PASS
total/synth/PUSH23/p0 1.31 1.35 +3.1% PASS
total/synth/PUSH23/p1 1.60 1.66 +3.9% PASS
total/synth/PUSH24/p0 0.89 0.91 +1.7% PASS
total/synth/PUSH24/p1 1.54 1.67 +8.6% PASS
total/synth/PUSH25/p0 1.30 1.36 +4.8% PASS
total/synth/PUSH25/p1 1.14 1.33 +16.7% PASS
total/synth/PUSH26/p0 1.36 1.38 +1.9% PASS
total/synth/PUSH26/p1 1.49 1.76 +18.2% PASS
total/synth/PUSH27/p0 0.90 0.92 +2.6% PASS
total/synth/PUSH27/p1 1.63 1.67 +2.8% PASS
total/synth/PUSH28/p0 1.30 1.36 +4.4% PASS
total/synth/PUSH28/p1 1.21 1.27 +4.9% PASS
total/synth/PUSH29/p0 1.36 1.35 -0.9% PASS
total/synth/PUSH29/p1 1.51 1.65 +9.5% PASS
total/synth/PUSH3/p0 0.00 0.00 +3.4% PASS
total/synth/PUSH3/p1 0.00 0.00 +1.6% PASS
total/synth/PUSH30/p0 0.87 0.91 +5.4% PASS
total/synth/PUSH30/p1 1.50 1.68 +12.3% PASS
total/synth/PUSH31/p0 1.35 1.34 -0.4% PASS
total/synth/PUSH31/p1 1.24 1.28 +2.7% PASS
total/synth/PUSH32/p0 1.30 1.38 +5.9% PASS
total/synth/PUSH32/p1 1.53 1.74 +13.9% PASS
total/synth/PUSH4/p0 0.00 0.00 +7.3% PASS
total/synth/PUSH4/p1 0.00 0.00 +3.3% PASS
total/synth/PUSH5/p0 0.00 0.00 +1.3% PASS
total/synth/PUSH5/p1 0.00 0.00 -2.2% PASS
total/synth/PUSH6/p0 0.00 0.00 +1.2% PASS
total/synth/PUSH6/p1 0.00 0.00 -0.2% PASS
total/synth/PUSH7/p0 0.00 0.00 +1.9% PASS
total/synth/PUSH7/p1 0.00 0.00 +0.5% PASS
total/synth/PUSH8/p0 0.00 0.00 +1.9% PASS
total/synth/PUSH8/p1 0.00 0.00 +1.9% PASS
total/synth/PUSH9/p0 0.00 0.00 +1.0% PASS
total/synth/PUSH9/p1 0.00 0.00 +0.8% PASS
total/synth/RETURNDATASIZE/a0 0.04 0.04 +1.5% PASS
total/synth/RETURNDATASIZE/a1 0.05 0.05 -4.1% PASS
total/synth/SAR/b0 0.00 0.00 +1.2% PASS
total/synth/SAR/b1 0.00 0.00 +1.0% PASS
total/synth/SGT/b0 0.00 0.00 +4.9% PASS
total/synth/SGT/b1 0.00 0.00 +1.8% PASS
total/synth/SHL/b0 0.00 0.00 +1.4% PASS
total/synth/SHL/b1 0.00 0.00 +1.9% PASS
total/synth/SHR/b0 0.00 0.00 +3.2% PASS
total/synth/SHR/b1 0.00 0.00 +3.9% PASS
total/synth/SIGNEXTEND/b0 0.00 0.00 +0.8% PASS
total/synth/SIGNEXTEND/b1 0.00 0.00 +0.0% PASS
total/synth/SLT/b0 0.00 0.00 +2.1% PASS
total/synth/SLT/b1 0.00 0.00 +1.0% PASS
total/synth/SUB/b0 0.00 0.00 -0.3% PASS
total/synth/SUB/b1 0.00 0.00 +0.7% PASS
total/synth/SWAP1/s0 0.00 0.00 +2.4% PASS
total/synth/SWAP10/s0 0.00 0.00 +1.5% PASS
total/synth/SWAP11/s0 0.00 0.00 +0.2% PASS
total/synth/SWAP12/s0 0.00 0.00 +0.8% PASS
total/synth/SWAP13/s0 0.00 0.00 +1.7% PASS
total/synth/SWAP14/s0 0.00 0.00 +2.6% PASS
total/synth/SWAP15/s0 0.00 0.00 +1.2% PASS
total/synth/SWAP16/s0 0.00 0.00 +2.4% PASS
total/synth/SWAP2/s0 0.00 0.00 +2.5% PASS
total/synth/SWAP3/s0 0.00 0.00 +3.3% PASS
total/synth/SWAP4/s0 0.00 0.00 +1.6% PASS
total/synth/SWAP5/s0 0.00 0.00 +4.4% PASS
total/synth/SWAP6/s0 0.00 0.00 +2.2% PASS
total/synth/SWAP7/s0 0.00 0.00 +2.9% PASS
total/synth/SWAP8/s0 0.00 0.00 +0.9% PASS
total/synth/SWAP9/s0 0.00 0.00 +1.7% PASS
total/synth/XOR/b0 0.00 0.00 +1.7% PASS
total/synth/XOR/b1 0.00 0.00 +1.8% PASS
total/synth/loop_v1 6.13 6.21 +1.2% PASS
total/synth/loop_v2 6.06 6.29 +3.8% PASS

Summary: 194 benchmarks, 0 regressions


abmcar pushed a commit to abmcar/reth that referenced this pull request Aug 29, 2026
The revmc entry in the same document argues that a branch pin stops being
reproducible the moment the branch moves, and then the DTVM row named a branch.
`03b542e` is the tree the measured library was actually built from, and it is
now pushed to the fork, so the reader can reach it.

Also names what that commit carries beyond the cache branch: the module-cache
bound of §5, and the two engine fixes that went upstream as DTVMStack/DTVM#605
and paradigmxyz#604.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018osheVEXr1SywFtbYFjHAc
@abmcar

abmcar commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

Updated one sentence in section 5: the null-pointer dereference described there as "still-open" has since been located and fixed in #607. Noting the edit rather than leaving it silent.

Nothing about this PR changes — it is independent of both #607 and #604, and concerns only the rule that an exceptional halt consumes all gas. The two blocks it mentions are context for how the rule violation surfaced, not something this PR claims to fix.

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.

3 participants