Skip to content

Commit ea9efea

Browse files
authored
fix: return G2NotInSubgroup for G2 subgroup check failure
1 parent 0d424ba commit ea9efea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/precompile/src/bls12_381/arkworks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ fn read_g2(
179179
) -> Result<G2Affine, PrecompileError> {
180180
let point = read_g2_no_subgroup_check(a_x_0, a_x_1, a_y_0, a_y_1)?;
181181
if !point.is_in_correct_subgroup_assuming_on_curve() {
182-
return Err(PrecompileError::Bls12381G1NotInSubgroup);
182+
return Err(PrecompileError::Bls12381G2NotInSubgroup);
183183
}
184184
Ok(point)
185185
}

0 commit comments

Comments
 (0)