Merge pull request #563 from parazyd/clone-impls-keys

plonk: Derive Clone for VerifyingKey and ProvingKey.
This commit is contained in:
ebfull 2022-05-05 13:59:44 -06:00 committed by GitHub
commit a1d1371ce3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -37,7 +37,7 @@ use std::io;
/// This is a verifying key which allows for the verification of proofs for a
/// particular circuit.
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct VerifyingKey<C: CurveAffine> {
domain: EvaluationDomain<C::Scalar>,
fixed_commitments: Vec<C>,
@ -95,7 +95,7 @@ pub struct PinnedVerificationKey<'a, C: CurveAffine> {
}
/// This is a proving key which allows for the creation of proofs for a
/// particular circuit.
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct ProvingKey<C: CurveAffine> {
vk: VerifyingKey<C>,
l0: Polynomial<C::Scalar, ExtendedLagrangeCoeff>,

View File

@ -73,13 +73,13 @@ impl Argument {
}
/// The verifying key for a single permutation argument.
#[derive(Debug)]
#[derive(Clone, Debug)]
pub(crate) struct VerifyingKey<C: CurveAffine> {
commitments: Vec<C>,
}
/// The proving key for a single permutation argument.
#[derive(Debug)]
#[derive(Clone, Debug)]
pub(crate) struct ProvingKey<C: CurveAffine> {
permutations: Vec<Polynomial<C::Scalar, LagrangeCoeff>>,
polys: Vec<Polynomial<C::Scalar, Coeff>>,

View File

@ -24,7 +24,7 @@ pub use verifier::{verify_proof, Accumulator, Guard};
use std::io;
/// These are the public parameters for the polynomial commitment scheme.
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct Params<C: CurveAffine> {
pub(crate) k: u32,
pub(crate) n: u64,

View File

@ -15,7 +15,7 @@ use std::marker::PhantomData;
/// This structure contains precomputed constants and other details needed for
/// performing operations on an evaluation domain of size $2^k$ and an extended
/// domain of size $2^{k} * j$ with $j \neq 0$.
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct EvaluationDomain<G: Group> {
n: u64,
k: u32,