Skip to content

Commit 562fde1

Browse files
authored
feat(tests): Enforce EIP-7928 ordering rules (#2138)
* fix(tests): Validate order for BAL coming from t8n The specs are currently correctly written, but we were not validating all of the ordering according to EIP-7928: - Addresses: lexicographic (bytewise). - Storage keys: lexicographic within each account. - Block access indices: ascending within each change list. This change validates the order of the BAL before we even begin to compare against our expectation. We also now validate that the expectations we define are subsequences within the BAL (expected order). - refactor: Explicit check for the fields we care about up front for `model_fields_set` - refactor: awkward comparison method should just be a validation method (_validate_change_lists) * chore: Unit test BAL ordering validation checks * chore: Add note to CHANGELOG * fix: ``Number`` -> ``HexNumber`` for BAL types - This becomes an issue when JSON-serializing the BAL object and then re-filling from the fixture. We should use `HexNumber` for any Number fields as this correctly serializes to JSON as hex representation. * chore: move release note up to unreleased * refactor: apply changes from comments on PR #2138
1 parent e9cc16d commit 562fde1

File tree

4 files changed

+580
-109
lines changed

4 files changed

+580
-109
lines changed

docs/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Test fixtures for use by clients are available for each release on the [Github r
1919

2020
### 📋 Misc
2121

22+
- ✨ Add tighter validation for EIP-7928 model coming from t8n when filling ([#2138](https://github.com/ethereum/execution-spec-tests/pull/2138)).
23+
2224
### 🧪 Test Cases
2325

2426
## [v5.0.0](https://github.com/ethereum/execution-spec-tests/releases/tag/v5.0.0) - 2025-09-05

0 commit comments

Comments
 (0)