MCPcopy Create free account
hub / github.com/docknetwork/crypto / compute_new_post_batch_updates

Method compute_new_post_batch_updates

vb_accumulator/src/universal.rs:369–379  ·  view source on GitHub ↗

Compute new accumulated value after batch additions and removals

(
        &self,
        additions: &[G::ScalarField],
        removals: &[G::ScalarField],
        sk: &SecretKey<G::ScalarField>,
    )

Source from the content-addressed store, hash-verified

367
368 /// Compute new accumulated value after batch additions and removals
369 pub fn compute_new_post_batch_updates(
370 &self,
371 additions: &[G::ScalarField],
372 removals: &[G::ScalarField],
373 sk: &SecretKey<G::ScalarField>,
374 ) -> (G::ScalarField, G) {
375 let (mut d_alpha, V) = self._compute_new_post_batch_updates(additions, removals, sk);
376 let f_V = d_alpha * self.f_V;
377 d_alpha.zeroize();
378 (f_V, V)
379 }
380
381 /// Adding and removing batches of elements from the accumulator. Reads and writes to state. Described in section 3 of the paper
382 pub fn batch_updates(

Callers 1

Calls 2

zeroizeMethod · 0.45

Tested by 1