Skip to content

Commit

Permalink
Small change to add curta constraints in mock_build
Browse files Browse the repository at this point in the history
  • Loading branch information
puma314 committed Sep 19, 2023
1 parent 760823a commit 3caffda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion plonky2x/src/frontend/builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ impl<L: PlonkParameters<D>, const D: usize> CircuitBuilder<L, D> {
CircuitBuild { data, io: self.io }
}

pub fn mock_build(self) -> MockCircuitBuild<L, D> {
pub fn mock_build(mut self) -> MockCircuitBuild<L, D> {
if !self.sha256_requests.is_empty() {
self.curta_constrain_sha256();
}
let mock_circuit = self.api.mock_build();
MockCircuitBuild {
data: mock_circuit,
Expand Down
2 changes: 1 addition & 1 deletion plonky2x/src/frontend/num/nonnative/nonnative.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl<FF: PrimeField> CircuitVariable for NonNativeTarget<FF> {
.constants
.insert(*variable, L::Field::from_canonical_u32(big_int_rep[i]));
}
return target;
target
}

fn variables(&self) -> Vec<Variable> {
Expand Down

0 comments on commit 3caffda

Please sign in to comment.