Skip to content

Commit 3a1536c

Browse files
committed
Enhance contract by adding bb_proof_verification dependency and updating proof verification method to use verify_ultrahonkzk_proof.
1 parent 21adff0 commit 3a1536c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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)