Skip to content

Commit

Permalink
new(tests): EIP-2537: Max discount G2 MSM test
Browse files Browse the repository at this point in the history
  • Loading branch information
marioevz committed Dec 27, 2024
1 parent cfddac5 commit a707406
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion tests/prague/eip2537_bls_12_381_precompiles/test_bls12_g2msm.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,24 @@
]


@pytest.mark.parametrize("input_data,expected_output", vectors_from_file("multiexp_G2_bls.json"))
@pytest.mark.parametrize(
"input_data,expected_output",
vectors_from_file("multiexp_G2_bls.json")
+ [
pytest.param(
(Spec.P2 + Scalar(Spec.Q)) * (len(Spec.G2MSM_DISCOUNT_TABLE) - 1),
Spec.INF_G2,
id="max_discount",
marks=pytest.mark.slow,
),
pytest.param(
(Spec.P2 + Scalar(Spec.Q)) * len(Spec.G2MSM_DISCOUNT_TABLE),
Spec.INF_G2,
id="max_discount_plus_1",
marks=pytest.mark.slow,
),
],
)
def test_valid(
state_test: StateTestFiller,
pre: Alloc,
Expand Down

0 comments on commit a707406

Please sign in to comment.