fix(tests): EIP-7825: Pre-Osaka tests consuming tx gas above cap #1928
+369
−146
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🗒️ Description
Fixes all pre-Osaka python tests (outside of
tests/cancun/eip4844_blobs
which require further fixes) to use less gas than the new gas-limit-cap introduced by EIP-7825.- tests/cancun/eip6780_selfdestruct/test_selfdestruct_revert.py
Reduced gas limit from 20 million to 500k (test was overusing gas).
- tests/istanbul/eip152_blake2/test_blake2.py
Test was using
Environment().gas_limit
to exhaust the block gas limit.A new benchmark test must be developed to exhaust the gas limit with multiple txs (see #1927).
- tests/istanbul/eip1344_chainid/test_chainid.py
Reduced gas limit from 1 gigagas to 100k (test was overusing gas).
- tests/prague/eip6110_deposits/test_deposits.py
Deposit at deepest call depth possible, reduced the number of recursive calls to fit in a single tx.
- tests/prague/eip7002_el_triggerable_withdrawals/test_withdrawal_requests.py
Withdrawal at deepest call depth possible, reduced the number of recursive calls to fit in a single tx.
- tests/prague/eip7702_set_code_tx/test_gas.py
Single tx using as many authorizations as possible. Added track issue to add a new benchmark test (see #1927).
- tests/prague/eip7702_set_code_tx/test_set_code_txs.py
Recursive call into an authorized delegated account, the depth is now reduced due to the tx max gas limit.
- tests/prague/eip2537_bls_12_381_precompiles/test_bls12_pairing.py
Simple reduction of max gas that can be consumed for a test that pushes many times infinity to the pairing pre-compile.
- tests/prague/eip2537_bls_12_381_precompiles/test_bls12_variable_length_input_contracts.py
This is major rework on how the tests that cover the full precompile discount tables (G1 MSM, G2 MSM, and pairing).
We now use
parametrize_by_fork
to read the transaction gas limit cap and decide whether to split the discount table into multiple tests or a single one, and how many elements of the table per iteration it should test.🔗 Related Issues or PRs
N/A.
✅ Checklist
tox
checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:uvx --with=tox-uv tox -e lint,typecheck,spellcheck,markdownlint
type(scope):
.