Commit 562fde1
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 #21381 parent e9cc16d commit 562fde1
File tree
4 files changed
+580
-109
lines changed- docs
- src/ethereum_test_types
- block_access_list
- tests
4 files changed
+580
-109
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
0 commit comments