Repository navigation
Commit a5edb7e
authored
Zero the EIP-6780 entry contract's returned byte in EEST (#4471)
Three EIP-6780 tests in EEST's `test_selfdestruct.py`
(`test_recursive_contract_creation_and_selfdestruct`,
`test_parent_creates_child_selfdestruct_one` and
`test_create_and_destroy_multiple_contracts_same_tx`) end their entry
contract with `Op.RETURN(32, 1)`, meant to deploy a single zero byte.
That memory byte is not zero: these entry contracts `EXTCODECOPY`
initcode to offset 0, and that initcode embeds the addresses of
contracts deployed earlier. Upstream fills with fixed addresses, but on
our devnet they depend on live nonces, so roughly one run in 256 per
vector that byte is `0xEF` and EIP-3541 rejects the deployment. The tx
then fails with all gas used and the expected storage never lands. In
the 10-05 failure the rebuilt initcode has `0xef` at byte 32, from the
embedded address `0xa4d0c0974fef…`.
The compatibility patch now writes `MSTORE8(32, 0)` before each of those
returns, and before the same return in `test_selfdestruct_pre_existing`
and `test_selfdestruct_created_same_block_different_tx`, which never
write memory today and are patched only so a future EEST bump can't
reintroduce it, so the deployed byte is always zero as upstream
intended. None of these tests checks the entry contract's code, so
expected post-state is unchanged; `fill` against the patched tests still
passes all 170 affected vectors. The README's compatibility patch policy
lists the new hunk.
Flaked in:
https://github.com/sei-protocol/sei-chain/actions/runs/37383269055/job/112013686385
https://github.com/sei-protocol/sei-chain/actions/runs/36018465389/job/107699232433
https://github.com/sei-protocol/sei-chain/actions/runs/35840429705/job/107115658633
https://github.com/sei-protocol/sei-chain/actions/runs/35789756861/job/106956775871
https://github.com/sei-protocol/sei-chain/actions/runs/35222729730/job/1052083519691 parent bf6c14f commit a5edb7e
2 files changed
Lines changed: 52 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
402 | 451 | | |
403 | 452 | | |
404 | 453 | | |
| |||
0 commit comments