From 88c63c9d9dd1b8c0a221311cfb7276e8f930e3eb Mon Sep 17 00:00:00 2001 From: Arkadiusz Konior Date: Mon, 10 Jun 2024 10:28:34 +0200 Subject: [PATCH] Comments; inline variable. --- .github/workflows/circuits_e2e.yaml | 6 +++--- ethereum/circuits/lib/src/account_with_storage_recursive.nr | 3 +-- .../examples/circuits/is_dao_worthy_recursive/src/main.nr | 3 +-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/circuits_e2e.yaml b/.github/workflows/circuits_e2e.yaml index 8a6848ad..2fae275a 100644 --- a/.github/workflows/circuits_e2e.yaml +++ b/.github/workflows/circuits_e2e.yaml @@ -45,7 +45,7 @@ jobs: nargo compile --package is_dao_worthy --deny-warnings nargo compile --package is_ape_owner --deny-warnings - # We cannot use the `--deny-warnings` option in `is_dao_worthy_recursive` because the `verify_proof` method generates warning + # We cannot use the `--deny-warnings` option in `is_dao_worthy_recursive` because the `verify_proof` method generates warnings # that are actually informational messages from the compiler and cannot be ignored. nargo compile --package is_dao_worthy_recursive @@ -70,8 +70,8 @@ jobs: - name: Generate verification key for recursive proof working-directory: ethereum/oracles run: | - # To generate the verification key, the following file is required: ~/.nargo/backends/acvm-backend-barretenberg/backend_binary. - # This file is automatically installed during the execution of the `nargo prove` command in previous step. + # Verification key generation uses Barretenberg backend located at ~/.nargo/backends/acvm-backend-barretenberg/backend_binary. + # It is automatically installed during the execution of the `nargo prove` command in previous step. yarn generate-get-storage-vk - name: Generate Recursive Proof diff --git a/ethereum/circuits/lib/src/account_with_storage_recursive.nr b/ethereum/circuits/lib/src/account_with_storage_recursive.nr index aa7e67d3..83333b10 100644 --- a/ethereum/circuits/lib/src/account_with_storage_recursive.nr +++ b/ethereum/circuits/lib/src/account_with_storage_recursive.nr @@ -25,12 +25,11 @@ pub fn get_account_with_storage_recursive( public_inputs.extend_back(address.serialize()); public_inputs.extend_back(storage_key.serialize()); public_inputs.extend_back(storage_within_block.serialize()); - let public_inputs_array: [Field; NUM_PUBLIC_INPUTS] = public_inputs.to_array(); verify_proof( verification_key.as_slice(), proof.as_slice(), - public_inputs_array.as_slice(), + public_inputs.to_array::().as_slice(), key_hash ); diff --git a/vlayer/examples/circuits/is_dao_worthy_recursive/src/main.nr b/vlayer/examples/circuits/is_dao_worthy_recursive/src/main.nr index 574389b1..d767bd9f 100644 --- a/vlayer/examples/circuits/is_dao_worthy_recursive/src/main.nr +++ b/vlayer/examples/circuits/is_dao_worthy_recursive/src/main.nr @@ -7,7 +7,6 @@ global MIN_BALANCE = U128::from_integer(100_000_000_000); // $100k fn main(wallet_address: Address, block_number: pub u64) { let wallet_balance = USDC.get_balance(wallet_address, block_number, true); - let is_balance_greater_or_equal = MIN_BALANCE <= wallet_balance; - assert(is_balance_greater_or_equal, "Insufficient USDC balance"); + assert(MIN_BALANCE <= wallet_balance;, "Insufficient USDC balance"); }