Skip to content

Commit 51e2a20

Browse files
committed
add assertions
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
1 parent 7e5337d commit 51e2a20

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/zkevm/test_worst_compute.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,6 +1048,9 @@ def _generate_bn128_pairs(n: int, seed: int = 0):
10481048
point_x_affine = multiply(G1, priv_key_g1)
10491049
point_y_affine = multiply(G2, priv_key_g2)
10501050

1051+
assert point_x_affine is not None, "G1 multiplication resulted in point at infinity"
1052+
assert point_y_affine is not None, "G2 multiplication resulted in point at infinity"
1053+
10511054
g1_x_bytes = point_x_affine[0].n.to_bytes(32, "big")
10521055
g1_y_bytes = point_x_affine[1].n.to_bytes(32, "big")
10531056
g1_serialized = g1_x_bytes + g1_y_bytes

0 commit comments

Comments
 (0)