Skip to content

Commit 7e5337d

Browse files
committed
add extra cases
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
1 parent 95eeb28 commit 7e5337d

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

tests/zkevm/test_worst_compute.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,6 @@ def test_worst_modexp(
297297
pytest.param(
298298
0x08,
299299
[
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-
#
304300
# First pairing
305301
"1C76476F4DEF4BB94541D57EBBA1193381FFA7AA76ADA664DD31C16024C43F59",
306302
"3034DD2920F673E204FEE2811C678745FC819B55D3E9D294E45C9B03A76AEF41",
@@ -316,7 +312,20 @@ def test_worst_modexp(
316312
"090689D0585FF075EC9E99AD690C3395BC4B313370B38EF355ACDADCD122975B",
317313
"12C85EA5DB8C6DEB4AAB71808DCB408FE3D1E7690C43D37B4CE6CC0166FA7DAA",
318314
],
319-
id="bn128_pairing",
315+
id="bn128_two_pairings",
316+
),
317+
pytest.param(
318+
0x08,
319+
[
320+
# First pairing
321+
"1C76476F4DEF4BB94541D57EBBA1193381FFA7AA76ADA664DD31C16024C43F59",
322+
"3034DD2920F673E204FEE2811C678745FC819B55D3E9D294E45C9B03A76AEF41",
323+
"209DD15EBFF5D46C4BD888E51A93CF99A7329636C63514396B4A452003A35BF7",
324+
"04BF11CA01483BFA8B34B43561848D28905960114C8AC04049AF4B6315A41678",
325+
"2BB8324AF6CFC93537A2AD1A445CFD0CA2A71ACD7AC41FADBF933C2A51BE344D",
326+
"120A2A4CF30C1BF9845F20C6FE39E07EA2CCE61F0C9BB048165FE5E4DE877550",
327+
],
328+
id="bn128_one_pairing",
320329
),
321330
pytest.param(
322331
Blake2bSpec.BLAKE2_PRECOMPILE_ADDRESS,
@@ -961,7 +970,7 @@ def test_empty_block(
961970

962971
@pytest.mark.valid_from("Cancun")
963972
@pytest.mark.slow()
964-
def test_worst_bn128_pairings(
973+
def test_amortized_bn128_pairings(
965974
blockchain_test: BlockchainTestFiller,
966975
pre: Alloc,
967976
fork: Fork,

0 commit comments

Comments
 (0)