diff --git a/examples/circuit-layout.rs b/examples/circuit-layout.rs index 1ef4e27..6020686 100644 --- a/examples/circuit-layout.rs +++ b/examples/circuit-layout.rs @@ -13,6 +13,7 @@ fn main() { #[derive(Copy, Clone, Debug)] pub struct Variable(Column, usize); + #[derive(Clone)] struct PLONKConfig { a: Column, b: Column, diff --git a/src/plonk/circuit.rs b/src/plonk/circuit.rs index e02b15b..21879cb 100644 --- a/src/plonk/circuit.rs +++ b/src/plonk/circuit.rs @@ -206,7 +206,7 @@ pub trait Assignment { /// [`ConstraintSystem`] implementation. pub trait Circuit { /// 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 /// arrangement, column arrangement, etc. diff --git a/src/plonk/prover.rs b/src/plonk/prover.rs index 8615890..ec9f7e7 100644 --- a/src/plonk/prover.rs +++ b/src/plonk/prover.rs @@ -182,7 +182,7 @@ pub fn create_proof, ConcreteCircuit: Circ }; // Synthesize the circuit to obtain the witness and other information. - circuit.synthesize(&mut witness, config)?; + circuit.synthesize(&mut witness, config.clone())?; let witness = witness;