Require Circuit::Config implement Clone instead of Copy

This commit is contained in:
Jack Grigg 2021-02-01 19:05:19 +00:00
parent c95f0b7c0c
commit 0a378c3d0f
3 changed files with 3 additions and 2 deletions

View file

@ -13,6 +13,7 @@ fn main() {
#[derive(Copy, Clone, Debug)] #[derive(Copy, Clone, Debug)]
pub struct Variable(Column<Advice>, usize); pub struct Variable(Column<Advice>, usize);
#[derive(Clone)]
struct PLONKConfig { struct PLONKConfig {
a: Column<Advice>, a: Column<Advice>,
b: Column<Advice>, b: Column<Advice>,

View file

@ -206,7 +206,7 @@ pub trait Assignment<F: Field> {
/// [`ConstraintSystem`] implementation. /// [`ConstraintSystem`] implementation.
pub trait Circuit<F: Field> { pub trait Circuit<F: Field> {
/// This is a configuration object that stores things like columns. /// This is a configuration object that stores things like columns.
type Config: Copy; type Config: Clone;
/// The circuit is given an opportunity to describe the exact gate /// The circuit is given an opportunity to describe the exact gate
/// arrangement, column arrangement, etc. /// arrangement, column arrangement, etc.

View file

@ -182,7 +182,7 @@ pub fn create_proof<C: CurveAffine, T: TranscriptWrite<C>, ConcreteCircuit: Circ
}; };
// Synthesize the circuit to obtain the witness and other information. // Synthesize the circuit to obtain the witness and other information.
circuit.synthesize(&mut witness, config)?; circuit.synthesize(&mut witness, config.clone())?;
let witness = witness; let witness = witness;