Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/integration-tests/circuits/recursion/Nargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ type = "bin"
authors = [""]

[dependencies]
bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages", tag ="v3.0.0-nightly.20250916", directory = "./barretenberg/noir/bb_proof_verification" }
bb_proof_verification = { git = "https://github.com/AztecProtocol/aztec-packages", tag ="v3.0.0-nightly.20251104", directory = "./barretenberg/noir/bb_proof_verification" }
2 changes: 1 addition & 1 deletion compiler/integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"lint": "NODE_NO_WARNINGS=1 eslint . --max-warnings 0"
},
"dependencies": {
"@aztec/bb.js": "3.0.0-nightly.20251014",
"@aztec/bb.js": "3.0.0-nightly.20251104",
"@noir-lang/noir_js": "workspace:*",
"@noir-lang/noir_wasm": "workspace:*",
"@nomicfoundation/hardhat-chai-matchers": "^2.0.8",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect } from 'chai';
import { ethers } from 'hardhat';
import { CompiledCircuit, Noir } from '@noir-lang/noir_js';
import { Barretenberg, RawBuffer, UltraHonkBackend, deflattenFields } from '@aztec/bb.js';
import { Barretenberg, UltraHonkBackend, deflattenFields } from '@aztec/bb.js';

import assertLtCircuit from '../../circuits/assert_lt/target/assert_lt.json' assert { type: 'json' };
import recursionCircuit from '../../circuits/recursion/target/recursion.json' assert { type: 'json' };
Expand All @@ -23,18 +23,33 @@ it(`smart contract can verify a recursive proof`, async () => {
// Get verification key for inner circuit as fields
const innerCircuitVerificationKey = await innerBackend.getVerificationKey();
const barretenbergAPI = await Barretenberg.new({ threads: 1 });
const vkAsFields = await barretenbergAPI.acirVkAsFieldsUltraHonk(new RawBuffer(innerCircuitVerificationKey));
const vkHash = await barretenbergAPI.poseidon2Hash(vkAsFields);
const vkAsFields = await barretenbergAPI.vkAsFields({ verificationKey: innerCircuitVerificationKey });
const vkHash = await barretenbergAPI.poseidon2Hash({ inputs: vkAsFields.fields });

// Generate proof of the recursive circuit
const recursiveCircuitNoir = new Noir(recursionCircuit as CompiledCircuit);
const recursiveBackend = new UltraHonkBackend(recursionCircuit.bytecode, { threads: 1 });

const vkAsFieldsReal = vkAsFields.fields.map((field) => {
let fieldBigint = 0n;
for (const byte of field) {
fieldBigint <<= 8n;
fieldBigint += BigInt(byte);
}
return fieldBigint.toString();
});

let vkHashBigInt = 0n;
for (const byte of vkHash.hash) {
vkHashBigInt <<= 8n;
vkHashBigInt += BigInt(byte);
}

const recursiveInputs = {
proof: deflattenFields(intermediateProof),
public_inputs: intermediatePublicInputs,
verification_key: vkAsFields.map((field) => field.toString()),
key_hash: vkHash.toString(),
verification_key: vkAsFieldsReal,
key_hash: vkHashBigInt.toString(),
};
const { witness: recursiveWitness } = await recursiveCircuitNoir.execute(recursiveInputs);
const { proof: recursiveProof, publicInputs: recursivePublicInputs } = await recursiveBackend.generateProof(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ test_cases.forEach((testInfo) => {
const prover_toml = readFileSync(resolve(`${base_relative_path}/${test_case}/Prover.toml`)).toString();
const inputs = toml.parse(prover_toml);
const { witness } = await program.execute(inputs);
console.log(witness);
const backend = new UltraHonkBackend(noir_program.bytecode);
const proofData = await backend.generateProof(witness, { keccakZK: true });
// JS verification
Expand Down
2 changes: 1 addition & 1 deletion examples/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"test": "yarn build && playwright test browser.test.ts"
},
"dependencies": {
"@aztec/bb.js": "3.0.0-nightly.20251014",
"@aztec/bb.js": "3.0.0-nightly.20251104",
"@noir-lang/noir_js": "workspace:*"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/install_bb.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

VERSION="3.0.0-nightly.20251014"
VERSION="3.0.0-nightly.20251104"

BBUP_PATH=~/.bb/bbup

Expand Down
Loading
Loading