Skip to content

Commit 4c8c279

Browse files
committed
Add some more hardcoded
1 parent 34d6999 commit 4c8c279

6 files changed

Lines changed: 58 additions & 13 deletions

scripts/filler_to_python/analyzer.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,17 @@ class NoIntResolver(_yaml.SafeLoader): # type: ignore[no-redef]
141141
# OUTPUT_DIFFERS — remaining 2 (Categories F, H)
142142
"stEIP3651_warmcoinbase/test_coinbase_warm_account_call_gas.py",
143143
"stWalletTest/test_multi_owned_is_owner_true.py",
144-
# STRUCTURAL (2) — CREATE collision behaviour
144+
# STRUCTURAL — CREATE collision / EIP-3607 rejection behaviour.
145+
# With dynamic addresses the collision doesn't happen, so the tx
146+
# runs instead of being rejected → traces appear where baseline
147+
# had none.
145148
"stCreateTest/test_transaction_collision_to_empty_but_code.py",
149+
"stCreateTest/test_transaction_collision_to_empty_but_nonce.py",
146150
"stEIP3607/test_init_colliding_with_non_empty_account.py",
151+
"stEIP3607/test_transaction_colliding_with_non_empty_account_calls.py",
152+
"stEIP3607/test_transaction_colliding_with_non_empty_account_calls_itself.py",
153+
"stEIP3607/test_transaction_colliding_with_non_empty_account_init_paris.py",
154+
"stEIP3607/test_transaction_colliding_with_non_empty_account_send_paris.py",
147155
}
148156

149157

