Skip to content

Commit

Permalink
Merge pull request #48 from 0xmozak/sai/enable_serialize_poseidon2_gates
Browse files Browse the repository at this point in the history
Enable serialization of Poseidon2 gates
  • Loading branch information
sai-deng authored Dec 7, 2023
2 parents ec95756 + e19f123 commit 1017c30
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plonky2/src/gates/poseidon2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ impl<F: RichField + Extendable<D>, const D: usize> Gate<F, D> for Poseidon2Gate<
}
}

#[derive(Debug)]
struct Poseidon2Generator<F: RichField + Extendable<D> + Poseidon2, const D: usize> {
#[derive(Debug, Default)]
pub struct Poseidon2Generator<F: RichField + Extendable<D> + Poseidon2, const D: usize> {
row: usize,
_phantom: PhantomData<F>,
}
Expand Down
2 changes: 2 additions & 0 deletions plonky2/src/util/serialization/gate_serialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ pub mod default {
use crate::gates::multiplication_extension::MulExtensionGate;
use crate::gates::noop::NoopGate;
use crate::gates::poseidon::PoseidonGate;
use crate::gates::poseidon2::Poseidon2Gate;
use crate::gates::poseidon_mds::PoseidonMdsGate;
use crate::gates::public_input::PublicInputGate;
use crate::gates::random_access::RandomAccessGate;
Expand All @@ -127,6 +128,7 @@ pub mod default {
NoopGate,
PoseidonMdsGate<F, D>,
PoseidonGate<F, D>,
Poseidon2Gate<F, D>,
PublicInputGate,
RandomAccessGate<F, D>,
ReducingExtensionGate<D>,
Expand Down
2 changes: 2 additions & 0 deletions plonky2/src/util/serialization/generator_serialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ pub mod default {
use crate::gates::lookup_table::LookupTableGenerator;
use crate::gates::multiplication_extension::MulExtensionGenerator;
use crate::gates::poseidon::PoseidonGenerator;
use crate::gates::poseidon2::Poseidon2Generator;
use crate::gates::poseidon_mds::PoseidonMdsGenerator;
use crate::gates::random_access::RandomAccessGenerator;
use crate::gates::reducing::ReducingGenerator;
Expand Down Expand Up @@ -152,6 +153,7 @@ pub mod default {
MulExtensionGenerator<F, D>,
NonzeroTestGenerator,
PoseidonGenerator<F, D>,
Poseidon2Generator<F, D>,
PoseidonMdsGenerator<D>,
QuotientGeneratorExtension<D>,
RandomAccessGenerator<F, D>,
Expand Down

0 comments on commit 1017c30

Please sign in to comment.