Skip to content

feat(tests): EIP-8037 CREATE-tx collision refunds state-gas reservoir#2875

Open
chfast wants to merge 1 commit into
ethereum:devnets/bal/7from
chfast:feat/eip-8037-create-tx-collision-high-gas
Open

feat(tests): EIP-8037 CREATE-tx collision refunds state-gas reservoir#2875
chfast wants to merge 1 commit into
ethereum:devnets/bal/7from
chfast:feat/eip-8037-create-tx-collision-high-gas

Conversation

@chfast
Copy link
Copy Markdown
Member

@chfast chfast commented May 19, 2026

🗒️ Description

Add test_create_tx_collision_refunds_reservoir: a depth-0 CREATE-tx with gas_limit > TX_MAX_GAS_LIMIT that collides at the deterministic CREATE address. The existing collision test uses gas_limit near the intrinsic, so the state-gas reservoir is empty and the reservoir-preservation path is untested.

Block-level gas_used is the same under both buggy and correct behaviors; the sender's post-balance is the discriminator. A buggy implementation that drops the reservoir on collision overcharges the sender by reservoir * gas_price.

🔗 Related Issues or PRs

N/A.

✅ Checklist

  • All: Ran fast static checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    just static
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.
  • Tests: For PRs implementing a missed test case, update the post-mortem document to add an entry the list.
  • Ported Tests: All converted JSON/YML tests from ethereum/tests or tests/static have been assigned @ported_from marker.

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

Add `test_create_tx_collision_refunds_reservoir`: a depth-0 CREATE-tx
with `gas_limit > TX_MAX_GAS_LIMIT` that collides at the deterministic
CREATE address. The existing collision test uses `gas_limit` near the
intrinsic, so the state-gas reservoir is empty and the
reservoir-preservation path is untested.

Block-level `gas_used` is the same under both buggy and correct
behaviors; the sender's post-balance is the discriminator. A buggy
implementation that drops the reservoir on collision overcharges the
sender by `reservoir * gas_price`.
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