Skip to content

Commit 7debb4c

Browse files
authored
Merge pull request #13 from AztecProtocol/jc/simplify-recursion
Adding bb_proof_verification dependency and updating proof verification method to use verify_ultrahonkzk_proof
2 parents 21adff0 + 2c64d9e commit 7debb4c

File tree

4 files changed

+190
-188
lines changed

4 files changed

+190
-188
lines changed

.github/workflows/recursive-verification-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
- name: Set Aztec version and start sandbox
5050
run: |
5151
aztec-up ${{ env.AZTEC_VERSION }}
52+
docker tag aztecprotocol/aztec:${{ env.AZTEC_VERSION }} aztecprotocol/aztec:latest
5253
aztec start --sandbox &
5354
5455
- name: Wait for sandbox to be ready
@@ -70,7 +71,7 @@ jobs:
7071
7172
- name: Install project dependencies
7273
working-directory: recursive_verification
73-
run: bun install
74+
run: bun install --frozen-lockfile
7475

7576
- name: Compile Noir circuit
7677
working-directory: recursive_verification/circuit

recursive_verification/contract/Nargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ authors = ["Satyam Bansal"]
77
aztec = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-devnet.4", directory = "noir-projects/aztec-nr/aztec" }
88
value_note = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-devnet.4", directory = "noir-projects/aztec-nr/value-note" }
99
easy_private_state = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-devnet.4", directory = "noir-projects/aztec-nr/easy-private-state" }
10+
bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-devnet.4", directory = "barretenberg/noir/bb_proof_verification" }

recursive_verification/contract/src/main.nr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ use aztec::macros::aztec;
44
pub contract ValueNotEqual {
55
global HONK_VK_SIZE: u32 = 115;
66
global HONK_PROOF_SIZE: u32 = 492 + 16;
7-
global HONK_IDENTIFIER: u32 = 7;
87

98
use aztec::{
109
macros::{functions::{external, initializer}, storage::storage},
1110
oracle::debug_log::debug_log_format,
1211
protocol_types::{address::AztecAddress, traits::ToField},
1312
state_vars::Map,
1413
};
14+
use bb_proof_verification::verify_ultrahonkzk_proof;
1515
use easy_private_state::EasyPrivateUint;
1616

1717
#[storage]
@@ -32,10 +32,10 @@ pub contract ValueNotEqual {
3232
verification_key: [Field; HONK_VK_SIZE],
3333
proof: [Field; HONK_PROOF_SIZE],
3434
public_inputs: [Field; 1],
35-
vk_hash: Field
35+
vk_hash: Field,
3636
) {
3737
debug_log_format("Incrementing counter for owner {0}", [owner.to_field()]);
38-
std::verify_proof_with_type(verification_key, proof, public_inputs, vk_hash, HONK_IDENTIFIER);
38+
verify_ultrahonkzk_proof(verification_key, proof, public_inputs, vk_hash);
3939
ValueNotEqual::at(context.this_address()).emit_in_public(12345).enqueue(&mut context);
4040
let counters = storage.counters;
4141
counters.at(owner).add(1, owner);

0 commit comments

Comments
 (0)