15
15
Block ,
16
16
BlockchainTestFiller ,
17
17
Transaction ,
18
- TransactionReceipt ,
19
18
While ,
20
19
)
21
20
from ethereum_test_vm import Bytecode
@@ -164,11 +163,6 @@ def test_bloatnet_balance_extcodesize(
164
163
to = attack_address ,
165
164
gas_limit = gas_benchmark_value ,
166
165
sender = pre .fund_eoa (),
167
- # Validate that all gas is consumed (benchmark runs to exhaustion)
168
- # If STATICCALL fails, only ~50K gas used -> test fails
169
- expected_receipt = TransactionReceipt (
170
- gas_used = gas_benchmark_value , # Must consume all gas
171
- ),
172
166
)
173
167
174
168
# Post-state: just verify attack contract exists
@@ -180,7 +174,6 @@ def test_bloatnet_balance_extcodesize(
180
174
pre = pre ,
181
175
blocks = [Block (txs = [attack_tx ])],
182
176
post = post ,
183
- skip_gas_used_validation = True ,
184
177
)
185
178
186
179
@@ -287,8 +280,7 @@ def test_bloatnet_balance_extcodecopy(
287
280
+ Op .PUSH1 (1 ) # size (1 byte)
288
281
+ Op .PUSH2 (max_contract_size - 1 ) # code offset (last byte)
289
282
# Use salt as memory offset to avoid overlap
290
- + Op .MLOAD (32 ) # Get current salt from position 32
291
- + Op .ADD (96 ) # Add base memory offset for unique position
283
+ + Op .ADD (Op .MLOAD (32 ), 96 ) # Add base memory offset for unique position
292
284
+ Op .DUP4 # address (duplicated earlier)
293
285
+ Op .EXTCODECOPY
294
286
+ Op .POP # Clean up address
@@ -309,11 +301,6 @@ def test_bloatnet_balance_extcodecopy(
309
301
to = attack_address ,
310
302
gas_limit = gas_benchmark_value ,
311
303
sender = pre .fund_eoa (),
312
- # Validate that all gas is consumed (benchmark runs to exhaustion)
313
- # If STATICCALL fails, only ~50K gas used -> test fails
314
- expected_receipt = TransactionReceipt (
315
- gas_used = gas_benchmark_value , # Must consume all gas
316
- ),
317
304
)
318
305
319
306
# Post-state
@@ -325,5 +312,4 @@ def test_bloatnet_balance_extcodecopy(
325
312
pre = pre ,
326
313
blocks = [Block (txs = [attack_tx ])],
327
314
post = post ,
328
- skip_gas_used_validation = True ,
329
315
)
0 commit comments