Skip to content

Commit

Permalink
bug(fw): fix block header gasLimit value in post genesis blocks for…
Browse files Browse the repository at this point in the history
… 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 <spencer@spencertaylorbrown.uk>
  • Loading branch information
danceratopz and spencer-tb committed Mar 9, 2024
1 parent c8e0caa commit c006517
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Test fixtures for use by clients are available for each release on the [Github r
- 🐞 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)).
- ✨ 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)).
- ✨ 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)).
- 🐞 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)).

### 🔧 EVM Tools

Expand Down
4 changes: 1 addition & 3 deletions src/ethereum_test_tools/spec/blockchain/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,9 +548,7 @@ def set_environment(self, env: Environment) -> Environment:
new_env.coinbase = (
self.coinbase if self.coinbase is not None else environment_default.coinbase
)
new_env.gas_limit = (
self.gas_limit if self.gas_limit is not None else environment_default.gas_limit
)
new_env.gas_limit = self.gas_limit or env.parent_gas_limit or environment_default.gas_limit
if not isinstance(self.base_fee, Removable):
new_env.base_fee = self.base_fee
new_env.withdrawals = self.withdrawals
Expand Down

0 comments on commit c006517

Please sign in to comment.