Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Nov 18, 2024
1 parent 890c282 commit 00c29e0
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 10 deletions.
20 changes: 10 additions & 10 deletions avm-transpiler/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "double_verify_honk_proof"
type = "bin"
authors = [""]

[dependencies]

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// This circuit aggregates two Honk proof from `assert_statement`.
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,
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "verify_honk_proof"
type = "bin"
authors = [""]

[dependencies]

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// This circuit aggregates a single Honk proof from `assert_statement`.
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],
// This is currently not public. It is fine given that the vk is a part of the circuit definition.
// I believe we want to eventually make it public too though.
key_hash: Field,
) {
std::verify_proof_with_type(
verification_key,
proof,
public_inputs,
key_hash,
HONK_IDENTIFIER,
);
}

0 comments on commit 00c29e0

Please sign in to comment.