Skip to content

fix(evm): fix real block sync issue for multipass#573

Open
starwarfan wants to merge 5 commits into
DTVMStack:mainfrom
starwarfan:pr/multipass-fixes-no-evmc-abi
Open

fix(evm): fix real block sync issue for multipass#573
starwarfan wants to merge 5 commits into
DTVMStack:mainfrom
starwarfan:pr/multipass-fixes-no-evmc-abi

Conversation

@starwarfan

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):

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

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

  • N
  • Y

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

6. Release note

None

Ensure cached interpreter instances are initialized with the call revision and correct CALL stipend accounting so Silkworm replay matches per-tx gas expectations. This removes WrongBlockGas mismatches observed on blocks 4318818 and 4318819 while keeping debug instrumentation for targeted gas tracing.

Made-with: Cursor

# Conflicts:
#	src/evm/opcode_handlers.cpp
#	src/runtime/evm_module.h
#	src/vm/dt_evmc_vm.cpp
Use full-byte code comparison when validating address-keyed module cache hits so re-created contracts cannot incorrectly reuse a prior compiled module.

Made-with: Cursor

# Conflicts:
#	src/vm/dt_evmc_vm.cpp
Silkworm runs initcode as EVMC_CALL with code_address zeroed. Persistent
L1 cache keyed on 0x0 aliased unrelated initcodes and caused kWrongBlockGas
on block 433153 during long multipass forward runs.

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	src/vm/dt_evmc_vm.cpp
# Conflicts:
#	src/compiler/evm_compiler.cpp
#	src/compiler/evm_frontend/evm_mir_compiler.cpp
#	src/compiler/evm_frontend/evm_mir_compiler.h
#	src/evm/evm_cache.cpp
#	src/evm/evm_cache.h
#	src/runtime/evm_module.cpp
#	src/runtime/evm_module.h
#	src/runtime/runtime.cpp
#	src/vm/dt_evmc_vm.cpp
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

⚡ Performance Regression Check Results

⚠️ Performance Regression Detected (interpreter)

No benchmark summary available.


⚠️ Performance Regression Detected (multipass)

No benchmark summary available.


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