Skip to content

Commit 923d08b

Browse files
committed
feat(tests): bls point generator and extra add g1/g2 coverage.
1 parent 4521b62 commit 923d08b

File tree

6 files changed

+791
-1152
lines changed

6 files changed

+791
-1152
lines changed

Diff for: tests/prague/eip2537_bls_12_381_precompiles/conftest.py

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
"""Shared pytest definitions local to EIP-2537 tests."""
22

3-
from typing import SupportsBytes
3+
from typing import List, SupportsBytes
44

55
import pytest
66

77
from ethereum_test_tools import EOA, Address, Alloc, Bytecode, Storage, Transaction, keccak256
88
from ethereum_test_tools import Opcodes as Op
99

10-
from .spec import GAS_CALCULATION_FUNCTION_MAP
10+
from .helpers import BLSPointGenerator
11+
from .spec import GAS_CALCULATION_FUNCTION_MAP, PointG1, PointG2, Spec
1112

1213

1314
@pytest.fixture
@@ -187,3 +188,12 @@ def tx(
187188
to=call_contract_address,
188189
sender=sender,
189190
)
191+
192+
193+
# Random points not in the subgroup (fast to generate)
194+
G1_NOT_IN_SUBGROUP = BLSPointGenerator.generate_random_g1_point_not_in_subgroup()
195+
G2_NOT_IN_SUBGROUP = BLSPointGenerator.generate_random_g2_point_not_in_subgroup()
196+
197+
# Random points not on the curve (fast to generate)
198+
G1_NOT_ON_CURVE = BLSPointGenerator.generate_random_g1_point_not_on_curve()
199+
G2_NOT_ON_CURVE = BLSPointGenerator.generate_random_g2_point_not_on_curve()

0 commit comments

Comments
 (0)