Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RecursionCircuit and updated BatchCircuit #1352

Merged
merged 93 commits into from
Jul 16, 2024
Merged

RecursionCircuit and updated BatchCircuit #1352

merged 93 commits into from
Jul 16, 2024

Conversation

noel2004
Copy link
Member

@noel2004 noel2004 commented Jun 27, 2024

This PR induce a new aggregation layer to aggregate multiple snarks from batch circuit, using an recursive scheme:

doc

darth-cy and others added 12 commits July 8, 2024 19:40
Signed-off-by: noelwei <fan@scroll.io>
Signed-off-by: noelwei <fan@scroll.io>
Signed-off-by: noelwei <fan@scroll.io>
Signed-off-by: noelwei <fan@scroll.io>
Signed-off-by: noelwei <fan@scroll.io>
Signed-off-by: noelwei <fan@scroll.io>
Signed-off-by: noelwei <fan@scroll.io>
@roynalnaruto roynalnaruto changed the title [Feat] Recursion aggregating multiple batch circuits RecursionCircuit and updated BatchCircuit Jul 10, 2024
darth-cy and others added 3 commits July 10, 2024 19:15
* Create standalone constructor for batch header

* Recover decoder config subcomponent

* corresponding changes to prover

---------

Co-authored-by: Rohit Narurkar <rohit.narurkar@proton.me>
@roynalnaruto roynalnaruto marked this pull request as ready for review July 11, 2024 20:43
@roynalnaruto roynalnaruto self-requested a review July 12, 2024 09:03
@lispc lispc self-requested a review July 16, 2024 05:26
@lispc
Copy link

lispc commented Jul 16, 2024

  1. is the bundle config file here is used for production? if not, there should be some code to let recursion circuit use "layer5" config, where is that code?

  2. withdraw root is "Additional public input that are unchanged over all the SNARKs". not too clear to me. You mean these are public inputs not to be "chained"?

@noel2004
Copy link
Member Author

noel2004 commented Jul 16, 2024

  1. is the bundle config file here is used for production? if not, there should be some code to let recursion circuit use "layer5" config, where is that code?
  2. withdraw root is "Additional public input that are unchanged over all the SNARKs". not too clear to me. You mean these are public inputs not to be "chained"?
  1. If indicate the bundle_circuit.config file under aggregator/config: No. This file is only used by the unit test of recursion circuit, so we need 5 adv colums for this config since one unit test would recursive prove a recursion circuit itself. And maybe we should not naming it as "bundle" i think.

Recursiion circuit (bundle) use a "layer5" config here:

let layer5_snark = self.prover_impl.load_or_gen_recursion_snark(
&name,
LayerId::Layer5.id(),
LayerId::Layer5.degree(),
&bundle_snarks,
output_dir,
)?;

  1. I think it is not "unchanged" but "do not involved in state transition". I consider these PIs are "not require to be verified by state transition", because they are in fact involved with (or say, decided by) state root. The doc has some irriadiation about them:
    https://www.notion.so/scrollzkp/Upgrade-4-Darwin-Documentation-05a3ecb59e9d4f288254701f8c888173?pvs=4#62a0b2058b9842188b5bd5e7267220ca

@lispc
Copy link

lispc commented Jul 16, 2024

ok i find this line env::set_var("BUNDLE_CONFIG", layer_config_path(id));

Copy link

@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.

Great work @noel2004 🎉

@lispc lispc merged commit 2d73894 into develop Jul 16, 2024
17 checks passed
@lispc lispc deleted the feat/agg_recursion branch July 16, 2024 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants