Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Commit

Permalink
Fixes and cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
0xVolosnikov committed Jul 30, 2024
1 parent 0dd8673 commit c806fd8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
20 changes: 17 additions & 3 deletions src/gadgets/queue/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use super::boolean::Boolean;
use super::num::Num;
use super::traits::allocatable::*;
use super::u32::UInt32;
use super::{traits::encodable::CircuitEncodable, *};
use super::{traits::encodable::CircuitEncodable, traits::encodable::WitnessVarLengthEncodable, *};
use crate::algebraic_props::round_function::AbsorptionModeOverwrite;
use crate::algebraic_props::round_function::AlgebraicRoundFunction;
use crate::config::CSConfig;
Expand Down Expand Up @@ -582,14 +582,28 @@ pub fn simulate_new_tail<
use crate::gadgets::traits::encodable::CircuitVarLengthEncodable;
use crate::serde_utils::BigArraySerde;

#[derive(Derivative, CSAllocatable, CSSelectable, CSVarLengthEncodable, WitVarLengthEncodable, WitnessHookable)]
#[derive(
Derivative,
CSAllocatable,
CSSelectable,
CSVarLengthEncodable,
WitVarLengthEncodable,
WitnessHookable,
)]
#[derivative(Clone, Copy, Debug)]
pub struct QueueState<F: SmallField, const N: usize> {
pub head: [Num<F>; N],
pub tail: QueueTailState<F, N>,
}

#[derive(Derivative, CSAllocatable, CSSelectable, CSVarLengthEncodable, WitVarLengthEncodable, WitnessHookable)]
#[derive(
Derivative,
CSAllocatable,
CSSelectable,
CSVarLengthEncodable,
WitVarLengthEncodable,
WitnessHookable,
)]
#[derivative(Clone, Copy, Debug)]
pub struct QueueTailState<F: SmallField, const N: usize> {
pub tail: [Num<F>; N],
Expand Down
9 changes: 8 additions & 1 deletion src/gadgets/queue/queue_optimizer/sponge_optimizer.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
use super::*;

#[derive(Derivative, CSAllocatable, CSSelectable, CSVarLengthEncodable, WitVarLengthEncodable, WitnessHookable)]
#[derive(
Derivative,
CSAllocatable,
CSSelectable,
CSVarLengthEncodable,
WitVarLengthEncodable,
WitnessHookable,
)]
#[derivative(Clone, Debug, Copy)]
pub struct SpongeRoundRequest<F: SmallField, const SWIDTH: usize> {
pub initial_state: [Num<F>; SWIDTH],
Expand Down
1 change: 0 additions & 1 deletion src/gadgets/recursion/allocated_vk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,3 @@ impl<F: SmallField, H: RecursiveTreeHasher<F, Num<F>>> WitnessVarLengthEncodable
}
}
}

0 comments on commit c806fd8

Please sign in to comment.