From 2b625a280255b9975112570596f5bc3fa6aeb340 Mon Sep 17 00:00:00 2001 From: pinkiebell <40266861+pinkiebell@users.noreply.github.com> Date: Tue, 5 Jul 2022 11:09:21 +0000 Subject: [PATCH 1/2] Params,ParamsVerifier: make k & n public Used for decision making in downstream projects that want to infer certain bounds given a `Params{Verifier}` structure. --- halo2_proofs/src/poly/commitment.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/halo2_proofs/src/poly/commitment.rs b/halo2_proofs/src/poly/commitment.rs index 9f03aeaa..9838f7a5 100644 --- a/halo2_proofs/src/poly/commitment.rs +++ b/halo2_proofs/src/poly/commitment.rs @@ -20,8 +20,8 @@ use std::io; /// These are the prover parameters for the polynomial commitment scheme. #[derive(Debug)] pub struct Params { - pub(crate) k: u32, - pub(crate) n: u64, + pub k: u32, + pub n: u64, pub(crate) g: Vec, pub(crate) g_lagrange: Vec, pub(crate) additional_data: Vec, @@ -30,8 +30,8 @@ pub struct Params { /// These are the verifier parameters for the polynomial commitment scheme. #[derive(Debug)] pub struct ParamsVerifier { - pub(crate) k: u32, - pub(crate) n: u64, + pub k: u32, + pub n: u64, pub(crate) g1: E::G1Affine, pub(crate) g2: E::G2Affine, pub(crate) s_g2: E::G2Affine, From f12f082b7159269b143b67f7e4ef45a6f3dbcadc Mon Sep 17 00:00:00 2001 From: pinkiebell <40266861+pinkiebell@users.noreply.github.com> Date: Tue, 12 Jul 2022 07:35:42 +0000 Subject: [PATCH 2/2] add doc strings --- halo2_proofs/src/poly/commitment.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/halo2_proofs/src/poly/commitment.rs b/halo2_proofs/src/poly/commitment.rs index 9838f7a5..388a76e1 100644 --- a/halo2_proofs/src/poly/commitment.rs +++ b/halo2_proofs/src/poly/commitment.rs @@ -20,7 +20,10 @@ use std::io; /// These are the prover parameters for the polynomial commitment scheme. #[derive(Debug)] pub struct Params { + /// This is a common term used for deriving the amount of field elements `n = 1 << k`. + /// Also known as the domain size. pub k: u32, + /// This represents the amount of available field elements pub n: u64, pub(crate) g: Vec, pub(crate) g_lagrange: Vec, @@ -30,7 +33,10 @@ pub struct Params { /// These are the verifier parameters for the polynomial commitment scheme. #[derive(Debug)] pub struct ParamsVerifier { + /// This is a common term used for deriving the amount of field elements `n = 1 << k`. + /// Also known as the domain size. pub k: u32, + /// This represents the amount of available field elements pub n: u64, pub(crate) g1: E::G1Affine, pub(crate) g2: E::G2Affine,