Defines the minimal interface of commitment state for any polynomial commitment scheme. It might be randomness etc.
| 75 | /// Defines the minimal interface of commitment state for any polynomial |
| 76 | /// commitment scheme. It might be randomness etc. |
| 77 | pub trait PCCommitmentState: Clone + CanonicalSerialize + CanonicalDeserialize { |
| 78 | /// This is the type of `Randomness` that the `rand` method returns |
| 79 | type Randomness: Clone + CanonicalSerialize + CanonicalDeserialize; |
| 80 | |
| 81 | /// Outputs empty randomness that does not hide the commitment. |
| 82 | fn empty() -> Self; |
| 83 | |
| 84 | /// Samples randomness for commitments; |
| 85 | /// `num_queries` specifies the number of queries that the commitment will be opened at. |
| 86 | /// `has_degree_bound` indicates that the corresponding commitment has an enforced |
| 87 | /// `num_vars` specifies the number of variables for multivariate commitment. |
| 88 | /// strict degree bound. |
| 89 | fn rand<R: RngCore>( |
| 90 | num_queries: usize, |
| 91 | has_degree_bound: bool, |
| 92 | num_vars: Option<usize>, |
| 93 | rng: &mut R, |
| 94 | ) -> Self::Randomness; |
| 95 | } |
| 96 | /// A proof of satisfaction of linear combinations. |
| 97 | #[derive(Clone, CanonicalSerialize, CanonicalDeserialize)] |
| 98 | pub struct BatchLCProof<F: PrimeField, T: Clone + CanonicalSerialize + CanonicalDeserialize> { |
nothing calls this directly
no outgoing calls
no test coverage detected