Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

Conversation

@roynalnaruto
Copy link

Update aggregator crate's documentation

darth-cy and others added 3 commits July 16, 2024 09:33
To emphase the "continuous" in aggregated data
Copy link
Author

@roynalnaruto roynalnaruto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit-picks, minor suggestions

@roynalnaruto roynalnaruto requested a review from darth-cy July 16, 2024 08:55
@darth-cy darth-cy merged commit 6f199a1 into develop Jul 16, 2024
@darth-cy darth-cy deleted the doc/readme-update branch July 16, 2024 13:42
/// SNARKs.
type As = KzgAs<Pcs>;

/// Select condition ? LHS : RHS.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add some more detail: both this and the below entry are helpers to construct corresponding circuits inside of the ecc_chip which is maintained in the loader argument.

select_accumulator select the lhs or rhs according to the condition and return the cells for ec point represent the result of selection.

accumulate put all the accumulators in argument into circuit and accumulate them into a new pair of ec point and return it.

It may be better also to note that change the size of the vec of accumulators argument would lead to a new circuit (vk changed).


#[derive(Clone)]
pub struct RecursionCircuit<ST> {
/// The verifying key for the circuit.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basicaly it is not the verifying key but the common params of the recursion circuit. The so called "vk" part which identify the circuit is passed via preprocessed_digest PI.

pub struct RecursionCircuit<ST> {
/// The verifying key for the circuit.
svk: Svk,
/// The default accumulator to initialise the circuit.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the accumulator that recursion circuit begin with when the "previous" snark is not avaliable (aka. round = 0)

default_accumulator: KzgAccumulator<G1Affine, NativeLoader>,
/// The SNARK witness from the k-th BatchCircuit.
app: SnarkWitness,
/// The SNARK witness from the (k-1)-th BatchCircuit.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from the previous RecursionCircuit, i.e. the RecursionCircuit which has aggregated (k-1) snarks from BatchCircuit

round: usize,
/// The public inputs to the RecursionCircuit itself.
instances: Vec<Fr>,
/// The accumulation of the SNARK proofs recursed over thus far.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should say "the proofs of AppCircuit's snark under accumulation scheme"?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants