ethereum / ethereum/execution-specs

fix(tests): Fix hard-coded references to gas_costs.CALL_STIPEND

Open
#3,139 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.2k
Forks
505
Avg merge
2d 14h
Merged PRs (30d)
116

Description

https://github.com/ethereum/execution-specs/blob/78daabca4739dce907a67689032273484d695b0a/tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_call.py#L1514

Have not given this one much of a thought but many tests when trying to estimate the gas that is going to be used by certain bytecode have to manually subtract the `gas_costs.CALL_STIPEND` from the calculation.

This should not be necessary, nor a common practice.

Possible solution: Missing metadata information in the `*CALL` opcodes that should help this value to be subtracted automatically from the final tally.

Contributor guide

Open the contributing guide

Research direction

Start with tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_call.py at the referenced line, then search the test suite for manual gas_costs.CALL_STIPEND subtraction. Read the metadata for the *CALL opcodes and the affected gas-estimation tests; done means these tests no longer need hard-coded stipend adjustments while their gas expectations remain correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.