Skip to content

Commit

Permalink
fix fp2 names
Browse files Browse the repository at this point in the history
  • Loading branch information
tamirhemo committed Aug 7, 2024
1 parent d1859d1 commit bf2518d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions core/src/syscall/precompiles/fptower/fp2_addsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,14 @@ impl<F: PrimeField32, P: FpOpField> MachineAir<F> for Fp2AddSubAssignChip<P> {
type Program = Program;

fn name(&self) -> String {
let op = match self.op {
FieldOperation::Add => "Add".to_string(),
FieldOperation::Sub => "Sub".to_string(),
_ => unreachable!("Invalid operation"),
};
match P::FIELD_TYPE {
FieldType::Bn254 => "Bn254Fp2AddSubAssign".to_string(),
FieldType::Bls12381 => "Bls12831Fp2AddSubAssign".to_string(),
FieldType::Bn254 => format!("Bn254Fp2{}Assign", op),
FieldType::Bls12381 => format!("Bls12831Fp2{}Assign", op),
}
}

Expand Down

0 comments on commit bf2518d

Please sign in to comment.