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)]
pub struct Variable(Column<Advice>, usize);
#[derive(Clone)]
struct PLONKConfig {
a: Column<Advice>,
b: Column<Advice>,

View File

@ -206,7 +206,7 @@ pub trait Assignment<F: Field> {
/// [`ConstraintSystem`] implementation.
pub trait Circuit<F: Field> {
/// 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.

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.
circuit.synthesize(&mut witness, config)?;
circuit.synthesize(&mut witness, config.clone())?;
let witness = witness;