mirror of https://github.com/zcash/halo2.git
Merge pull request #563 from parazyd/clone-impls-keys
plonk: Derive Clone for VerifyingKey and ProvingKey.
This commit is contained in:
commit
a1d1371ce3
|
@ -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>,
|
||||
|
|
|
@ -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>>,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue