Commit 484ebb6
feat(tests): Support for EIP-7928 - Block-Level Access Lists (#2067)
* 🚧 wip(EIP-7928): Block-level Access Lists
* ✨ feat(EIP-7928): Spec params
* 🧹 chore(EIP-7928): Rename package
* ✨ feat(EIP-7928): Test cases
* ✨ feat(EIP-7928): Add BAL header
* 🧹 chore(EIP-7928): bal_hash header
* 🧹 chore: Populate bal_hash env
* ✨ feat(EIP-7928): Add BAL to block body
* ✨ feat(EIP-7928): Add pokebal package
* ✨ feat: update env
* 🚧 wip: Checklist and basic tests
* 🧹 chore: scope
* Add more sophisticated test cases (#2029)
Co-authored-by: raxhvl <[email protected]>
* WIP: Attempt to get EEST + EELS bals PRs talking to each other
* refactor(bal): Use full bal in t8n; verify and build fixtures
- Use the full bal object in the t8n. We can use this to model_validate()
into our pydantic model.
- Also, pass the bal_hash via t8n so that once we do build the BAL, validate
the explicitly defined values, rlp encode it, then hash it, we can compare
the full BAL against the hash and make sure that even though we only validated
the part that was important for our test, the full BAL is also always valid.
Bonus:
- Added a new type for ``StorageKey`` because these were not being rlp encoded
properly without the left padding. This was tricky to find and I think this
can be a common issue. New type here seemed appropriate.
* chore(lint): Fix lint issues, assign method to Frontier to be overridden
* fix(tests,lint): Set up code changes test case; fix remaining lint issues
* refactor(forks): move BAL tests to Amsterdam
- chore(cleanup): Remove reference to told BlockAccessLists fork
- refactor(fork): ``Amsterdam`` above old EOF fork.
* chore: Fix CI lint issues not present locally
- Update some docstrings to remove AI excessive verbosity and add
CodeChanges case to example.
* refactor(bal): Apply comments from first pass at PR
- Use ``Number`` instead of ``int`` where appropriate
- Use ``default_factory=list`` without ``Optional`` and ``None`` where
appropriate
* refactor(bal): Split BAL into two classes
- Use a root model class for the t8n BAL model. This lets us stick
closer to the EIP definition where the BAL itself is a list.
- The class doesn't need to be `RLPSerializable`, just have
simple instructions to serialize its elements (`rlp()`).
- Create a `BlockAccessListExpectation` class to represent the
expected BAL for a given block. This class can describe different
expectations for the test cases, such as defining mutations to
be used for invalid tests.
* refactor(tests): Rename checklist.md -> test_cases.md for BAL test case tracking
* feat(tests,tools): [WIP] initial invalid BAL tests
* chore(spec-resolver): Update commit hash to point to for spec resolver
* fix(lint,resolver): Use latest commit in resolver; fix lint
* Address comments from PR #2067
* chore(docs): Add changelog entries for BAL updates
* refactor(types): Refactor BAL checks for explicit exclusion of acct changes
- From comments on PR #2067, we should allow for an explicit exclusion case
for an entire set of account changes. If a test case warrants a sanity check
that some account might have been impacted but shouldn't be accounted for,
we should be able to specify that explicitly.
* fix(bal): Fix explicit empty checks for account changes; add unit tests
* feat(bal): Extend BAL support within framework
- Add BAL to engine execution payload as defined in:
https://github.com/ethereum/consensus-specs/pull/4526/files#diff-4b950f0c895b4d521c9e8103d638e73a4c7746c6aea51250994425a1efd6f4c8R55
- Add BAL support for state tests to be able to create blockchain tests
* fix(warnings): Silence warning for unused reference in .md file
* fix(bal): Move state test expected bal to Block
* feat(release): Set up BAL work for a feature release
* fix: BAL as object in fixture block so RLP is correct
* chore(pytest): Add Amsterdam to ruleset for simulator plugin
---------
Co-authored-by: raxhvl <[email protected]>
Co-authored-by: Toni Wahrstätter <[email protected]>
Co-authored-by: raxhvl <[email protected]>1 parent 6331511 commit 484ebb6
File tree
26 files changed
+2377
-242
lines changed- .github/configs
- docs
- running_tests/test_formats
- src
- ethereum_clis
- ethereum_test_base_types
- ethereum_test_fixtures
- ethereum_test_forks
- forks
- ethereum_test_specs
- ethereum_test_tools
- ethereum_test_types
- block_access_list
- tests
- pytest_plugins
- consume/simulators/helpers
- tests/amsterdam/eip7928_block_level_access_lists
26 files changed
+2377
-242
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
51 | 56 | | |
52 | 57 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
| |||
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
157 | | - | |
| 158 | + | |
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
| 164 | + | |
163 | 165 | | |
164 | 166 | | |
165 | 167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
16 | 22 | | |
17 | 23 | | |
18 | 24 | | |
| |||
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
| 66 | + | |
| 67 | + | |
60 | 68 | | |
61 | 69 | | |
62 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
386 | 400 | | |
387 | 401 | | |
388 | 402 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
168 | 172 | | |
169 | 173 | | |
170 | 174 | | |
| |||
231 | 235 | | |
232 | 236 | | |
233 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
234 | 241 | | |
235 | 242 | | |
236 | 243 | | |
| |||
262 | 269 | | |
263 | 270 | | |
264 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
265 | 276 | | |
266 | 277 | | |
267 | 278 | | |
268 | 279 | | |
269 | 280 | | |
270 | 281 | | |
| 282 | + | |
271 | 283 | | |
272 | 284 | | |
273 | 285 | | |
274 | | - | |
| 286 | + | |
275 | 287 | | |
276 | 288 | | |
277 | 289 | | |
278 | 290 | | |
279 | 291 | | |
| 292 | + | |
280 | 293 | | |
281 | 294 | | |
282 | 295 | | |
| |||
331 | 344 | | |
332 | 345 | | |
333 | 346 | | |
| 347 | + | |
334 | 348 | | |
335 | 349 | | |
336 | 350 | | |
| |||
344 | 358 | | |
345 | 359 | | |
346 | 360 | | |
| 361 | + | |
347 | 362 | | |
348 | 363 | | |
349 | 364 | | |
| |||
428 | 443 | | |
429 | 444 | | |
430 | 445 | | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
431 | 449 | | |
432 | 450 | | |
433 | 451 | | |
| |||
446 | 464 | | |
447 | 465 | | |
448 | 466 | | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
449 | 470 | | |
450 | 471 | | |
451 | 472 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
272 | 278 | | |
273 | 279 | | |
274 | 280 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
318 | 323 | | |
319 | 324 | | |
320 | 325 | | |
| |||
1808 | 1813 | | |
1809 | 1814 | | |
1810 | 1815 | | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
1811 | 1830 | | |
1812 | 1831 | | |
1813 | 1832 | | |
| |||
1837 | 1856 | | |
1838 | 1857 | | |
1839 | 1858 | | |
1840 | | - | |
1841 | | - | |
1842 | | - | |
1843 | | - | |
1844 | | - | |
1845 | | - | |
1846 | | - | |
1847 | | - | |
1848 | | - | |
| |||
0 commit comments