Skip to content

Commit

Permalink
fix ShaBitThreadBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
nulltea committed Sep 11, 2023
1 parent 9ea58cd commit 00ad037
Show file tree
Hide file tree
Showing 13 changed files with 224 additions and 207 deletions.
3 changes: 3 additions & 0 deletions lightclient-circuits/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use halo2_proofs::{
circuit::{Layouter, SimpleFloorPlanner},
plonk::{Circuit, Column, ConstraintSystem, Error, Instance},
};
use log::debug;

use crate::{
gadget::crypto::{SHAConfig, ShaCircuitBuilder, ShaThreadBuilder},
Expand Down Expand Up @@ -97,6 +98,7 @@ impl<F: Field, ThreadBuilder: ThreadBuilderBase<F>> Circuit<F>
) -> Result<(), Error> {
// we later `take` the builder, so we need to save this value
let witness_gen_only = self.inner.builder.borrow().witness_gen_only();

let assigned_advices = self.inner.sub_synthesize(&config.sha, &mut layouter)?;

if !witness_gen_only {
Expand All @@ -120,6 +122,7 @@ impl<F: Field, ThreadBuilder: ThreadBuilderBase<F>> snark_verifier_sdk::CircuitE
fn num_instance(&self) -> Vec<usize> {
vec![self.instance_count()]
}

fn instances(&self) -> Vec<Vec<F>> {
vec![self.instance()]
}
Expand Down
Loading

0 comments on commit 00ad037

Please sign in to comment.