Skip to content

chore(tests): Remove hard-coded gas limits from system contract tests - #3457

Open
zexoverz wants to merge 2 commits into
ethereum:forks/amsterdamfrom
zexoverz:fix/3071-unhardcode-system-contract-gas
Open

chore(tests): Remove hard-coded gas limits from system contract tests#3457
zexoverz wants to merge 2 commits into
ethereum:forks/amsterdamfrom
zexoverz:fix/3071-unhardcode-system-contract-gas

Conversation

@zexoverz

Copy link
Copy Markdown

Description

Backport of the runtime gas measurement @marioevz described in the issue: the relay contract warms the predeploy, measures a call with GAS on both sides, subtracts a zero-gas probe of the same call, and forwards that minus one to the request it wants starved. SystemContractInteractionMeasuredOutOfGasContract already exists from EIP-8282, so this is only a rewrite of the parametrization.

The two EOA-transaction cases are the ones that carried the trace values, and there is no way to measure a transaction-level gas limit at runtime, so they become a single relay-contract case per file. First-position and last-position starvation are still covered by the existing coarse cases below them. Fixture drift for the untouched cases is limited to the _info docstring and line anchor.

Related Issues or PRs

Fixes #3071.

Checklist

  • Ran fast static checks to avoid CI fails, see Code Standards & Verifying Changes: just static
  • PR title has the form <type>(<area>): <title>, where <type> and <area> come from an appropriate C-<type>, respectively A-<area>, label. The title should match the target squash commit message.

Cute Animal Picture

Backport the runtime gas measurement from the EIP-8282 out-of-gas tests to
the EIP-7002 and EIP-7251 ones, so the boundary no longer depends on values
read off a trace.

Claude-Session: https://claude.ai/code/session_01CWCwisL95EQwmp51L72uQ7
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.

chore(tests): Remove hard-coded gas limits from system contract tests

1 participant