Skip to content

Commit c006517

Browse files
bug(fw): fix block header gasLimit value in post genesis blocks for blockchain tests (#472)
* fix: use parent env's gas limit in current env #468 * fix(fw): update to include self gas limit. * chore: add changelog. --------- Co-authored-by: spencer-tb <[email protected]>
1 parent c8e0caa commit c006517

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Test fixtures for use by clients are available for each release on the [Github r
2323
- 🐞 Fix bug that causes an exception during test collection because the fork parameter contains `None` ([#452](https://github.com/ethereum/execution-spec-tests/pull/452)).
2424
- ✨ The `_info` field in the test fixtures now contains a `hash` field, which is the hash of the test fixture, and a `hasher` script has been added which prints and performs calculations on top of the hashes of all fixtures (see `hasher -h`) ([#454](https://github.com/ethereum/execution-spec-tests/pull/454)).
2525
- ✨ Adds an optional `verify_sync` field to hive blockchain tests (EngineAPI). When set to true a second client attempts to sync to the first client that executed the tests.([#431](https://github.com/ethereum/execution-spec-tests/pull/431)).
26+
- 🐞 Fix manually setting the gas limit in the genesis test env for post genesis blocks in blockchain tests. ([#472](https://github.com/ethereum/execution-spec-tests/pull/472)).
2627

2728
### 🔧 EVM Tools
2829

src/ethereum_test_tools/spec/blockchain/types.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -548,9 +548,7 @@ def set_environment(self, env: Environment) -> Environment:
548548
new_env.coinbase = (
549549
self.coinbase if self.coinbase is not None else environment_default.coinbase
550550
)
551-
new_env.gas_limit = (
552-
self.gas_limit if self.gas_limit is not None else environment_default.gas_limit
553-
)
551+
new_env.gas_limit = self.gas_limit or env.parent_gas_limit or environment_default.gas_limit
554552
if not isinstance(self.base_fee, Removable):
555553
new_env.base_fee = self.base_fee
556554
new_env.withdrawals = self.withdrawals

0 commit comments

Comments
 (0)