mirror of
https://github.com/saymrwulf/pasta_curves-source.git
synced 2026-09-04 20:03:39 +00:00
Require Circuit::Config implement Clone instead of Copy
This commit is contained in:
parent
c95f0b7c0c
commit
0a378c3d0f
3 changed files with 3 additions and 2 deletions
|
|
@ -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>,
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue