uncomment ped64 ped128 code

This commit is contained in:
collin 2022-08-15 11:47:23 -07:00
parent 541209a92c
commit 71b7d10efe
2 changed files with 46 additions and 46 deletions

View File

@ -37,9 +37,9 @@ pub enum CoreInstruction {
BHP1024Commit,
BHP1024Hash,
// Pedersen64Commit,
Pedersen64Commit,
Pedersen64Hash,
// Pedersen128Commit,
Pedersen128Commit,
Pedersen128Hash,
Poseidon2Hash,
@ -60,9 +60,9 @@ impl CoreInstruction {
(sym::BHP1024, sym::commit) => Self::BHP1024Commit,
(sym::BHP1024, sym::hash) => Self::BHP1024Hash,
// (sym::Pedersen64, sym::commit) => Self::Pedersen64Commit,
(sym::Pedersen64, sym::commit) => Self::Pedersen64Commit,
(sym::Pedersen64, sym::hash) => Self::Pedersen64Hash,
// (sym::Pedersen128, sym::commit) => Self::Pedersen128Commit,
(sym::Pedersen128, sym::commit) => Self::Pedersen128Commit,
(sym::Pedersen128, sym::hash) => Self::Pedersen128Hash,
(sym::Poseidon2, sym::hash) => Self::Poseidon2Hash,
@ -84,9 +84,9 @@ impl CoreInstruction {
Self::BHP1024Commit => BHP1024Commit::NUM_ARGS,
Self::BHP1024Hash => BHP1024Hash::NUM_ARGS,
// Self::Pedersen64Commit => Pedersen64Commit::NUM_ARGS,
Self::Pedersen64Commit => Pedersen64Commit::NUM_ARGS,
Self::Pedersen64Hash => Pedersen64Hash::NUM_ARGS,
// Self::Pedersen128Commit => Pedersen128Commit::NUM_ARGS,
Self::Pedersen128Commit => Pedersen128Commit::NUM_ARGS,
Self::Pedersen128Hash => Pedersen128Hash::NUM_ARGS,
Self::Poseidon2Hash => Poseidon2Hash::NUM_ARGS,
@ -107,9 +107,9 @@ impl CoreInstruction {
Self::BHP1024Commit => BHP1024Commit::first_arg_types(),
Self::BHP1024Hash => BHP1024Hash::first_arg_types(),
// Self::Pedersen64Commit => Pedersen64Commit::first_arg_types(),
Self::Pedersen64Commit => Pedersen64Commit::first_arg_types(),
Self::Pedersen64Hash => Pedersen64Hash::first_arg_types(),
// Self::Pedersen128Commit => Pedersen128Commit::first_arg_types(),
Self::Pedersen128Commit => Pedersen128Commit::first_arg_types(),
Self::Pedersen128Hash => Pedersen128Hash::first_arg_types(),
Self::Poseidon2Hash => Poseidon2Hash::first_arg_types(),
@ -130,9 +130,9 @@ impl CoreInstruction {
Self::BHP1024Commit => BHP1024Commit::second_arg_types(),
Self::BHP1024Hash => BHP1024Hash::second_arg_types(),
// Self::Pedersen64Commit => Pedersen64Commit::second_arg_types(),
Self::Pedersen64Commit => Pedersen64Commit::second_arg_types(),
Self::Pedersen64Hash => Pedersen64Hash::second_arg_types(),
// Self::Pedersen128Commit => Pedersen128Commit::second_arg_types(),
Self::Pedersen128Commit => Pedersen128Commit::second_arg_types(),
Self::Pedersen128Hash => Pedersen128Hash::second_arg_types(),
Self::Poseidon2Hash => Poseidon2Hash::second_arg_types(),
@ -153,9 +153,9 @@ impl CoreInstruction {
Self::BHP1024Commit => BHP1024Commit::return_type(),
Self::BHP1024Hash => BHP1024Hash::return_type(),
// Self::Pedersen64Commit => Pedersen64Commit::return_type(),
Self::Pedersen64Commit => Pedersen64Commit::return_type(),
Self::Pedersen64Hash => Pedersen64Hash::return_type(),
// Self::Pedersen128Commit => Pedersen128Commit::return_type(),
Self::Pedersen128Commit => Pedersen128Commit::return_type(),
Self::Pedersen128Hash => Pedersen128Hash::return_type(),
Self::Poseidon2Hash => Poseidon2Hash::return_type(),

View File

@ -31,23 +31,23 @@ impl CoreFunction for Pedersen64Hash {
}
}
// pub struct Pedersen64Commit;
//
// impl CoreFunction for Pedersen64Commit {
// const NUM_ARGS: usize = 2;
//
// fn first_arg_types() -> &'static [Type] {
// &BOOL_INT64_STRING_TYPES
// }
//
// fn second_arg_types() -> &'static [Type] {
// &[Type::Scalar]
// }
//
// fn return_type() -> Type {
// Type::Field
// }
// }
pub struct Pedersen64Commit;
impl CoreFunction for Pedersen64Commit {
const NUM_ARGS: usize = 2;
fn first_arg_types() -> &'static [Type] {
&BOOL_INT64_STRING_TYPES
}
fn second_arg_types() -> &'static [Type] {
&[Type::Scalar]
}
fn return_type() -> Type {
Type::Field
}
}
pub struct Pedersen128Hash;
@ -63,20 +63,20 @@ impl CoreFunction for Pedersen128Hash {
}
}
// pub struct Pedersen128Commit;
//
// impl CoreFunction for Pedersen128Commit {
// const NUM_ARGS: usize = 2;
//
// fn first_arg_types() -> &'static [Type] {
// &BOOL_INT_STRING_TYPES
// }
//
// fn second_arg_types() -> &'static [Type] {
// &[Type::Scalar]
// }
//
// fn return_type() -> Type {
// Type::Field
// }
// }
pub struct Pedersen128Commit;
impl CoreFunction for Pedersen128Commit {
const NUM_ARGS: usize = 2;
fn first_arg_types() -> &'static [Type] {
&BOOL_INT_STRING_TYPES
}
fn second_arg_types() -> &'static [Type] {
&[Type::Scalar]
}
fn return_type() -> Type {
Type::Field
}
}