(
self,
rng: &mut R,
proof_spec: ProofSpec<E>,
nonce: Option<Vec<u8>>,
mut pairing_checker: Option<RandomizedPairingChecker<E>>,
)
| 142 | } |
| 143 | |
| 144 | fn _verify<R: RngCore, D: FullDigest + Digest>( |
| 145 | self, |
| 146 | rng: &mut R, |
| 147 | proof_spec: ProofSpec<E>, |
| 148 | nonce: Option<Vec<u8>>, |
| 149 | mut pairing_checker: Option<RandomizedPairingChecker<E>>, |
| 150 | ) -> Result<(), ProofSystemError> { |
| 151 | proof_spec.validate()?; |
| 152 | |
| 153 | // Number of statement proofs is less than number of statements which means some statements |
| 154 | // are not satisfied. |
| 155 | if proof_spec.statements.len() > self.statement_proofs.len() { |
| 156 | return Err(ProofSystemError::UnsatisfiedStatements( |
| 157 | proof_spec.statements.len(), |
| 158 | self.statement_proofs.len(), |
| 159 | )); |
| 160 | } |
| 161 | |
| 162 | let mut transcript = MerlinTranscript::new(COMPOSITE_PROOF_LABEL); |
| 163 | |
| 164 | // TODO: Check SNARK SRSs compatible when aggregating and statement proof compatible with proof spec when aggregating |
| 165 | |
| 166 | let aggregate_snarks = |
| 167 | proof_spec.aggregate_groth16.is_some() || proof_spec.aggregate_legogroth16.is_some(); |
| 168 | let mut agg_saver = Vec::<Vec<Ciphertext<E>>>::new(); |
| 169 | let mut agg_lego = Vec::<(Vec<E::G1Affine>, Vec<Vec<E::ScalarField>>)>::new(); |
| 170 | |
| 171 | let mut agg_saver_stmts = BTreeMap::new(); |
| 172 | let mut agg_lego_stmts = BTreeMap::new(); |
| 173 | |
| 174 | if aggregate_snarks { |
| 175 | if let Some(a) = &proof_spec.aggregate_groth16 { |
| 176 | for (i, s) in a.iter().enumerate() { |
| 177 | for j in s { |
| 178 | agg_saver_stmts.insert(*j, i); |
| 179 | } |
| 180 | agg_saver.push(vec![]); |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | if let Some(a) = &proof_spec.aggregate_legogroth16 { |
| 185 | for (i, s) in a.iter().enumerate() { |
| 186 | for j in s { |
| 187 | agg_lego_stmts.insert(*j, i); |
| 188 | } |
| 189 | agg_lego.push((vec![], vec![])); |
| 190 | } |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | // Prepare commitment keys for running Schnorr protocols of all statements. |
| 195 | let ( |
| 196 | bound_check_comm, |
| 197 | ek_comm, |
| 198 | chunked_comm, |
| 199 | r1cs_comm_keys, |
| 200 | bound_check_bpp_comm, |
| 201 | bound_check_smc_comm, |
nothing calls this directly
no test coverage detected