12
12
@pytest .mark .parametrize (
13
13
"storage_slot_write" ,
14
14
[
15
+ None ,
15
16
0 ,
16
17
1 ,
17
18
300 ,
18
19
301 ,
19
20
],
20
21
ids = [
22
+ "No storage slot modified" ,
21
23
"Stale storage slot in the header" ,
22
24
"New storage slot in the account header" ,
23
25
"Stale storage slot outside the header" ,
26
28
)
27
29
@pytest .mark .parametrize (
28
30
"stale_basic_data" ,
29
- [True , False ],
31
+ [True ],
30
32
)
31
- def test_stale_contract_writes (
33
+ def test_modified_contract (
32
34
blockchain_test : BlockchainTestFiller ,
33
35
storage_slot_write : int ,
34
36
stale_basic_data : bool ,
@@ -53,7 +55,7 @@ def test_stale_contract_writes(
53
55
pre_state [target_account ] = Account (
54
56
balance = 1_000 ,
55
57
nonce = 0 ,
56
- code = Op .SSTORE (storage_slot_write , 9999 ),
58
+ code = Op .SSTORE (storage_slot_write , 9999 ) if storage_slot_write is not None else [] ,
57
59
storage = {
58
60
0 : 100 ,
59
61
300 : 200 ,
@@ -70,64 +72,3 @@ def test_stale_contract_writes(
70
72
)
71
73
72
74
_state_conversion (blockchain_test , pre_state , stride , 1 , [ConversionTx (tx , 0 )])
73
-
74
-
75
- # @pytest.mark.valid_from("EIP6800Transition")
76
- # @pytest.mark.parametrize(
77
- # "num_storage_slots, num_stale_storage_slots",
78
- # [
79
- # (0, 0),
80
- # (4, 0),
81
- # (4, 2),
82
- # (stride, stride),
83
- # ],
84
- # ids=[
85
- # "EOA",
86
- # "Contract without stale storage",
87
- # "Contract with some stale storage",
88
- # "Contract with all stale storage",
89
- # ],
90
- # )
91
- # @pytest.mark.parametrize(
92
- # "stale_basic_data",
93
- # [True, False],
94
- # )
95
- # @pytest.mark.parametrize(
96
- # "fill_first_block",
97
- # [True, False],
98
- # )
99
- # @pytest.mark.parametrize(
100
- # "fill_last_block",
101
- # [True, False],
102
- # )
103
- # def test_stale_keys(
104
- # blockchain_test: BlockchainTestFiller,
105
- # account_configs: list[AccountConfig],
106
- # fill_first_block: bool,
107
- # fill_last_block: bool,
108
- # ):
109
- # """
110
- # Test account conversion with full/partial stale storage slots and basic data.
111
- # """
112
- # _generic_conversion(blockchain_test, account_configs, fill_first_block, fill_last_block)
113
-
114
-
115
- # @pytest.mark.valid_from("EIP6800Transition")
116
- # @pytest.mark.parametrize(
117
- # "fill_first_block",
118
- # [True, False],
119
- # )
120
- # @pytest.mark.parametrize(
121
- # "fill_last_block",
122
- # [True, False],
123
- # )
124
- # def test_stride_stale_eoas(
125
- # blockchain_test: BlockchainTestFiller,
126
- # account_configs: list[AccountConfig],
127
- # fill_first_block: bool,
128
- # fill_last_block: bool,
129
- # ):
130
- # """
131
- # Test converting a stride number of stale EOAs.
132
- # """
133
- # _generic_conversion(blockchain_test, account_configs, fill_first_block, fill_last_block)
0 commit comments