Skip to content

fix(evm,jit): precheck Amsterdam CREATE before child frames#285

Draft
0xalpharush wants to merge 2 commits into
alloy-rs:mainfrom
0xalpharush:agent/amsterdam-jit-create-preaccess
Draft

fix(evm,jit): precheck Amsterdam CREATE before child frames#285
0xalpharush wants to merge 2 commits into
alloy-rs:mainfrom
0xalpharush:agent/amsterdam-jit-create-preaccess

Conversation

@0xalpharush

Copy link
Copy Markdown
Contributor

Summary

  • Perform Amsterdam CREATE balance and nonce checks before child message construction.
  • Avoid inspector create hooks when CREATE fails preaccess checks.
  • Charge CREATE state gas conditionally after destination inspection.
  • Apply the same ordering in the JIT builtin.

Impact

The interpreter could expose spurious failed CREATE frames, while the JIT could exceptionally halt transactions that should push zero and continue. The JIT case affects execution, fees, and balances.

Testing

  • amsterdam_create_out_of_funds_does_not_fire_create_hook
  • compiled_amsterdam_create_checks_balance_before_state_gas
  • Focused interpreter and JIT tests
  • Warnings-denied evm2 and JIT Clippy
  • Both saved Amsterdam CREATE artifacts replay cleanly

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