Skip to content

Commit 9848e75

Browse files
tests(zkevm): expand worst case modexp benchmarks
1 parent bb2992c commit 9848e75

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

tests/zkevm/test_worst_compute.py

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,46 @@ def test_worst_precompile_only_data_input(
550550
),
551551
id="mod_even_32b_exp_256",
552552
),
553+
pytest.param(
554+
ModExpInput(
555+
base=64 * "ff",
556+
exponent=64 * "ff",
557+
modulus=63 * "ff" + "00",
558+
),
559+
id="mod_even_64b_exp_512",
560+
),
561+
pytest.param(
562+
ModExpInput(
563+
base=128 * "ff",
564+
exponent=128 * "ff",
565+
modulus=127 * "ff" + "00",
566+
),
567+
id="mod_even_128b_exp_1024",
568+
),
569+
pytest.param(
570+
ModExpInput(
571+
base=256 * "ff",
572+
exponent=128 * "ff",
573+
modulus=255 * "ff" + "00",
574+
),
575+
id="mod_even_256b_exp_1024",
576+
),
577+
pytest.param(
578+
ModExpInput(
579+
base=512 * "ff",
580+
exponent=128 * "ff",
581+
modulus=511 * "ff" + "00",
582+
),
583+
id="mod_even_512b_exp_1024",
584+
),
585+
pytest.param(
586+
ModExpInput(
587+
base=1024 * "ff",
588+
exponent=128 * "ff",
589+
modulus=1023 * "ff" + "00",
590+
),
591+
id="mod_even_1024b_exp_1024",
592+
),
553593
pytest.param(
554594
ModExpInput(
555595
base=32 * "ff",
@@ -566,6 +606,46 @@ def test_worst_precompile_only_data_input(
566606
),
567607
id="mod_odd_32b_exp_256",
568608
),
609+
pytest.param(
610+
ModExpInput(
611+
base=64 * "ff",
612+
exponent=64 * "ff",
613+
modulus=63 * "ff" + "01",
614+
),
615+
id="mod_odd_64b_exp_512",
616+
),
617+
pytest.param(
618+
ModExpInput(
619+
base=128 * "ff",
620+
exponent=128 * "ff",
621+
modulus=127 * "ff" + "01",
622+
),
623+
id="mod_odd_128b_exp_1024",
624+
),
625+
pytest.param(
626+
ModExpInput(
627+
base=256 * "ff",
628+
exponent=128 * "ff",
629+
modulus=255 * "ff" + "01",
630+
),
631+
id="mod_odd_256b_exp_1024",
632+
),
633+
pytest.param(
634+
ModExpInput(
635+
base=512 * "ff",
636+
exponent=128 * "ff",
637+
modulus=511 * "ff" + "01",
638+
),
639+
id="mod_odd_512b_exp_1024",
640+
),
641+
pytest.param(
642+
ModExpInput(
643+
base=1024 * "ff",
644+
exponent=128 * "ff",
645+
modulus=1023 * "ff" + "01",
646+
),
647+
id="mod_odd_1024b_exp_1024",
648+
),
569649
pytest.param(
570650
ModExpInput(
571651
base=32 * "ff",

0 commit comments

Comments
 (0)