Skip to content

Commit 4ac1b68

Browse files
feat(tests): use a more logical gas limit formula for contract deployment
1 parent 5e823ff commit 4ac1b68

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/zkevm/test_worst_bytecode.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ def test_worst_bytecode_single_opcode(
9999

100100
# Set the block gas limit to a relative high value to ensure the code deposit tx
101101
# fits in the block (there is enough gas available in the block to execute this)
102-
# TODO: verify this, I think we can just do `code_deposit_gas_minimum * 2 * num_contracts`?
103-
# and then take the max of this and the attack gas limit
104-
env = Environment(gas_limit=attack_gas_limit * 2 * (code_deposit_gas_minimum // loop_cost + 1))
102+
env = Environment(gas_limit=code_deposit_gas_minimum * 2 * num_contracts)
105103

106104
# The initcode will take its address as a starting point to the input to the keccak
107105
# hash function.

0 commit comments

Comments
 (0)