Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions frame/evm/precompile/bls12377/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ impl Precompile for Bls12377MapG1 {

let fq = read_fq(input, 0)?;
let g1 = match map_to_curve_g1(fq) {
Ok(point) => point,
Ok(point) => point.clear_cofactor(),
Err(_) => {
return Err(PrecompileFailure::Error {
exit_status: ExitError::Other("map to curve failed".into()),
Expand Down Expand Up @@ -635,15 +635,15 @@ impl Precompile for Bls12377MapG2 {
handle.record_cost(Bls12377MapG2::GAS_COST)?;

let input = handle.input();
if input.len() != 64 {
if input.len() != 128 {
return Err(PrecompileFailure::Error {
exit_status: ExitError::Other("invalid input length".into()),
});
}

let fq2 = read_fq2(input, 0)?;
let g2 = match map_to_curve_g2(fq2) {
Ok(point) => point,
Ok(point) => point.clear_cofactor(),
Err(_) => {
return Err(PrecompileFailure::Error {
exit_status: ExitError::Other("map to curve failed".into()),
Expand Down