diff --git a/.github/workflows/circuits_e2e.yaml b/.github/workflows/circuits_e2e.yaml index e2b4650f..9022317c 100644 --- a/.github/workflows/circuits_e2e.yaml +++ b/.github/workflows/circuits_e2e.yaml @@ -33,8 +33,25 @@ jobs: with: toolchain: nightly-2024-05-22 + - name: Nargo backend checks + run: | + set -x + ll ~ + ll ~/.nargo + ll ~/.nargo/backends + ll ~/.nargo/backends/acvm-backend-barretenberg + ll ~/.nargo/backends/acvm-backend-barretenberg/backend_binary + nargo --help + nargo --version + noirup --help + - name: Compile Circuit - run: nargo compile --workspace --deny-warnings + run: nargo compile --workspace #--deny-warnings + + - name: Generate verification key for recursive proof + working-directory: ethereum/oracles + run: | + yarn generate-get-storage-vk - name: Start Oracle Server working-directory: ethereum/oracles diff --git a/ethereum/circuits/lib/src/account_with_storage_recursive.nr b/ethereum/circuits/lib/src/account_with_storage_recursive.nr index 11585de0..63abf580 100644 --- a/ethereum/circuits/lib/src/account_with_storage_recursive.nr +++ b/ethereum/circuits/lib/src/account_with_storage_recursive.nr @@ -38,7 +38,7 @@ pub fn get_account_with_storage_recursive( storage_within_block } -#[oracle(get_account_with_storage_recursive)] +#[oracle(get_storage_recursive)] unconstrained fn get_account_with_storage_recursive_oracle( chain_id: Field, block_number: u64, diff --git a/ethereum/circuits/lib/src/account_with_storage_recursive_int_test.nr b/ethereum/circuits/lib/src/account_with_storage_recursive_int_test.nr index fd7a5231..10802212 100644 --- a/ethereum/circuits/lib/src/account_with_storage_recursive_int_test.nr +++ b/ethereum/circuits/lib/src/account_with_storage_recursive_int_test.nr @@ -1,6 +1,6 @@ use crate::account_with_storage_recursive::{get_account_with_storage_recursive, RecursiveProof}; use crate::account_with_storage::StorageWithinBlock; -use crate::fixtures::mainnet::paris::usdc_circle::{header::{number, hash}, account::{address, account} storage::{keys, values}}; +use crate::fixtures::mainnet::paris::usdc_circle::{header::{number, hash}, account::{address, account}, storage::{keys, values}}; use crate::chain::ETHEREUM_MAINNET_ID; use crate::misc::types::{Bytes32, Address}; use dep::std::test::OracleMock; @@ -10,7 +10,7 @@ fn success() { let result = StorageWithinBlock { block_hash: hash, account, values }; let recursive_proof = RecursiveProof { key_hash: 1, verification_key: [0; 114], proof: [0; 93] }; - let _ = OracleMock::mock("get_account_with_storage_recursive").returns((result.serialize(), recursive_proof)); + let _ = OracleMock::mock("get_storage_recursive").returns((result.serialize(), recursive_proof)); - get_account_with_storage_recursive(ETHEREUM_MAINNET_ID, number, address, keys[0]); + let _ = get_account_with_storage_recursive(ETHEREUM_MAINNET_ID, number, address, keys[0]); } diff --git a/ethereum/oracles/src/noir/oracles/server/app.ts b/ethereum/oracles/src/noir/oracles/server/app.ts index 23273cc4..10b7d289 100644 --- a/ethereum/oracles/src/noir/oracles/server/app.ts +++ b/ethereum/oracles/src/noir/oracles/server/app.ts @@ -18,7 +18,7 @@ jsonRPCServer.addMethod('get_account', getRpcOracleHandler.bind(this, getAccount jsonRPCServer.addMethod('get_proof', getRpcOracleHandler.bind(this, getProofOracle)); jsonRPCServer.addMethod('get_receipt', getRpcOracleHandler.bind(this, getReceiptOracle)); jsonRPCServer.addMethod('get_transaction', getRpcOracleHandler.bind(this, getTransactionOracle)); -jsonRPCServer.addMethod('recursive_get_storage', getOracleHandler.bind(this, getStorageOracle)); +jsonRPCServer.addMethod('get_storage_recursive', getOracleHandler.bind(this, getStorageOracle)); export function buildOracleServer( opts: Fastify.FastifyHttpOptions = {}, diff --git a/ethereum/oracles/src/noir/oracles/server/handlers.ts b/ethereum/oracles/src/noir/oracles/server/handlers.ts index 923ec179..da250ebc 100644 --- a/ethereum/oracles/src/noir/oracles/server/handlers.ts +++ b/ethereum/oracles/src/noir/oracles/server/handlers.ts @@ -17,7 +17,7 @@ export type JSONRPCServerMethods = { get_proof(params: ForeignCallParams): ForeignCallResult; get_receipt(params: ForeignCallParams): ForeignCallResult; get_transaction(params: ForeignCallParams): ForeignCallResult; - recursive_get_storage(params: ForeignCallParams): ForeignCallResult; + get_storage_recursive(params: ForeignCallParams): ForeignCallResult; }; export interface ServerParams { diff --git a/ethereum/oracles/src/script/generateGetStorageVK.ts b/ethereum/oracles/src/script/generateGetStorageVK.ts index 55d3286f..a58d26b3 100644 --- a/ethereum/oracles/src/script/generateGetStorageVK.ts +++ b/ethereum/oracles/src/script/generateGetStorageVK.ts @@ -1,7 +1,7 @@ import { MonorepoCircuit } from '../noir/circuit/circuit.js'; import { VerificationKey, generateVk } from '../noir/circuit/vk.js'; -const circuit = await MonorepoCircuit.create('../../', 'get_storage'); +const circuit = await MonorepoCircuit.create('../../', 'get_storage_recursive'); await generateVk(circuit.artefact.bytecode, circuit.vkPath(), circuit.vkAsFieldsPath()); const vk = await VerificationKey.create(circuit.vkAsFieldsPath()); // eslint-disable-next-line no-console