tests/ported_static/stCreateTest/test_transaction_collision_to_empty_but_nonce.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import pytest
99
from execution_testing import (
10+
EOA,
1011
Account,
1112
Address,
1213
Alloc,
@@ -67,7 +68,10 @@ def test_transaction_collision_to_empty_but_nonce(
6768
) -> None:
6869
"""Test_transaction_collision_to_empty_but_nonce."""
6970
coinbase = Address(0x2ADC25665018AA1FE0E6BC666DAC8FC2697FF9BA)
70-
sender = pre.fund_eoa(amount=0xE8D4A51000)
71+
contract_0 = Address(0x6295EE1B4F6DD65047762F924ECD367C17EABF8F)
72+
sender = EOA(
73+
key=0x45A915E4D060149EB4365960E6A7A45F334393093061116B197E3240065FF2D8
74+
)
7175

7276
env = Environment(
7377
fee_recipient=coinbase,
@@ -78,7 +82,8 @@ def test_transaction_collision_to_empty_but_nonce(
7882
gas_limit=10000000,
7983
)
8084

81-
contract_0 = pre.fund_eoa(amount=0)
85+
pre[sender] = Account(balance=0xE8D4A51000)
86+
pre[contract_0] = Account(balance=0, nonce=1)
8287

8388
tx_data = [
8489
Op.SSTORE(key=0x1, value=0x1),

tests/ported_static/stEIP3607/test_transaction_colliding_with_non_empty_account_calls.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
import pytest
99
from execution_testing import (
10+
EOA,
11+
Account,
1012
Address,
1113
Alloc,
1214
Bytes,
@@ -35,7 +37,9 @@ def test_transaction_colliding_with_non_empty_account_calls(
3537
) -> None:
3638
"""Account with non-empty code attempts to send tx to call a contract."""
3739
coinbase = Address(0xEB201D2887816E041F6E807E804F64F3A7A226FE)
38-
sender = pre.fund_eoa(amount=0xDE0B6B3A7640000)
40+
sender = EOA(
41+
key=0x402790500EA083A617EC567407D9EC3BBB3A5C8B812547D9F66E8D7878B8A75D
42+
)
3943

4044
env = Environment(
4145
fee_recipient=coinbase,
@@ -46,12 +50,16 @@ def test_transaction_colliding_with_non_empty_account_calls(
4650
gas_limit=71794957647893862,
4751
)
4852

49-
coinbase = pre.fund_eoa(amount=0)
53+
pre[coinbase] = Account(balance=0, nonce=1)
54+
pre[sender] = Account(
55+
balance=0xDE0B6B3A7640000, code=Op.SSTORE(key=0x1, value=0x0)
56+
)
5057
# Source: raw
5158
# 0x6000600155
5259
target = pre.deploy_contract( # noqa: F841
5360
code=Op.SSTORE(key=0x1, value=0x0),
5461
nonce=0,
62+
address=Address(0xD857DAD5866E190FD86B79F027FB8EE8E60FBDA7), # noqa: E501
5563
)
5664

5765
tx = Transaction(

tests/ported_static/stEIP3607/test_transaction_colliding_with_non_empty_account_calls_itself.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
import pytest
99
from execution_testing import (
10+
EOA,
11+
Account,
1012
Address,
1113
Alloc,
1214
Bytes,
@@ -15,6 +17,7 @@
1517
Transaction,
1618
TransactionException,
1719
)
20+
from execution_testing.vm import Op
1821

1922
REFERENCE_SPEC_GIT_PATH = "N/A"
2023
REFERENCE_SPEC_VERSION = "N/A"
@@ -34,7 +37,9 @@ def test_transaction_colliding_with_non_empty_account_calls_itself(
3437
) -> None:
3538
"""Account with non-empty code attempts to send tx to call itself."""
3639
coinbase = Address(0xEB201D2887816E041F6E807E804F64F3A7A226FE)
37-
sender = pre.fund_eoa(amount=0xDE0B6B3A7640000)
40+
sender = EOA(
41+
key=0x402790500EA083A617EC567407D9EC3BBB3A5C8B812547D9F66E8D7878B8A75D
42+
)
3843

3944
env = Environment(
4045
fee_recipient=coinbase,
@@ -45,7 +50,10 @@ def test_transaction_colliding_with_non_empty_account_calls_itself(
4550
gas_limit=71794957647893862,
4651
)
4752

48-
coinbase = pre.fund_eoa(amount=0)
53+
pre[coinbase] = Account(balance=0, nonce=1)
54+
pre[sender] = Account(
55+
balance=0xDE0B6B3A7640000, code=Op.SSTORE(key=0x1, value=0x0)
56+
)
4957

5058
tx = Transaction(
5159
sender=sender,

tests/ported_static/stEIP3607/test_transaction_colliding_with_non_empty_account_init_paris.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
import pytest
99
from execution_testing import (
10+
EOA,
11+
Account,
1012
Address,
1113
Alloc,
1214
Environment,
@@ -74,7 +76,10 @@ def test_transaction_colliding_with_non_empty_account_init_paris(
7476
) -> None:
7577
"""Account with non-empty code attempts to send tx to create a contract."""
7678
coinbase = Address(0xEB201D2887816E041F6E807E804F64F3A7A226FE)
77-
sender = pre.fund_eoa(amount=0xDE0B6B3A7640000)
79+
addr = Address(0x76FAE819612A29489A1A43208613D8F8557B8898)
80+
sender = EOA(
81+
key=0x3696BFBDBC65B14F4DC76D7762E0567E1DD55F053314276E47969D22E70A554E
82+
)
7883

7984
env = Environment(
8085
fee_recipient=coinbase,
@@ -85,14 +90,16 @@ def test_transaction_colliding_with_non_empty_account_init_paris(
8590
gas_limit=71794957647893862,
8691
)
8792

88-
coinbase = pre.fund_eoa(amount=0)
89-
addr = pre.fund_eoa(amount=10)
93+
pre[coinbase] = Account(balance=0, nonce=1)
94+
pre[sender] = Account(balance=0xDE0B6B3A7640000, code=Op.STOP)
95+
pre[addr] = Account(balance=10)
9096
# Source: raw
9197
# 0x00
9298
addr_2 = pre.deploy_contract( # noqa: F841
9399
code=Op.STOP,
94100
balance=10,
95101
nonce=0,
102+
address=Address(0xCC7C3C64708397216F5F8AEB34A43F1749693FA9), # noqa: E501
96103
)
97104

98105
expect_entries_: list[dict] = [

tests/ported_static/stEIP3607/test_transaction_colliding_with_non_empty_account_send_paris.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
import pytest
99
from execution_testing import (
10+
EOA,
11+
Account,
1012
Address,
1113
Alloc,
1214
Bytes,
@@ -15,6 +17,7 @@
1517
Transaction,
1618
TransactionException,
1719
)
20+
from execution_testing.vm import Op
1821

1922
REFERENCE_SPEC_GIT_PATH = "N/A"
2023
REFERENCE_SPEC_VERSION = "N/A"
@@ -34,7 +37,10 @@ def test_transaction_colliding_with_non_empty_account_send_paris(
3437
) -> None:
3538
"""Account with non-empty code attempts to send tx to another account..."""
3639
coinbase = Address(0xEB201D2887816E041F6E807E804F64F3A7A226FE)
37-
sender = pre.fund_eoa(amount=0xDE0B6B3A7640000)
40+
addr = Address(0x76FAE819612A29489A1A43208613D8F8557B8898)
41+
sender = EOA(
42+
key=0x402790500EA083A617EC567407D9EC3BBB3A5C8B812547D9F66E8D7878B8A75D
43+
)
3844

3945
env = Environment(
4046
fee_recipient=coinbase,
@@ -45,8 +51,11 @@ def test_transaction_colliding_with_non_empty_account_send_paris(
4551
gas_limit=71794957647893862,
4652
)
4753

48-
coinbase = pre.fund_eoa(amount=0)
49-
addr = pre.fund_eoa(amount=10)
54+
pre[coinbase] = Account(balance=0, nonce=1)
55+
pre[sender] = Account(
56+
balance=0xDE0B6B3A7640000, code=Op.SSTORE(key=0x1, value=0x0)
57+
)
58+
pre[addr] = Account(balance=10)
5059

5160
tx = Transaction(
5261
sender=sender,

0 commit comments

Comments
 (0)