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

feat: Use full IPA recursive verifier in root rollup #10962

Merged
merged 5 commits into from
Jan 2, 2025

Conversation

lucasxia01
Copy link
Contributor

@lucasxia01 lucasxia01 commented Dec 24, 2024

Modifies the root rollup circuit to use different recursion proof type, ROOT_ROLLUP_HONK and processing of honk_recursion_constraints, so the backend knows to run the full IPA recursive verifier.

Resolves AztecProtocol/barretenberg#1183.

@lucasxia01 lucasxia01 self-assigned this Dec 24, 2024
@@ -270,9 +273,8 @@ void build_constraints(Builder& builder, AcirProgram& program, const ProgramMeta
// final recursion output.
builder.add_pairing_point_accumulator(current_aggregation_object);
}
// TODO(https://github.com/AztecProtocol/barretenberg/issues/1183): This assertion should be true, except for
Copy link
Contributor Author

Choose a reason for hiding this comment

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

honk_recursion is 2 for the tube, base, merge, block root, block merge circuits, but NOT the root rollup.

This assert previously wasn't true because the root rollup wasn't running the full verifier and therefore still spit out an ipa claim and proof, but now that it does run full verification, it will output nothing.

@@ -379,13 +381,17 @@ HonkRecursionConstraintsOutput<Builder> process_honk_recursion_constraints(
size_t idx = 0;
std::vector<OpeningClaim<stdlib::grumpkin<Builder>>> nested_ipa_claims;
std::vector<StdlibProof<Builder>> nested_ipa_proofs;
bool is_root_rollup = false;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this bool checks to see if any of the honk recursion constraints set the proof type to be ROOT ROLLUP HONK and that's how we know whether to run the full IPA recursive verifier or not.

@@ -400,6 +406,7 @@ HonkRecursionConstraintsOutput<Builder> process_honk_recursion_constraints(
gate_counter.track_diff(constraint_system.gates_per_opcode,
constraint_system.original_opcode_indices.honk_recursion_constraints.at(idx++));
}
ASSERT(!(is_root_rollup && nested_ipa_claims.size() != 2) && "Root rollup must accumulate two IPA proofs.");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

just checking to make sure that if its the root rollup, we have 2 nested IPA claims to accumulate

// do full IPA verification
auto accumulated_ipa_transcript =
std::make_shared<StdlibTranscript>(convert_native_proof_to_stdlib(&builder, ipa_proof));
IPA<stdlib::grumpkin<Builder>>::full_verify_recursive(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

if root rollup, run full IPA recursive verifier, otherwise return the ipa claim and proof as output

@@ -635,7 +635,7 @@ void handle_blackbox_func_call(Program::Opcode::BlackBoxFuncCall const& arg,
// be the only means for setting the proof type. use of honk_recursion flag in this context can go
// away once all noir programs (e.g. protocol circuits) are updated to use the new pattern.
if (proof_type_in != HONK && proof_type_in != AVM && proof_type_in != ROLLUP_HONK &&
proof_type_in != ROLLUP_ROOT_HONK) {
proof_type_in != ROOT_ROLLUP_HONK) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

just a renaming

impl Verifiable for PreviousRollupBlockData {
fn verify(self) {
impl PreviousRollupBlockData {
fn verify(self, proof_type_id: u32) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

adding an extra argument because this function is shared between the root rollup and the block merge

self.previous_rollup_data[0].validate_in_vk_tree(ALLOWED_PREVIOUS_CIRCUITS);

self.previous_rollup_data[1].verify();
self.previous_rollup_data[1].verify(PROOF_TYPE_ROOT_ROLLUP_HONK);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

core change: this is the ROOT_ROLLUP_HONK type

Copy link
Contributor

@ledwards2225 ledwards2225 left a comment

Choose a reason for hiding this comment

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

LGTM

@lucasxia01 lucasxia01 enabled auto-merge (squash) December 24, 2024 22:50
@lucasxia01 lucasxia01 added the e2e-all CI: Enables this CI job. label Jan 2, 2025
@lucasxia01 lucasxia01 merged commit 37095ce into master Jan 2, 2025
75 of 76 checks passed
@lucasxia01 lucasxia01 deleted the lx/full-ipa-verification-in-root-rollup branch January 2, 2025 21:46
lucasxia01 added a commit that referenced this pull request Jan 2, 2025
Modifies the root rollup circuit to use different recursion proof type,
ROOT_ROLLUP_HONK and processing of honk_recursion_constraints, so the
backend knows to run the full IPA recursive verifier.

Resolves AztecProtocol/barretenberg#1183.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e-all CI: Enables this CI job.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Rollup Root proof type for root rollup circuit
2 participants