Skip to content

Commit 771107c

Browse files
committed
keep original test too
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
1 parent 60ace5d commit 771107c

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

tests/zkevm/test_worst_compute.py

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,30 @@ def test_worst_modexp(
294294
],
295295
id="bn128_mul",
296296
),
297+
pytest.param(
298+
0x08,
299+
[
300+
# TODO: the following are only two inputs, but this can be extended
301+
# to more inputs to amortize costs as much as possible. Additionally,
302+
# there might be worse pairings that can be used.
303+
#
304+
# First pairing
305+
"1C76476F4DEF4BB94541D57EBBA1193381FFA7AA76ADA664DD31C16024C43F59",
306+
"3034DD2920F673E204FEE2811C678745FC819B55D3E9D294E45C9B03A76AEF41",
307+
"209DD15EBFF5D46C4BD888E51A93CF99A7329636C63514396B4A452003A35BF7",
308+
"04BF11CA01483BFA8B34B43561848D28905960114C8AC04049AF4B6315A41678",
309+
"2BB8324AF6CFC93537A2AD1A445CFD0CA2A71ACD7AC41FADBF933C2A51BE344D",
310+
"120A2A4CF30C1BF9845F20C6FE39E07EA2CCE61F0C9BB048165FE5E4DE877550",
311+
# Second pairing
312+
"111E129F1CF1097710D41C4AC70FCDFA5BA2023C6FF1CBEAC322DE49D1B6DF7C",
313+
"103188585E2364128FE25C70558F1560F4F9350BAF3959E603CC91486E110936",
314+
"198E9393920D483A7260BFB731FB5D25F1AA493335A9E71297E485B7AEF312C2",
315+
"1800DEEF121F1E76426A00665E5C4479674322D4F75EDADD46DEBD5CD992F6ED",
316+
"090689D0585FF075EC9E99AD690C3395BC4B313370B38EF355ACDADCD122975B",
317+
"12C85EA5DB8C6DEB4AAB71808DCB408FE3D1E7690C43D37B4CE6CC0166FA7DAA",
318+
],
319+
id="bn128_pairing",
320+
),
297321
pytest.param(
298322
Blake2bSpec.BLAKE2_PRECOMPILE_ADDRESS,
299323
[
@@ -982,8 +1006,6 @@ def test_worst_bn128_pairings(
9821006
max_pairings = num_pairings_done
9831007
optimal_per_call_num_pairings = i
9841008

985-
print(f"{max_pairings=}, {optimal_per_call_num_pairings=}")
986-
9871009
calldata = Op.CALLDATACOPY(size=Op.CALLDATASIZE)
9881010
attack_block = Op.POP(Op.STATICCALL(Op.GAS, 0x08, 0, Op.CALLDATASIZE, 0, 0))
9891011
code = code_loop_precompile_call(calldata, attack_block)

0 commit comments

Comments
 (0)