Skip to content

Commit

Permalink
temp fix of Secp256Point Into Curve
Browse files Browse the repository at this point in the history
  • Loading branch information
enitrat committed Sep 27, 2024
1 parent 313ea86 commit 7c8bd35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ pub fn execute_entry_point_call(
context,
);

println!("Blockifier-Native: running the Native Executor");
let result = run_native_executor(&contract_class.executor, function_id, call, syscall_handler);
result
}
5 changes: 4 additions & 1 deletion crates/blockifier/src/execution/native/syscall_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ where
let lhs: Affine<Curve> = p0.into();
let rhs: Affine<Curve> = p1.into();
let result: Projective<Curve> = lhs + rhs;
let result: Affine<Curve> = result.into();
let result: Affine<Curve> = Affine::from(result);
result.into()
}

Expand Down Expand Up @@ -1036,6 +1036,9 @@ where
Curve::BaseField: From<num_bigint::BigUint>,
{
fn from(p: Secp256Point<Curve>) -> Self {
if p.x.lo == 0 && p.x.hi == 0 && p.y.lo == 0 && p.y.hi == 0 {
return Affine::<Curve>::identity();
}
Affine::<Curve>::new(u256_to_biguint(p.x).into(), u256_to_biguint(p.y).into())
}
}
Expand Down

0 comments on commit 7c8bd35

Please sign in to comment.