-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: prove_then_verify_ultra_honk on all existing acir tests (#9042)
Closes AztecProtocol/barretenberg#1124. Ensure all acir tests are configured to run with UH as a precursor to the full switch and add `double_verify_honk_proof` and `double_verify_honk_proof_recursive` Noir programs to be tested as part of the acir tests. In Plonk, we also have `double_verify_nested_proof`, which aggregates two recursive proof (produced with `double_verify_proof_recursive`). That is because those proofs will have 16 additional frs representing the public inputs' indices of the recursive proof. Unlike this, we don't have different proof sizes when we handle recursive proofs for Honk but instead parse an initial default aggregation object in case the proof isn't produced from recursively verifying another proof.
- Loading branch information
1 parent
8efa7ac
commit 62f6b8a
Showing
11 changed files
with
106 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
noir/noir-repo/test_programs/execution_success/double_verify_honk_proof/Nargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[package] | ||
name = "double_verify_honk_proof" | ||
type = "bin" | ||
authors = [""] | ||
|
||
[dependencies] |
5 changes: 5 additions & 0 deletions
5
noir/noir-repo/test_programs/execution_success/double_verify_honk_proof/Prover.toml
Large diffs are not rendered by default.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
noir/noir-repo/test_programs/execution_success/double_verify_honk_proof/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
// This circuit aggregates two Honk proof from `assert_statement_recursive`. | ||
global SIZE_OF_PROOF_IF_LOGN_IS_28 : u32 = 463; | ||
global HONK_IDENTIFIER : u32 = 1; | ||
fn main( | ||
verification_key: [Field; 128], | ||
// This is the proof without public inputs attached. | ||
// This means: the size of this does not change with the number of public inputs. | ||
proof: [Field; SIZE_OF_PROOF_IF_LOGN_IS_28], | ||
public_inputs: pub [Field; 1], | ||
key_hash: Field, | ||
// The second proof, currently set to be identical | ||
proof_b: [Field; SIZE_OF_PROOF_IF_LOGN_IS_28] | ||
) { | ||
std::verify_proof_with_type( | ||
verification_key, | ||
proof, | ||
public_inputs, | ||
key_hash, | ||
HONK_IDENTIFIER | ||
); | ||
std::verify_proof_with_type( | ||
verification_key, | ||
proof_b, | ||
public_inputs, | ||
key_hash, | ||
HONK_IDENTIFIER | ||
); | ||
} |
6 changes: 6 additions & 0 deletions
6
noir/noir-repo/test_programs/execution_success/double_verify_honk_proof_recursive/Nargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[package] | ||
name = "double_verify_honk_proof_recursive" | ||
type = "bin" | ||
authors = [""] | ||
|
||
[dependencies] |
5 changes: 5 additions & 0 deletions
5
.../noir-repo/test_programs/execution_success/double_verify_honk_proof_recursive/Prover.toml
Large diffs are not rendered by default.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
.../noir-repo/test_programs/execution_success/double_verify_honk_proof_recursive/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
// This circuit aggregates two Honk proofs from `assert_statement_recursive`. | ||
global SIZE_OF_PROOF_IF_LOGN_IS_28 : u32 = 463; | ||
global HONK_IDENTIFIER : u32 = 1; | ||
#[recursive] | ||
fn main( | ||
verification_key: [Field; 128], | ||
// This is the proof without public inputs attached. | ||
// This means: the size of this does not change with the number of public inputs. | ||
proof: [Field; SIZE_OF_PROOF_IF_LOGN_IS_28], | ||
public_inputs: pub [Field; 1], | ||
key_hash: Field, | ||
// The second proof, currently set to be identical to the first proof | ||
proof_b: [Field; SIZE_OF_PROOF_IF_LOGN_IS_28] | ||
) { | ||
std::verify_proof_with_type( | ||
verification_key, | ||
proof, | ||
public_inputs, | ||
key_hash, | ||
HONK_IDENTIFIER | ||
); | ||
std::verify_proof_with_type( | ||
verification_key, | ||
proof_b, | ||
public_inputs, | ||
key_hash, | ||
HONK_IDENTIFIER | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters