Skip to content

Commit 4f64a3c

Browse files
Michael-EYjtcoolen
authored andcommitted
fully_collpase for AssignedAccumulator
1 parent e003738 commit 4f64a3c

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

circuits/src/verifier/accumulator.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,21 @@ impl<S: SelfEmulation> AssignedAccumulator<S> {
313313
self.rhs.collapse(layouter, curve_chip, scalar_chip)
314314
}
315315

316+
/// Evaluates the variable and fixed parts of the AssignedAccumulator
317+
/// collapsing each side to a single point.
318+
///
319+
/// This will likely be an expensive in-circuit operation.
320+
pub fn fully_collapse(
321+
&self,
322+
layouter: &mut impl Layouter<S::F>,
323+
curve_chip: &S::CurveChip,
324+
fixed_bases: &BTreeMap<String, S::C>,
325+
) -> Result<(S::AssignedPoint, S::AssignedPoint), Error> {
326+
let lhs_pt = self.lhs.eval(layouter, curve_chip, fixed_bases)?;
327+
let rhs_pt = self.rhs.eval(layouter, curve_chip, fixed_bases)?;
328+
Ok((lhs_pt, rhs_pt))
329+
}
330+
316331
/// Accumulates several accumulators together. The resulting acc will
317332
/// satisfy the invariant iff all the accumulators individually do.
318333
pub fn accumulate(

0 commit comments

Comments
 (0)