Skip to content

Commit 286c026

Browse files
authored
fix(consume): fix loading of multi-index, mixed tx type fixtures (#1330)
* fix(consume): fix loading of multi-index mixed tx type fixtures Test fixtures from ethereum/{tests,legacyTests} can be parametrized by data, gas and value index. In this case, the tx type can be either be an access list type transaction (`0x1`), or not (`0x0`). For the latter, the entry in the transaction `accessList` field is set to `null` (an empty list can also be specified, but then this is a `0x1` type tx). This change handles this case. * docs: update changelog * docs: update pr link in changelog
1 parent 2c07538 commit 286c026

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ consume cache --help
3232
- ✨ Allow filtering of test cases by fixture format via pytest marks (e.g., `-m blockchain_test`) ([#1314](https://github.com/ethereum/execution-spec-tests/pull/1314)).
3333
- ✨ Add top-level entries `forks` and `fixture_formats` to the index file that list all the forks and fixture formats used in the indexed fixtures ([#1318](https://github.com/ethereum/execution-spec-tests/pull/1318)).
3434
- 🐞 Don't parametrize tests for unsupported fixture formats; improve `consume` test collection ([#1315](https://github.com/ethereum/execution-spec-tests/pull/1314)).
35-
- 🐞 Improve index generation of ethereum/tests fixtures: Allow generation at any directory level and include `generatedTestHash` in the index file for the `fixture_hash` ([#1303](https://github.com/ethereum/execution-spec-tests/pull/1303)).
35+
- 🐞 Improve index generation of [ethereum/tests](https://github.com/ethereum/tests) fixtures: Allow generation at any directory level and include `generatedTestHash` in the index file for the `fixture_hash` ([#1303](https://github.com/ethereum/execution-spec-tests/pull/1303)).
36+
- 🐞 Fix loading of [ethereum/tests](https://github.com/ethereum/tests) and [ethereum/legacytests](https://github.com/ethereum/legacytests) fixtures for the case of mixed `0x0` and `0x1` transaction types in multi-index (`data`, `gas`, `value`) state test fixtures ([#1330](https://github.com/ethereum/execution-spec-tests/pull/1330)).
3637

3738
#### `fill`
3839

src/ethereum_test_fixtures/state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class FixtureTransaction(TransactionFixtureConverter):
4141
to: Address | None = None
4242
value: List[ZeroPaddedHexNumber]
4343
data: List[Bytes]
44-
access_lists: List[List[AccessList]] | None = None
44+
access_lists: List[List[AccessList] | None] | None = None
4545
authorization_list: List[FixtureAuthorizationTuple] | None = None
4646
max_fee_per_blob_gas: ZeroPaddedHexNumber | None = None
4747
blob_versioned_hashes: Sequence[Hash] | None = None

0 commit comments

Comments
 (0)