Skip to content

Commit f67fbb2

Browse files
committed
fixed comments
1 parent a7d548e commit f67fbb2

File tree

1 file changed

+6
-35
lines changed

1 file changed

+6
-35
lines changed

tests/prague/eip7685_general_purpose_el_requests/test_deposits_withdrawals_consolidations.py

Lines changed: 6 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -307,46 +307,26 @@ def get_contract_permutations(n: int = 3) -> Generator[ParameterSet, None, None]
307307
[
308308
single_consolidation_from_contract(0),
309309
single_consolidation_from_contract(1),
310-
# single_consolidation_from_contract(2), # i=2 is not allowed cuz
311-
# only 2 MAX CONSOLIDATIONS PER BLOCK (EIP-7251), but why does the error message
312-
# not inform about this? only reports hash mismatch
313-
#
314310
# the following performs single_withdrawal_from_contract(0) to (16)
315311
*[
316312
single_withdrawal_from_contract(i)
317313
for i in range(
318314
0,
319-
16, # ensure that the hard limit of deposits per epoch has been removed
320-
# in all clients (EIP-6610), prev limit was
321-
# 16 deposits/slot or 512 deposits/epoch
322-
) # when using larger numbers: it fails around 1000 due to:
323-
# UnixHTTPConnectionPool(host='localhost', port=None):
324-
# Read timed out. (read timeout=20), workaround: in transition_tool.py
325-
# use SLOW_REQUEST_TIMEOUT (60 sec), so slow=True
315+
16,
316+
)
326317
],
327-
# single_withdrawal_from_contract(16), # i=16 not allowed cuz only
318+
# single_withdrawal_from_contract(16) not allowed cuz only
328319
# 16 MAX WITHDRAWALS PER BLOCK (EIP-7002)
329320
#
330321
# the following performs single_deposit_from_contract(0) to (18)
331322
*[
332323
single_deposit_from_contract(i)
333324
for i in range(
334325
0,
335-
18, # ensure that the hard limit of deposits per epoch has been removed
336-
# in all clients (EIP-6610), prev limit was 16 deposits/slot
337-
# or 512 deposits/epoch
338-
) # when using larger numbers: it fails around 1000 due to:
339-
# UnixHTTPConnectionPool(host='localhost', port=None): Read timed out.
340-
# (read timeout=20), workaround: in transition_tool.py use
341-
# SLOW_REQUEST_TIMEOUT (60 sec), so slow=True
326+
18,
327+
)
342328
],
343329
],
344-
# following ID not possible to due filename length limitations
345-
# id=(
346-
# ("consolidation_from_contract+" * 2)
347-
# + ("withdrawal_from_contract+" * 16)
348-
# + ("deposit_from_contract+" * 18)
349-
# )[:-1], # remove last '+'
350330
id="max_withdrawals_per_slot+max_consolidations_per_slot+unlimited_deposits_per_slot",
351331
),
352332
],
@@ -494,7 +474,7 @@ def invalid_requests_block_combinations(fork: Fork) -> List[ParameterSet]:
494474
[
495475
bytes([i]) for i in range(fork.max_request_type() + 1)
496476
], # Using empty requests, calculate the hash using an invalid calculation method:
497-
# sha256(sha256(b'0x00') ++ sha256(b'0x01') ++ sha256(b'0x02') ++ ...)
477+
# sha256(sha256(b"\0") ++ sha256(b"\1") ++ sha256(b"\2") ++ ...)
498478
BlockException.INVALID_REQUESTS,
499479
id="no_requests_and_invalid_hash_calculation_method",
500480
),
@@ -622,15 +602,6 @@ def invalid_requests_block_combinations(fork: Fork) -> List[ParameterSet]:
622602
id="extra_invalid_type_request_with_data_0xff",
623603
),
624604
)
625-
# too many withdrawals per block (16 is max - EIP-7002)
626-
# TODO: how to make sth like below work?
627-
# combinations.append(
628-
# pytest.param(
629-
# *[single_withdrawal_from_contract(i) for i in range(0, 17)],
630-
# BlockException.INVALID_REQUESTS,
631-
# id="more_than_16_withdrawals_per_block",
632-
# ),
633-
# )
634605

635606
return combinations
636607

0 commit comments

Comments
 (0)