From fe845e2975d2cf61a343803b62ddb4ac5a20757b Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Tue, 7 Jan 2025 20:16:06 +0000 Subject: [PATCH 01/14] feat: improve blob simulation speed (#11075) If the bloblib is compiled to brillig there's a lot of unnecessary code being run which only acts to constrain values which were calculated in an unconstrained context. If we're not constraining anything then we can ignore it. --- .../crates/blob/src/blob.nr | 176 ++++++++---------- 1 file changed, 82 insertions(+), 94 deletions(-) diff --git a/noir-projects/noir-protocol-circuits/crates/blob/src/blob.nr b/noir-projects/noir-protocol-circuits/crates/blob/src/blob.nr index d2f9d809332f..10ebc5c16941 100644 --- a/noir-projects/noir-protocol-circuits/crates/blob/src/blob.nr +++ b/noir-projects/noir-protocol-circuits/crates/blob/src/blob.nr @@ -227,67 +227,69 @@ fn barycentric_evaluate_blob_at_z(z: F, ys: [F; FIELDS_PER_BLOB]) -> F { __compute_partial_sums(fracs, ROOTS) }; - // We split off the first term to check the initial sum - - // partial_sums[0] <- (lhs[0] * rhs[0] + ... + lhs[7] * rhs[7]) - // => (lhs[0] * rhs[0] + ... + lhs[7] * rhs[7]) - partial_sums[0] == 0 - let lhs = [ - [ROOTS[0]], [ROOTS[1]], [ROOTS[2]], [ROOTS[3]], [ROOTS[4]], [ROOTS[5]], [ROOTS[6]], - [ROOTS[7]], - ]; - let rhs = [ - [fracs[0]], [fracs[1]], [fracs[2]], [fracs[3]], [fracs[4]], [fracs[5]], [fracs[6]], - [fracs[7]], - ]; - BigNum::evaluate_quadratic_expression( - lhs, - [[false], [false], [false], [false], [false], [false], [false], [false]], - rhs, - [[false], [false], [false], [false], [false], [false], [false], [false]], - [partial_sums[0]], - [true], - ); - for i in 1..NUM_PARTIAL_SUMS { - // Seeking: - // ___i*8 - 1 ___i*8 + 7 - // \ omega^i \ / y_k \ - // sum_out = / y_i . --------- + / omega^k . | --------- | - // /____ z - omega^i /____ \ z - omega^k / - // 0 k = i*8 - // ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - // sum partial_sum - // - // ... that is: - // - // ___i*8 - 1 ___ 7 - // \ omega^i \ - // sum_out = / y_i . --------- + / lhs[j] . rhs[j] - // /____ z - omega^i /____ - // 0 j = 0 - // ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ - // sum partial_sum - // - - let mut lhs: [[F; 1]; 8] = [std::mem::zeroed(); 8]; - let mut rhs: [[F; 1]; 8] = [std::mem::zeroed(); 8]; - for j in 0..8 { - let k = i * 8 + j; - lhs[j] = [ROOTS[k]]; // omega^k - rhs[j] = [fracs[k]]; // y_k / (z - omega^k) - } - - let linear_terms = [partial_sums[i - 1], partial_sums[i]]; - - // partial_sums[i] <- partial_sums[i-1] + (lhs[8*i] * rhs[8*i] + ... + lhs[8*i + 7] * rhs[8*i + 7]) - // => (lhs[8*i] * rhs[8*i] + ... + lhs[8*i + 7] * rhs[8*i + 7]) + partial_sums[i-1] - partial_sums[i] == 0 + if !std::runtime::is_unconstrained() { + // We split off the first term to check the initial sum + + // partial_sums[0] <- (lhs[0] * rhs[0] + ... + lhs[7] * rhs[7]) + // => (lhs[0] * rhs[0] + ... + lhs[7] * rhs[7]) - partial_sums[0] == 0 + let lhs = [ + [ROOTS[0]], [ROOTS[1]], [ROOTS[2]], [ROOTS[3]], [ROOTS[4]], [ROOTS[5]], [ROOTS[6]], + [ROOTS[7]], + ]; + let rhs = [ + [fracs[0]], [fracs[1]], [fracs[2]], [fracs[3]], [fracs[4]], [fracs[5]], [fracs[6]], + [fracs[7]], + ]; BigNum::evaluate_quadratic_expression( lhs, [[false], [false], [false], [false], [false], [false], [false], [false]], rhs, [[false], [false], [false], [false], [false], [false], [false], [false]], - linear_terms, - [false, true], + [partial_sums[0]], + [true], ); + for i in 1..NUM_PARTIAL_SUMS { + // Seeking: + // ___i*8 - 1 ___i*8 + 7 + // \ omega^i \ / y_k \ + // sum_out = / y_i . --------- + / omega^k . | --------- | + // /____ z - omega^i /____ \ z - omega^k / + // 0 k = i*8 + // ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + // sum partial_sum + // + // ... that is: + // + // ___i*8 - 1 ___ 7 + // \ omega^i \ + // sum_out = / y_i . --------- + / lhs[j] . rhs[j] + // /____ z - omega^i /____ + // 0 j = 0 + // ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ + // sum partial_sum + // + + // partial_sums[i] <- partial_sums[i-1] + (lhs[8*i] * rhs[8*i] + ... + lhs[8*i + 7] * rhs[8*i + 7]) + // => (lhs[8*i] * rhs[8*i] + ... + lhs[8*i + 7] * rhs[8*i + 7]) + partial_sums[i-1] - partial_sums[i] == 0 + let mut lhs: [[F; 1]; 8] = [std::mem::zeroed(); 8]; + let mut rhs: [[F; 1]; 8] = [std::mem::zeroed(); 8]; + for j in 0..8 { + let k = i * 8 + j; + lhs[j] = [ROOTS[k]]; // omega^k + rhs[j] = [fracs[k]]; // y_k / (z - omega^k) + } + + let linear_terms = [partial_sums[i - 1], partial_sums[i]]; + + BigNum::evaluate_quadratic_expression( + lhs, + [[false], [false], [false], [false], [false], [false], [false], [false]], + rhs, + [[false], [false], [false], [false], [false], [false], [false], [false]], + linear_terms, + [false, true], + ); + } } let factor = compute_factor(z); @@ -317,14 +319,16 @@ fn compute_factor(z: F) -> F { // (z_pow_d - one) * (D_INV) - factor = 0 // z_pow_d * D_INV - D_INV - factor = 0 - BigNum::evaluate_quadratic_expression( - [[z_pow_d]], - [[false]], - [[D_INV]], - [[false]], - [factor, D_INV], - [true, true], - ); + if !std::runtime::is_unconstrained() { + BigNum::evaluate_quadratic_expression( + [[z_pow_d]], + [[false]], + [[D_INV]], + [[false]], + [factor, D_INV], + [true, true], + ); + } // This version doesn't work: // BigNum::evaluate_quadratic_expression( @@ -371,17 +375,19 @@ fn compute_fracs( __compute_fracs(z, ys, ROOTS) }; - for i in 0..FIELDS_PER_BLOB { - // frac <-- ys[i] / (z + neg_roots[i]) - // frac * (z + neg_roots[i]) - ys[i] = 0 - BigNum::evaluate_quadratic_expression( - [[fracs[i]]], - [[false]], - [[z, ROOTS[i].neg()]], - [[false, false]], - [ys[i]], - [true], - ); + if !std::runtime::is_unconstrained() { + for i in 0..FIELDS_PER_BLOB { + // frac <-- ys[i] / (z + neg_roots[i]) + // frac * (z + neg_roots[i]) - ys[i] = 0 + BigNum::evaluate_quadratic_expression( + [[fracs[i]]], + [[false]], + [[z, ROOTS[i].neg()]], + [[false, false]], + [ys[i]], + [true], + ); + } } fracs @@ -442,7 +448,7 @@ mod tests { field_to_bignum, }, blob_public_inputs::BlobCommitment, - unconstrained_config::{D, D_INV, F, LOG_FIELDS_PER_BLOB}, + unconstrained_config::{D, D_INV, F}, }; use bigint::{BigNum, fields::bls12_381Fr::BLS12_381_Fr_Params}; use types::{ @@ -451,24 +457,6 @@ mod tests { tests::{fixture_builder::FixtureBuilder, utils::pad_end}, }; - // Helper to return (z^d - 1)/d (unsafe - test only) - fn z_d_helper(challenge_z: F) -> F { - let mut t1 = unsafe { challenge_z.__mul(challenge_z) }; - let mut t2: F = BigNum::new(); - for _i in 0..LOG_FIELDS_PER_BLOB - 1 { - t2 = unsafe { t1.__mul(t1) }; - t1 = t2; - } - - let z_pow_d = t1; - - let one: F = BigNum::one(); - - t1 = unsafe { z_pow_d.__sub(one) }; - let factor = unsafe { t1.__mul(D_INV) }; - factor - } - #[test] unconstrained fn test_one_note() { let mut tx_data = FixtureBuilder::new(); @@ -500,7 +488,7 @@ mod tests { //* p(z).(z - 1) = --------- //* d // - let rhs = z_d_helper(challenge_z); + let rhs = super::compute_factor(challenge_z); let z_minus_1 = unsafe { challenge_z.__sub(BigNum::one()) }; let lhs = y.__mul(z_minus_1); assert_eq(lhs, rhs); From ffa740707dca56a77fb59f2944a3e9a2dcb8d507 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Venturo?= Date: Tue, 7 Jan 2025 18:03:36 -0300 Subject: [PATCH 02/14] chore: renaming getIncomingNotes (#10743) Continuation of https://github.com/AztecProtocol/aztec-packages/pull/10486, now that outgoing notes are no longer a thing I renamed IncomingNoteDao and friends to remove the 'incoming' part. --- .../aztec.js/src/utils/cheat_codes.ts | 2 +- .../aztec.js/src/wallet/base_wallet.ts | 6 +- .../circuit-types/src/interfaces/pxe.test.ts | 8 +- .../circuit-types/src/interfaces/pxe.ts | 8 +- yarn-project/circuit-types/src/notes/index.ts | 2 +- ...coming_notes_filter.ts => notes_filter.ts} | 8 +- yarn-project/cli/src/utils/inspect.ts | 14 +-- .../end-to-end/src/e2e_2_pxes.test.ts | 6 +- .../minting.test.ts | 6 +- .../src/e2e_crowdfunding_and_claim.test.ts | 22 ++-- .../e2e_pending_note_hashes_contract.test.ts | 4 +- ...akey_e2e_inclusion_proofs_contract.test.ts | 14 +-- .../src/guides/dapp_testing.test.ts | 2 +- .../src/database/incoming_note_dao.test.ts | 9 -- .../pxe/src/database/kv_pxe_database.ts | 32 ++--- .../pxe/src/database/note_dao.test.ts | 9 ++ .../{incoming_note_dao.ts => note_dao.ts} | 113 ++++++++++-------- .../src/database/outgoing_note_dao.test.ts | 9 -- yarn-project/pxe/src/database/pxe_database.ts | 18 +-- .../src/database/pxe_database_test_suite.ts | 50 ++++---- .../produce_note_daos.ts | 12 +- .../pxe/src/pxe_service/pxe_service.ts | 28 ++--- .../pxe/src/simulator_oracle/index.ts | 32 ++--- .../simulator_oracle/simulator_oracle.test.ts | 18 +-- 24 files changed, 220 insertions(+), 212 deletions(-) rename yarn-project/circuit-types/src/notes/{incoming_notes_filter.ts => notes_filter.ts} (82%) delete mode 100644 yarn-project/pxe/src/database/incoming_note_dao.test.ts create mode 100644 yarn-project/pxe/src/database/note_dao.test.ts rename yarn-project/pxe/src/database/{incoming_note_dao.ts => note_dao.ts} (70%) delete mode 100644 yarn-project/pxe/src/database/outgoing_note_dao.test.ts diff --git a/yarn-project/aztec.js/src/utils/cheat_codes.ts b/yarn-project/aztec.js/src/utils/cheat_codes.ts index 507460ca4d94..284632a677ba 100644 --- a/yarn-project/aztec.js/src/utils/cheat_codes.ts +++ b/yarn-project/aztec.js/src/utils/cheat_codes.ts @@ -256,7 +256,7 @@ export class AztecCheatCodes { * @returns The notes stored at the given slot */ public async loadPrivate(owner: AztecAddress, contract: AztecAddress, slot: Fr | bigint): Promise { - const extendedNotes = await this.pxe.getIncomingNotes({ + const extendedNotes = await this.pxe.getNotes({ owner, contractAddress: contract, storageSlot: new Fr(slot), diff --git a/yarn-project/aztec.js/src/wallet/base_wallet.ts b/yarn-project/aztec.js/src/wallet/base_wallet.ts index 48199b089275..7087fc3414b5 100644 --- a/yarn-project/aztec.js/src/wallet/base_wallet.ts +++ b/yarn-project/aztec.js/src/wallet/base_wallet.ts @@ -3,9 +3,9 @@ import { type EventMetadataDefinition, type ExtendedNote, type GetUnencryptedLogsResponse, - type IncomingNotesFilter, type L2Block, type LogFilter, + type NotesFilter, type PXE, type PXEInfo, type PrivateExecutionResult, @@ -134,8 +134,8 @@ export abstract class BaseWallet implements Wallet { getTxReceipt(txHash: TxHash): Promise { return this.pxe.getTxReceipt(txHash); } - getIncomingNotes(filter: IncomingNotesFilter): Promise { - return this.pxe.getIncomingNotes(filter); + getNotes(filter: NotesFilter): Promise { + return this.pxe.getNotes(filter); } getPublicStorageAt(contract: AztecAddress, storageSlot: Fr): Promise { return this.pxe.getPublicStorageAt(contract, storageSlot); diff --git a/yarn-project/circuit-types/src/interfaces/pxe.test.ts b/yarn-project/circuit-types/src/interfaces/pxe.test.ts index ad3018dc8d65..88af066544c9 100644 --- a/yarn-project/circuit-types/src/interfaces/pxe.test.ts +++ b/yarn-project/circuit-types/src/interfaces/pxe.test.ts @@ -34,8 +34,8 @@ import { AuthWitness } from '../auth_witness.js'; import { type InBlock } from '../in_block.js'; import { L2Block } from '../l2_block.js'; import { ExtendedUnencryptedL2Log, type GetUnencryptedLogsResponse, type LogFilter } from '../logs/index.js'; -import { type IncomingNotesFilter } from '../notes/incoming_notes_filter.js'; import { ExtendedNote, UniqueNote } from '../notes/index.js'; +import { type NotesFilter } from '../notes/notes_filter.js'; import { PrivateExecutionResult } from '../private_execution_result.js'; import { type EpochProofQuote } from '../prover_coordination/epoch_proof_quote.js'; import { SiblingPath } from '../sibling_path/sibling_path.js'; @@ -190,8 +190,8 @@ describe('PXESchema', () => { expect(result).toBeInstanceOf(Fr); }); - it('getIncomingNotes', async () => { - const result = await context.client.getIncomingNotes({ contractAddress: address }); + it('getNotes', async () => { + const result = await context.client.getNotes({ contractAddress: address }); expect(result).toEqual([expect.any(UniqueNote)]); }); @@ -409,7 +409,7 @@ class MockPXE implements PXE { expect(slot).toBeInstanceOf(Fr); return Promise.resolve(Fr.random()); } - getIncomingNotes(filter: IncomingNotesFilter): Promise { + getNotes(filter: NotesFilter): Promise { expect(filter.contractAddress).toEqual(this.address); return Promise.resolve([UniqueNote.random()]); } diff --git a/yarn-project/circuit-types/src/interfaces/pxe.ts b/yarn-project/circuit-types/src/interfaces/pxe.ts index d70216ef15c0..06669355b195 100644 --- a/yarn-project/circuit-types/src/interfaces/pxe.ts +++ b/yarn-project/circuit-types/src/interfaces/pxe.ts @@ -36,8 +36,8 @@ import { type LogFilter, LogFilterSchema, } from '../logs/index.js'; -import { type IncomingNotesFilter, IncomingNotesFilterSchema } from '../notes/incoming_notes_filter.js'; import { ExtendedNote, UniqueNote } from '../notes/index.js'; +import { type NotesFilter, NotesFilterSchema } from '../notes/notes_filter.js'; import { PrivateExecutionResult } from '../private_execution_result.js'; import { SiblingPath } from '../sibling_path/sibling_path.js'; import { Tx, TxHash, TxProvingResult, TxReceipt, TxSimulationResult } from '../tx/index.js'; @@ -232,11 +232,11 @@ export interface PXE { getPublicStorageAt(contract: AztecAddress, slot: Fr): Promise; /** - * Gets incoming notes of accounts registered in this PXE based on the provided filter. + * Gets notes registered in this PXE based on the provided filter. * @param filter - The filter to apply to the notes. * @returns The requested notes. */ - getIncomingNotes(filter: IncomingNotesFilter): Promise; + getNotes(filter: NotesFilter): Promise; /** * Fetches an L1 to L2 message from the node. @@ -483,7 +483,7 @@ export const PXESchema: ApiSchemaFor = { .args(TxHash.schema) .returns(z.union([inBlockSchemaFor(TxEffect.schema), z.undefined()])), getPublicStorageAt: z.function().args(schemas.AztecAddress, schemas.Fr).returns(schemas.Fr), - getIncomingNotes: z.function().args(IncomingNotesFilterSchema).returns(z.array(UniqueNote.schema)), + getNotes: z.function().args(NotesFilterSchema).returns(z.array(UniqueNote.schema)), getL1ToL2MembershipWitness: z .function() .args(schemas.AztecAddress, schemas.Fr, schemas.Fr) diff --git a/yarn-project/circuit-types/src/notes/index.ts b/yarn-project/circuit-types/src/notes/index.ts index d926d03e99a5..925b57252ea8 100644 --- a/yarn-project/circuit-types/src/notes/index.ts +++ b/yarn-project/circuit-types/src/notes/index.ts @@ -1,4 +1,4 @@ export * from './comparator.js'; export * from './extended_note.js'; -export * from './incoming_notes_filter.js'; +export * from './notes_filter.js'; export * from './note_status.js'; diff --git a/yarn-project/circuit-types/src/notes/incoming_notes_filter.ts b/yarn-project/circuit-types/src/notes/notes_filter.ts similarity index 82% rename from yarn-project/circuit-types/src/notes/incoming_notes_filter.ts rename to yarn-project/circuit-types/src/notes/notes_filter.ts index 0f2911c3a58b..f2ce6696aeba 100644 --- a/yarn-project/circuit-types/src/notes/incoming_notes_filter.ts +++ b/yarn-project/circuit-types/src/notes/notes_filter.ts @@ -7,10 +7,10 @@ import { TxHash } from '../tx/tx_hash.js'; import { NoteStatus } from './note_status.js'; /** - * A filter used to fetch incoming notes. + * A filter used to fetch notes. * @remarks This filter is applied as an intersection of all its params. */ -export type IncomingNotesFilter = { +export type NotesFilter = { /** Hash of a transaction from which to fetch the notes. */ txHash?: TxHash; /** The contract address the note belongs to. */ @@ -23,11 +23,11 @@ export type IncomingNotesFilter = { status?: NoteStatus; /** The siloed nullifier for the note. */ siloedNullifier?: Fr; - /** The scopes in which to get incoming notes from. This defaults to all scopes. */ + /** The scopes in which to get notes from. This defaults to all scopes. */ scopes?: AztecAddress[]; }; -export const IncomingNotesFilterSchema: ZodFor = z.object({ +export const NotesFilterSchema: ZodFor = z.object({ txHash: TxHash.schema.optional(), contractAddress: schemas.AztecAddress.optional(), storageSlot: schemas.Fr.optional(), diff --git a/yarn-project/cli/src/utils/inspect.ts b/yarn-project/cli/src/utils/inspect.ts index 80c87f4c79d0..a1a8148d5593 100644 --- a/yarn-project/cli/src/utils/inspect.ts +++ b/yarn-project/cli/src/utils/inspect.ts @@ -39,10 +39,10 @@ export async function inspectTx( log: LogFn, opts: { includeBlockInfo?: boolean; artifactMap?: ArtifactMap } = {}, ) { - const [receipt, effectsInBlock, incomingNotes] = await Promise.all([ + const [receipt, effectsInBlock, getNotes] = await Promise.all([ pxe.getTxReceipt(txHash), pxe.getTxEffect(txHash), - pxe.getIncomingNotes({ txHash, status: NoteStatus.ACTIVE_OR_NULLIFIED }), + pxe.getNotes({ txHash, status: NoteStatus.ACTIVE_OR_NULLIFIED }), ]); // Base tx data log(`Tx ${txHash.toString()}`); @@ -88,10 +88,10 @@ export async function inspectTx( const notes = effects.noteHashes; if (notes.length > 0) { log(' Created notes:'); - log(` Total: ${notes.length}. Incoming: ${incomingNotes.length}.`); - if (incomingNotes.length) { - log(' Incoming notes:'); - for (const note of incomingNotes) { + log(` Total: ${notes.length}. Found: ${getNotes.length}.`); + if (getNotes.length) { + log(' Found notes:'); + for (const note of getNotes) { inspectNote(note, artifactMap, log); } } @@ -103,7 +103,7 @@ export async function inspectTx( if (nullifierCount > 0) { log(' Nullifiers:'); for (const nullifier of effects.nullifiers) { - const [note] = await pxe.getIncomingNotes({ siloedNullifier: nullifier }); + const [note] = await pxe.getNotes({ siloedNullifier: nullifier }); const deployed = deployNullifiers[nullifier.toString()]; const initialized = initNullifiers[nullifier.toString()]; const registered = classNullifiers[nullifier.toString()]; diff --git a/yarn-project/end-to-end/src/e2e_2_pxes.test.ts b/yarn-project/end-to-end/src/e2e_2_pxes.test.ts index c5f7b3134d9c..5317a5ff336f 100644 --- a/yarn-project/end-to-end/src/e2e_2_pxes.test.ts +++ b/yarn-project/end-to-end/src/e2e_2_pxes.test.ts @@ -244,9 +244,9 @@ describe('e2e_2_pxes', () => { .send() .wait(); await testContract.methods.sync_notes().simulate(); - const incomingNotes = await walletA.getIncomingNotes({ txHash: receipt.txHash }); - expect(incomingNotes).toHaveLength(1); - note = incomingNotes[0]; + const notes = await walletA.getNotes({ txHash: receipt.txHash }); + expect(notes).toHaveLength(1); + note = notes[0]; } // 3. Nullify the note diff --git a/yarn-project/end-to-end/src/e2e_blacklist_token_contract/minting.test.ts b/yarn-project/end-to-end/src/e2e_blacklist_token_contract/minting.test.ts index 03aa384b6858..010eb706ef1a 100644 --- a/yarn-project/end-to-end/src/e2e_blacklist_token_contract/minting.test.ts +++ b/yarn-project/end-to-end/src/e2e_blacklist_token_contract/minting.test.ts @@ -98,9 +98,9 @@ describe('e2e_blacklist_token_contract mint', () => { // Trigger a note sync await asset.methods.sync_notes().simulate(); // 1 note should have been created containing `amount` of tokens - const visibleIncomingNotes = await wallets[0].getIncomingNotes({ txHash: receiptClaim.txHash }); - expect(visibleIncomingNotes.length).toBe(1); - expect(visibleIncomingNotes[0].note.items[0].toBigInt()).toBe(amount); + const visibleNotes = await wallets[0].getNotes({ txHash: receiptClaim.txHash }); + expect(visibleNotes.length).toBe(1); + expect(visibleNotes[0].note.items[0].toBigInt()).toBe(amount); }); }); diff --git a/yarn-project/end-to-end/src/e2e_crowdfunding_and_claim.test.ts b/yarn-project/end-to-end/src/e2e_crowdfunding_and_claim.test.ts index 8918c3eb74a0..a56390821d85 100644 --- a/yarn-project/end-to-end/src/e2e_crowdfunding_and_claim.test.ts +++ b/yarn-project/end-to-end/src/e2e_crowdfunding_and_claim.test.ts @@ -172,12 +172,12 @@ describe('e2e_crowdfunding_and_claim', () => { // Get the notes emitted by the Crowdfunding contract and check that only 1 was emitted (the value note) await crowdfundingContract.withWallet(donorWallets[0]).methods.sync_notes().simulate(); - const incomingNotes = await donorWallets[0].getIncomingNotes({ txHash: donateTxReceipt.txHash }); - const notes = incomingNotes.filter(x => x.contractAddress.equals(crowdfundingContract.address)); - expect(notes!.length).toEqual(1); + const notes = await donorWallets[0].getNotes({ txHash: donateTxReceipt.txHash }); + const filteredNotes = notes.filter(x => x.contractAddress.equals(crowdfundingContract.address)); + expect(filteredNotes!.length).toEqual(1); // Set the value note in a format which can be passed to claim function - valueNote = processUniqueNote(notes![0]); + valueNote = processUniqueNote(filteredNotes![0]); } // 3) We claim the reward token via the Claim contract @@ -243,12 +243,12 @@ describe('e2e_crowdfunding_and_claim', () => { // Get the notes emitted by the Crowdfunding contract and check that only 1 was emitted (the value note) await crowdfundingContract.withWallet(donorWallets[0]).methods.sync_notes().simulate(); - const incomingNotes = await donorWallets[0].getIncomingNotes({ txHash: donateTxReceipt.txHash }); - const notes = incomingNotes.filter(x => x.contractAddress.equals(crowdfundingContract.address)); - expect(notes!.length).toEqual(1); + const notes = await donorWallets[0].getNotes({ txHash: donateTxReceipt.txHash }); + const filtered = notes.filter(x => x.contractAddress.equals(crowdfundingContract.address)); + expect(filtered!.length).toEqual(1); // Set the value note in a format which can be passed to claim function - const anotherDonationNote = processUniqueNote(notes![0]); + const anotherDonationNote = processUniqueNote(filtered![0]); // We create an unrelated pxe and wallet without access to the nsk_app that correlates to the npk_m specified in the proof note. let unrelatedWallet: AccountWallet; @@ -299,9 +299,9 @@ describe('e2e_crowdfunding_and_claim', () => { { const receipt = await inclusionsProofsContract.methods.create_note(owner, 5n).send().wait({ debug: true }); await inclusionsProofsContract.methods.sync_notes().simulate(); - const incomingNotes = await wallets[0].getIncomingNotes({ txHash: receipt.txHash }); - expect(incomingNotes.length).toEqual(1); - note = processUniqueNote(incomingNotes[0]); + const notes = await wallets[0].getNotes({ txHash: receipt.txHash }); + expect(notes.length).toEqual(1); + note = processUniqueNote(notes[0]); } // 3) Test the note was included diff --git a/yarn-project/end-to-end/src/e2e_pending_note_hashes_contract.test.ts b/yarn-project/end-to-end/src/e2e_pending_note_hashes_contract.test.ts index eb0d5d8b964a..ebda8f38f1fb 100644 --- a/yarn-project/end-to-end/src/e2e_pending_note_hashes_contract.test.ts +++ b/yarn-project/end-to-end/src/e2e_pending_note_hashes_contract.test.ts @@ -294,8 +294,8 @@ describe('e2e_pending_note_hashes_contract', () => { await deployedContract.methods.sync_notes().simulate(); - const incomingNotes = await wallet.getIncomingNotes({ txHash: txReceipt.txHash }); + const notes = await wallet.getNotes({ txHash: txReceipt.txHash }); - expect(incomingNotes.length).toBe(1); + expect(notes.length).toBe(1); }); }); diff --git a/yarn-project/end-to-end/src/flakey_e2e_inclusion_proofs_contract.test.ts b/yarn-project/end-to-end/src/flakey_e2e_inclusion_proofs_contract.test.ts index 7fc07cea2623..b93218fbd606 100644 --- a/yarn-project/end-to-end/src/flakey_e2e_inclusion_proofs_contract.test.ts +++ b/yarn-project/end-to-end/src/flakey_e2e_inclusion_proofs_contract.test.ts @@ -53,7 +53,7 @@ describe('e2e_inclusion_proofs_contract', () => { describe('proves note existence and its nullifier non-existence and nullifier non-existence failure case', () => { // Owner of a note let noteCreationBlockNumber: number; - let noteHashes, visibleIncomingNotes: ExtendedNote[]; + let noteHashes, visibleNotes: ExtendedNote[]; const value = 100n; let validNoteBlockNumber: any; @@ -65,13 +65,13 @@ describe('e2e_inclusion_proofs_contract', () => { ({ noteHashes } = receipt.debugInfo!); await contract.methods.sync_notes().simulate(); - visibleIncomingNotes = await wallets[0].getIncomingNotes({ txHash: receipt.txHash }); + visibleNotes = await wallets[0].getNotes({ txHash: receipt.txHash }); }); it('should return the correct values for creating a note', () => { expect(noteHashes.length).toBe(1); - expect(visibleIncomingNotes.length).toBe(1); - const [receivedValue, receivedOwner, _randomness] = visibleIncomingNotes[0].note.items; + expect(visibleNotes.length).toBe(1); + const [receivedValue, receivedOwner, _randomness] = visibleNotes[0].note.items; expect(receivedValue.toBigInt()).toBe(value); expect(receivedOwner).toEqual(owner.toField()); }); @@ -161,11 +161,11 @@ describe('e2e_inclusion_proofs_contract', () => { const { noteHashes } = receipt.debugInfo!; await contract.methods.sync_notes().simulate(); - const visibleIncomingNotes = await wallets[0].getIncomingNotes({ txHash: receipt.txHash }); + const visibleNotes = await wallets[0].getNotes({ txHash: receipt.txHash }); expect(noteHashes.length).toBe(1); - expect(visibleIncomingNotes.length).toBe(1); - const [receivedValue, receivedOwner, _randomness] = visibleIncomingNotes[0].note.items; + expect(visibleNotes.length).toBe(1); + const [receivedValue, receivedOwner, _randomness] = visibleNotes[0].note.items; expect(receivedValue.toBigInt()).toBe(value); expect(receivedOwner).toEqual(owner.toField()); } diff --git a/yarn-project/end-to-end/src/guides/dapp_testing.test.ts b/yarn-project/end-to-end/src/guides/dapp_testing.test.ts index 6364517d2231..d9cbf1f3553f 100644 --- a/yarn-project/end-to-end/src/guides/dapp_testing.test.ts +++ b/yarn-project/end-to-end/src/guides/dapp_testing.test.ts @@ -107,7 +107,7 @@ describe('guides/dapp/testing', () => { it('checks private storage', async () => { // docs:start:private-storage await token.methods.sync_notes().simulate(); - const notes = await pxe.getIncomingNotes({ + const notes = await pxe.getNotes({ owner: owner.getAddress(), contractAddress: token.address, storageSlot: ownerSlot, diff --git a/yarn-project/pxe/src/database/incoming_note_dao.test.ts b/yarn-project/pxe/src/database/incoming_note_dao.test.ts deleted file mode 100644 index 1df9103e08fe..000000000000 --- a/yarn-project/pxe/src/database/incoming_note_dao.test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { IncomingNoteDao } from './incoming_note_dao.js'; - -describe('Incoming Note DAO', () => { - it('convert to and from buffer', () => { - const note = IncomingNoteDao.random(); - const buf = note.toBuffer(); - expect(IncomingNoteDao.fromBuffer(buf)).toEqual(note); - }); -}); diff --git a/yarn-project/pxe/src/database/kv_pxe_database.ts b/yarn-project/pxe/src/database/kv_pxe_database.ts index ebf1c07991cd..ccff64cb2291 100644 --- a/yarn-project/pxe/src/database/kv_pxe_database.ts +++ b/yarn-project/pxe/src/database/kv_pxe_database.ts @@ -1,4 +1,4 @@ -import { type InBlock, type IncomingNotesFilter, MerkleTreeId, NoteStatus } from '@aztec/circuit-types'; +import { type InBlock, MerkleTreeId, NoteStatus, type NotesFilter } from '@aztec/circuit-types'; import { AztecAddress, BlockHeader, @@ -22,7 +22,7 @@ import { } from '@aztec/kv-store'; import { contractArtifactFromBuffer, contractArtifactToBuffer } from '@aztec/types/abi'; -import { IncomingNoteDao } from './incoming_note_dao.js'; +import { NoteDao } from './note_dao.js'; import { type PxeDatabase } from './pxe_database.js'; /** @@ -185,17 +185,17 @@ export class KVPxeDatabase implements PxeDatabase { return val?.map(b => Fr.fromBuffer(b)); } - async addNote(note: IncomingNoteDao, scope?: AztecAddress): Promise { + async addNote(note: NoteDao, scope?: AztecAddress): Promise { await this.addNotes([note], scope); } - async addNotes(incomingNotes: IncomingNoteDao[], scope: AztecAddress = AztecAddress.ZERO): Promise { + async addNotes(notes: NoteDao[], scope: AztecAddress = AztecAddress.ZERO): Promise { if (!(await this.#scopes.hasAsync(scope.toString()))) { await this.#addScope(scope); } return this.db.transactionAsync(async () => { - for (const dao of incomingNotes) { + for (const dao of notes) { // store notes by their index in the notes hash tree // this provides the uniqueness we need to store individual notes // and should also return notes in the order that they were created. @@ -217,7 +217,7 @@ export class KVPxeDatabase implements PxeDatabase { return this.db.transactionAsync(async () => { const notes = await toArray(this.#notes.valuesAsync()); for (const note of notes) { - const noteDao = IncomingNoteDao.fromBuffer(note); + const noteDao = NoteDao.fromBuffer(note); if (noteDao.l2BlockNumber > blockNumber) { const noteIndex = toBufferBE(noteDao.index, 32).toString('hex'); await this.#notes.delete(noteIndex); @@ -252,7 +252,7 @@ export class KVPxeDatabase implements PxeDatabase { ); const noteDaos = nullifiedNoteBuffers .filter(buffer => buffer != undefined) - .map(buffer => IncomingNoteDao.fromBuffer(buffer!)); + .map(buffer => NoteDao.fromBuffer(buffer!)); await this.db.transactionAsync(async () => { for (const dao of noteDaos) { @@ -286,7 +286,7 @@ export class KVPxeDatabase implements PxeDatabase { }); } - async getIncomingNotes(filter: IncomingNotesFilter): Promise { + async getNotes(filter: NotesFilter): Promise { const publicKey: PublicKey | undefined = filter.owner ? filter.owner.toAddressPoint() : undefined; filter.status = filter.status ?? NoteStatus.ACTIVE; @@ -348,7 +348,7 @@ export class KVPxeDatabase implements PxeDatabase { }); } - const result: IncomingNoteDao[] = []; + const result: NoteDao[] = []; for (const { ids, notes } of candidateNoteSources) { for (const id of ids) { const serializedNote = await notes.getAsync(id); @@ -356,7 +356,7 @@ export class KVPxeDatabase implements PxeDatabase { continue; } - const note = IncomingNoteDao.fromBuffer(serializedNote); + const note = NoteDao.fromBuffer(serializedNote); if (filter.contractAddress && !note.contractAddress.equals(filter.contractAddress)) { continue; } @@ -384,13 +384,13 @@ export class KVPxeDatabase implements PxeDatabase { return result; } - removeNullifiedNotes(nullifiers: InBlock[], accountAddressPoint: PublicKey): Promise { + removeNullifiedNotes(nullifiers: InBlock[], accountAddressPoint: PublicKey): Promise { if (nullifiers.length === 0) { return Promise.resolve([]); } return this.db.transactionAsync(async () => { - const nullifiedNotes: IncomingNoteDao[] = []; + const nullifiedNotes: NoteDao[] = []; for (const blockScopedNullifier of nullifiers) { const { data: nullifier, l2BlockNumber: blockNumber } = blockScopedNullifier; @@ -406,7 +406,7 @@ export class KVPxeDatabase implements PxeDatabase { continue; } const noteScopes = (await toArray(this.#notesToScope.getValuesAsync(noteIndex))) ?? []; - const note = IncomingNoteDao.fromBuffer(noteBuffer); + const note = NoteDao.fromBuffer(noteBuffer); if (!note.addressPoint.equals(accountAddressPoint)) { // tried to nullify someone else's note continue; @@ -445,7 +445,7 @@ export class KVPxeDatabase implements PxeDatabase { }); } - async addNullifiedNote(note: IncomingNoteDao): Promise { + async addNullifiedNote(note: NoteDao): Promise { const noteIndex = toBufferBE(note.index, 32).toString('hex'); await this.#nullifiedNotes.set(noteIndex, note.toBuffer()); @@ -563,7 +563,7 @@ export class KVPxeDatabase implements PxeDatabase { } async estimateSize(): Promise { - const incomingNotesSize = (await this.getIncomingNotes({})).reduce((sum, note) => sum + note.getSize(), 0); + const noteSize = (await this.getNotes({})).reduce((sum, note) => sum + note.getSize(), 0); const authWitsSize = (await toArray(this.#authWitnesses.valuesAsync())).reduce( (sum, value) => sum + value.length * Fr.SIZE_IN_BYTES, @@ -572,7 +572,7 @@ export class KVPxeDatabase implements PxeDatabase { const addressesSize = (await this.#completeAddresses.lengthAsync()) * CompleteAddress.SIZE_IN_BYTES; const treeRootsSize = Object.keys(MerkleTreeId).length * Fr.SIZE_IN_BYTES; - return incomingNotesSize + treeRootsSize + authWitsSize + addressesSize; + return noteSize + treeRootsSize + authWitsSize + addressesSize; } async setTaggingSecretsIndexesAsSender(indexedSecrets: IndexedTaggingSecret[]): Promise { diff --git a/yarn-project/pxe/src/database/note_dao.test.ts b/yarn-project/pxe/src/database/note_dao.test.ts new file mode 100644 index 000000000000..599519e310dc --- /dev/null +++ b/yarn-project/pxe/src/database/note_dao.test.ts @@ -0,0 +1,9 @@ +import { NoteDao } from './note_dao.js'; + +describe('Note DAO', () => { + it('convert to and from buffer', () => { + const note = NoteDao.random(); + const buf = note.toBuffer(); + expect(NoteDao.fromBuffer(buf)).toEqual(note); + }); +}); diff --git a/yarn-project/pxe/src/database/incoming_note_dao.ts b/yarn-project/pxe/src/database/note_dao.ts similarity index 70% rename from yarn-project/pxe/src/database/incoming_note_dao.ts rename to yarn-project/pxe/src/database/note_dao.ts index 93464386ec9c..b4cb311fd46f 100644 --- a/yarn-project/pxe/src/database/incoming_note_dao.ts +++ b/yarn-project/pxe/src/database/note_dao.ts @@ -8,40 +8,57 @@ import { type NoteData } from '@aztec/simulator/acvm'; import { type NoteInfo } from '../note_decryption_utils/index.js'; /** - * A note with contextual data which was decrypted as incoming. + * A Note Data Access Object, representing a note that was comitted to the note hash tree, holding all of the + * information required to use it during execution and manage its state. */ -export class IncomingNoteDao implements NoteData { +export class NoteDao implements NoteData { constructor( - /** The note as emitted from the Noir contract. */ + // Note information + + /** The serialized content of the note, as will be returned in the getNotes oracle. */ public note: Note, - /** The contract address this note is created in. */ + /** The address of the contract that created the note (i.e. the address used by the kernel during siloing). */ public contractAddress: AztecAddress, - /** The specific storage location of the note on the contract. */ + /** + * The storage location of the note. This value is not used for anything in PXE, but we do index by storage slot + * since contracts typically make queries based on it. + * */ public storageSlot: Fr, - /** The note type identifier for the contract. */ - public noteTypeId: NoteSelector, - /** The hash of the tx the note was created in. */ - public txHash: TxHash, - /** The L2 block number in which the tx with this note was included. */ - public l2BlockNumber: number, - /** The L2 block hash in which the tx with this note was included. */ - public l2BlockHash: string, - /** The nonce of the note. */ + /** The kernel-provided nonce of the note, required to compute the uniqueNoteHash. */ public nonce: Fr, + + // Computed values /** - * A hash of the note. This is customizable by the app circuit. - * We can use this value to compute siloedNoteHash and uniqueSiloedNoteHash. + * The inner hash (non-unique, non-siloed) of the note. Each contract determines how the note content is hashed. Can + * be used alongside contractAddress and nonce to compute the uniqueNoteHash and the siloedNoteHash. */ public noteHash: Fr, /** - * The nullifier of the note (siloed by contract address). + * The nullifier of the note, siloed by contract address. * Note: Might be set as 0 if the note was added to PXE as nullified. */ public siloedNullifier: Fr, - /** The location of the relevant note in the note hash tree. */ + + // Metadata + /** The hash of the tx in which this note was created. Knowing the tx hash allows for efficient node queries e.g. + * when searching for txEffects. + */ + public txHash: TxHash, + /** The L2 block number in which the tx with this note was included. Used for note management while processing + * reorgs.*/ + public l2BlockNumber: number, + /** The L2 block hash in which the tx with this note was included. Used for note management while processing + * reorgs.*/ + public l2BlockHash: string, + /** The index of the leaf in the global note hash tree the note is stored at */ public index: bigint, - /** The public key with which the note was encrypted. */ + /** The public key with which the note content was encrypted during delivery. */ public addressPoint: PublicKey, + + /** The note type identifier for the contract. + * TODO: remove + */ + public noteTypeId: NoteSelector, ) {} static fromPayloadAndNoteInfo( @@ -54,19 +71,19 @@ export class IncomingNoteDao implements NoteData { addressPoint: PublicKey, ) { const noteHashIndexInTheWholeTree = BigInt(dataStartIndexForTx + noteInfo.noteHashIndex); - return new IncomingNoteDao( + return new NoteDao( note, payload.contractAddress, payload.storageSlot, - payload.noteTypeId, - noteInfo.txHash, - l2BlockNumber, - l2BlockHash, noteInfo.nonce, noteInfo.noteHash, noteInfo.siloedNullifier, + noteInfo.txHash, + l2BlockNumber, + l2BlockHash, noteHashIndexInTheWholeTree, addressPoint, + payload.noteTypeId, ); } @@ -75,15 +92,15 @@ export class IncomingNoteDao implements NoteData { this.note, this.contractAddress, this.storageSlot, - this.noteTypeId, - this.txHash, - this.l2BlockNumber, - Fr.fromHexString(this.l2BlockHash), this.nonce, this.noteHash, this.siloedNullifier, + this.txHash, + this.l2BlockNumber, + Fr.fromHexString(this.l2BlockHash), this.index, this.addressPoint, + this.noteTypeId, ]); } @@ -93,29 +110,29 @@ export class IncomingNoteDao implements NoteData { const note = Note.fromBuffer(reader); const contractAddress = AztecAddress.fromBuffer(reader); const storageSlot = Fr.fromBuffer(reader); - const noteTypeId = reader.readObject(NoteSelector); - const txHash = reader.readObject(TxHash); - const l2BlockNumber = reader.readNumber(); - const l2BlockHash = Fr.fromBuffer(reader).toString(); const nonce = Fr.fromBuffer(reader); const noteHash = Fr.fromBuffer(reader); const siloedNullifier = Fr.fromBuffer(reader); + const txHash = reader.readObject(TxHash); + const l2BlockNumber = reader.readNumber(); + const l2BlockHash = Fr.fromBuffer(reader).toString(); const index = toBigIntBE(reader.readBytes(32)); const publicKey = Point.fromBuffer(reader); + const noteTypeId = reader.readObject(NoteSelector); - return new IncomingNoteDao( + return new NoteDao( note, contractAddress, storageSlot, - noteTypeId, - txHash, - l2BlockNumber, - l2BlockHash, nonce, noteHash, siloedNullifier, + txHash, + l2BlockNumber, + l2BlockHash, index, publicKey, + noteTypeId, ); } @@ -125,7 +142,7 @@ export class IncomingNoteDao implements NoteData { static fromString(str: string) { const hex = str.replace(/^0x/, ''); - return IncomingNoteDao.fromBuffer(Buffer.from(hex, 'hex')); + return NoteDao.fromBuffer(Buffer.from(hex, 'hex')); } /** @@ -141,30 +158,30 @@ export class IncomingNoteDao implements NoteData { static random({ note = Note.random(), contractAddress = AztecAddress.random(), - txHash = randomTxHash(), storageSlot = Fr.random(), - noteTypeId = NoteSelector.random(), nonce = Fr.random(), - l2BlockNumber = Math.floor(Math.random() * 1000), - l2BlockHash = Fr.random().toString(), noteHash = Fr.random(), siloedNullifier = Fr.random(), + txHash = randomTxHash(), + l2BlockNumber = Math.floor(Math.random() * 1000), + l2BlockHash = Fr.random().toString(), index = Fr.random().toBigInt(), addressPoint = Point.random(), - }: Partial = {}) { - return new IncomingNoteDao( + noteTypeId = NoteSelector.random(), + }: Partial = {}) { + return new NoteDao( note, contractAddress, storageSlot, - noteTypeId, - txHash, - l2BlockNumber, - l2BlockHash, nonce, noteHash, siloedNullifier, + txHash, + l2BlockNumber, + l2BlockHash, index, addressPoint, + noteTypeId, ); } } diff --git a/yarn-project/pxe/src/database/outgoing_note_dao.test.ts b/yarn-project/pxe/src/database/outgoing_note_dao.test.ts deleted file mode 100644 index 0c293ba13ebf..000000000000 --- a/yarn-project/pxe/src/database/outgoing_note_dao.test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { OutgoingNoteDao } from './outgoing_note_dao.js'; - -describe('Outgoing Note DAO', () => { - it('convert to and from buffer', () => { - const note = OutgoingNoteDao.random(); - const buf = note.toBuffer(); - expect(OutgoingNoteDao.fromBuffer(buf)).toEqual(note); - }); -}); diff --git a/yarn-project/pxe/src/database/pxe_database.ts b/yarn-project/pxe/src/database/pxe_database.ts index 6926b2c02afe..8a8b2f8cd61a 100644 --- a/yarn-project/pxe/src/database/pxe_database.ts +++ b/yarn-project/pxe/src/database/pxe_database.ts @@ -1,4 +1,4 @@ -import { type InBlock, type IncomingNotesFilter } from '@aztec/circuit-types'; +import { type InBlock, type NotesFilter } from '@aztec/circuit-types'; import { type BlockHeader, type CompleteAddress, @@ -12,7 +12,7 @@ import { type Fr } from '@aztec/foundation/fields'; import { type ContractArtifactDatabase } from './contracts/contract_artifact_db.js'; import { type ContractInstanceDatabase } from './contracts/contract_instance_db.js'; -import { type IncomingNoteDao } from './incoming_note_dao.js'; +import { type NoteDao } from './note_dao.js'; /** * A database interface that provides methods for retrieving, adding, and removing transactional data related to Aztec @@ -50,11 +50,11 @@ export interface PxeDatabase extends ContractArtifactDatabase, ContractInstanceD popCapsule(): Promise; /** - * Gets incoming notes based on the provided filter. + * Gets notes based on the provided filter. * @param filter - The filter to apply to the notes. * @returns The requested notes. */ - getIncomingNotes(filter: IncomingNotesFilter): Promise; + getNotes(filter: NotesFilter): Promise; /** * Adds a note to DB. @@ -62,24 +62,24 @@ export interface PxeDatabase extends ContractArtifactDatabase, ContractInstanceD * @param scope - The scope to add the note under. Currently optional. * @remark - Will create a database for the scope if it does not already exist. */ - addNote(note: IncomingNoteDao, scope?: AztecAddress): Promise; + addNote(note: NoteDao, scope?: AztecAddress): Promise; /** * Adds a nullified note to DB. * @param note - The note to add. */ - addNullifiedNote(note: IncomingNoteDao): Promise; + addNullifiedNote(note: NoteDao): Promise; /** * Adds an array of notes to DB. * This function is used to insert multiple notes to the database at once, * which can improve performance when dealing with large numbers of transactions. * - * @param incomingNotes - An array of notes which were decrypted as incoming. + * @param notes - An array of notes. * @param scope - The scope to add the notes under. Currently optional. * @remark - Will create a database for the scope if it does not already exist. */ - addNotes(incomingNotes: IncomingNoteDao[], scope?: AztecAddress): Promise; + addNotes(notes: NoteDao[], scope?: AztecAddress): Promise; /** * Remove nullified notes associated with the given account and nullifiers. @@ -88,7 +88,7 @@ export interface PxeDatabase extends ContractArtifactDatabase, ContractInstanceD * @param account - A PublicKey instance representing the account for which the records are being removed. * @returns Removed notes. */ - removeNullifiedNotes(nullifiers: InBlock[], account: PublicKey): Promise; + removeNullifiedNotes(nullifiers: InBlock[], account: PublicKey): Promise; /** * Gets the most recently processed block number. diff --git a/yarn-project/pxe/src/database/pxe_database_test_suite.ts b/yarn-project/pxe/src/database/pxe_database_test_suite.ts index ac14fa97c539..78c7cf2f110d 100644 --- a/yarn-project/pxe/src/database/pxe_database_test_suite.ts +++ b/yarn-project/pxe/src/database/pxe_database_test_suite.ts @@ -1,4 +1,4 @@ -import { type IncomingNotesFilter, NoteStatus, randomTxHash } from '@aztec/circuit-types'; +import { NoteStatus, type NotesFilter, randomTxHash } from '@aztec/circuit-types'; import { AztecAddress, CompleteAddress, @@ -13,7 +13,7 @@ import { Fr, Point } from '@aztec/foundation/fields'; import { BenchmarkingContractArtifact } from '@aztec/noir-contracts.js/Benchmarking'; import { TestContractArtifact } from '@aztec/noir-contracts.js/Test'; -import { IncomingNoteDao } from './incoming_note_dao.js'; +import { NoteDao } from './note_dao.js'; import { type PxeDatabase } from './pxe_database.js'; /** @@ -78,9 +78,9 @@ export function describePxeDatabase(getDatabase: () => PxeDatabase) { let owners: CompleteAddress[]; let contractAddresses: AztecAddress[]; let storageSlots: Fr[]; - let notes: IncomingNoteDao[]; + let notes: NoteDao[]; - const filteringTests: [() => IncomingNotesFilter, () => IncomingNoteDao[]][] = [ + const filteringTests: [() => NotesFilter, () => NoteDao[]][] = [ [() => ({}), () => notes], [ @@ -119,7 +119,7 @@ export function describePxeDatabase(getDatabase: () => PxeDatabase) { storageSlots = Array.from({ length: 2 }).map(() => Fr.random()); notes = Array.from({ length: 10 }).map((_, i) => - IncomingNoteDao.random({ + NoteDao.random({ contractAddress: contractAddresses[i % contractAddresses.length], storageSlot: storageSlots[i % storageSlots.length], addressPoint: owners[i % owners.length].address.toAddressPoint(), @@ -135,7 +135,7 @@ export function describePxeDatabase(getDatabase: () => PxeDatabase) { it.each(filteringTests)('stores notes in bulk and retrieves notes', async (getFilter, getExpected) => { await database.addNotes(notes); - const returnedNotes = await database.getIncomingNotes(getFilter()); + const returnedNotes = await database.getNotes(getFilter()); expect(returnedNotes.sort()).toEqual(getExpected().sort()); }); @@ -145,7 +145,7 @@ export function describePxeDatabase(getDatabase: () => PxeDatabase) { await database.addNote(note); } - const returnedNotes = await database.getIncomingNotes(getFilter()); + const returnedNotes = await database.getNotes(getFilter()); expect(returnedNotes.sort()).toEqual(getExpected().sort()); }); @@ -166,9 +166,9 @@ export function describePxeDatabase(getDatabase: () => PxeDatabase) { ); } - await expect( - database.getIncomingNotes({ ...getFilter(), status: NoteStatus.ACTIVE_OR_NULLIFIED }), - ).resolves.toEqual(getExpected()); + await expect(database.getNotes({ ...getFilter(), status: NoteStatus.ACTIVE_OR_NULLIFIED })).resolves.toEqual( + getExpected(), + ); }); it('skips nullified notes by default or when requesting active', async () => { @@ -184,8 +184,8 @@ export function describePxeDatabase(getDatabase: () => PxeDatabase) { notesToNullify, ); - const actualNotesWithDefault = await database.getIncomingNotes({}); - const actualNotesWithActive = await database.getIncomingNotes({ status: NoteStatus.ACTIVE }); + const actualNotesWithDefault = await database.getNotes({}); + const actualNotesWithActive = await database.getNotes({ status: NoteStatus.ACTIVE }); expect(actualNotesWithDefault).toEqual(actualNotesWithActive); expect(actualNotesWithActive).toEqual(notes.filter(note => !notesToNullify.includes(note))); @@ -206,7 +206,7 @@ export function describePxeDatabase(getDatabase: () => PxeDatabase) { ); await expect(database.unnullifyNotesAfter(98)).resolves.toEqual(undefined); - const result = await database.getIncomingNotes({ status: NoteStatus.ACTIVE, owner: owners[0].address }); + const result = await database.getNotes({ status: NoteStatus.ACTIVE, owner: owners[0].address }); expect(result.sort()).toEqual([...notesToNullify].sort()); }); @@ -224,7 +224,7 @@ export function describePxeDatabase(getDatabase: () => PxeDatabase) { notesToNullify, ); - const result = await database.getIncomingNotes({ + const result = await database.getNotes({ status: NoteStatus.ACTIVE_OR_NULLIFIED, }); @@ -242,23 +242,23 @@ export function describePxeDatabase(getDatabase: () => PxeDatabase) { await database.addNote(note, owners[1].address); } - const owner0IncomingNotes = await database.getIncomingNotes({ + const owner0Notes = await database.getNotes({ scopes: [owners[0].address], }); - expect(owner0IncomingNotes.sort()).toEqual(notes.slice(0, 5).sort()); + expect(owner0Notes.sort()).toEqual(notes.slice(0, 5).sort()); - const owner1IncomingNotes = await database.getIncomingNotes({ + const owner1Notes = await database.getNotes({ scopes: [owners[1].address], }); - expect(owner1IncomingNotes.sort()).toEqual(notes.slice(5).sort()); + expect(owner1Notes.sort()).toEqual(notes.slice(5).sort()); - const bothOwnerIncomingNotes = await database.getIncomingNotes({ + const bothOwnerNotes = await database.getNotes({ scopes: [owners[0].address, owners[1].address], }); - expect(bothOwnerIncomingNotes.sort()).toEqual(notes.sort()); + expect(bothOwnerNotes.sort()).toEqual(notes.sort()); }); it('a nullified note removes notes from all accounts in the pxe', async () => { @@ -266,12 +266,12 @@ export function describePxeDatabase(getDatabase: () => PxeDatabase) { await database.addNote(notes[0], owners[1].address); await expect( - database.getIncomingNotes({ + database.getNotes({ scopes: [owners[0].address], }), ).resolves.toEqual([notes[0]]); await expect( - database.getIncomingNotes({ + database.getNotes({ scopes: [owners[1].address], }), ).resolves.toEqual([notes[0]]); @@ -290,12 +290,12 @@ export function describePxeDatabase(getDatabase: () => PxeDatabase) { ).resolves.toEqual([notes[0]]); await expect( - database.getIncomingNotes({ + database.getNotes({ scopes: [owners[0].address], }), ).resolves.toEqual([]); await expect( - database.getIncomingNotes({ + database.getNotes({ scopes: [owners[1].address], }), ).resolves.toEqual([]); @@ -305,7 +305,7 @@ export function describePxeDatabase(getDatabase: () => PxeDatabase) { await database.addNotes(notes, owners[0].address); await database.removeNotesAfter(5); - const result = await database.getIncomingNotes({ scopes: [owners[0].address] }); + const result = await database.getNotes({ scopes: [owners[0].address] }); expect(new Set(result)).toEqual(new Set(notes.slice(0, 6))); }); }); diff --git a/yarn-project/pxe/src/note_decryption_utils/produce_note_daos.ts b/yarn-project/pxe/src/note_decryption_utils/produce_note_daos.ts index ca05f03cfa82..7e1f94abe03d 100644 --- a/yarn-project/pxe/src/note_decryption_utils/produce_note_daos.ts +++ b/yarn-project/pxe/src/note_decryption_utils/produce_note_daos.ts @@ -3,7 +3,7 @@ import { type Fr } from '@aztec/foundation/fields'; import { type Logger } from '@aztec/foundation/log'; import { type AcirSimulator } from '@aztec/simulator/client'; -import { IncomingNoteDao } from '../database/incoming_note_dao.js'; +import { NoteDao } from '../database/note_dao.js'; import { type PxeDatabase } from '../database/pxe_database.js'; import { produceNoteDaosForKey } from './produce_note_daos_for_key.js'; @@ -37,15 +37,15 @@ export async function produceNoteDaos( dataStartIndexForTx: number, excludedIndices: Set, logger: Logger, -): Promise<{ incomingNote: IncomingNoteDao | undefined }> { +): Promise<{ note: NoteDao | undefined }> { if (!addressPoint) { throw new Error('addressPoint is undefined. Cannot create note.'); } - let incomingNote: IncomingNoteDao | undefined; + let note: NoteDao | undefined; if (addressPoint) { - incomingNote = await produceNoteDaosForKey( + note = await produceNoteDaosForKey( simulator, db, addressPoint, @@ -57,11 +57,11 @@ export async function produceNoteDaos( dataStartIndexForTx, excludedIndices, logger, - IncomingNoteDao.fromPayloadAndNoteInfo, + NoteDao.fromPayloadAndNoteInfo, ); } return { - incomingNote, + note, }; } diff --git a/yarn-project/pxe/src/pxe_service/pxe_service.ts b/yarn-project/pxe/src/pxe_service/pxe_service.ts index 4bf9f3bccf56..b57ea54df95b 100644 --- a/yarn-project/pxe/src/pxe_service/pxe_service.ts +++ b/yarn-project/pxe/src/pxe_service/pxe_service.ts @@ -7,11 +7,11 @@ import { type FunctionCall, type GetUnencryptedLogsResponse, type InBlock, - type IncomingNotesFilter, L1EventPayload, type L2Block, type LogFilter, MerkleTreeId, + type NotesFilter, type PXE, type PXEInfo, type PrivateExecutionResult, @@ -71,8 +71,8 @@ import { inspect } from 'util'; import { type PXEServiceConfig } from '../config/index.js'; import { getPackageInfo } from '../config/package_info.js'; import { ContractDataOracle } from '../contract_data_oracle/index.js'; -import { IncomingNoteDao } from '../database/incoming_note_dao.js'; import { type PxeDatabase } from '../database/index.js'; +import { NoteDao } from '../database/note_dao.js'; import { KernelOracle } from '../kernel_oracle/index.js'; import { KernelProver } from '../kernel_prover/kernel_prover.js'; import { TestPrivateKernelProver } from '../kernel_prover/test/test_circuit_prover.js'; @@ -273,8 +273,8 @@ export class PXEService implements PXE { return await this.node.getPublicStorageAt(contract, slot, 'latest'); } - public async getIncomingNotes(filter: IncomingNotesFilter): Promise { - const noteDaos = await this.db.getIncomingNotes(filter); + public async getNotes(filter: NotesFilter): Promise { + const noteDaos = await this.db.getNotes(filter); const extendedNotes = noteDaos.map(async dao => { let owner = filter.owner; @@ -343,19 +343,19 @@ export class PXEService implements PXE { } await this.db.addNote( - new IncomingNoteDao( + new NoteDao( note.note, note.contractAddress, note.storageSlot, - note.noteTypeId, - note.txHash, - l2BlockNumber, - l2BlockHash, nonce, noteHash, siloedNullifier, + note.txHash, + l2BlockNumber, + l2BlockHash, index, owner.address.toAddressPoint(), + note.noteTypeId, ), scope, ); @@ -388,19 +388,19 @@ export class PXEService implements PXE { } await this.db.addNullifiedNote( - new IncomingNoteDao( + new NoteDao( note.note, note.contractAddress, note.storageSlot, - note.noteTypeId, - note.txHash, - l2BlockNumber, - l2BlockHash, nonce, noteHash, Fr.ZERO, // We are not able to derive + note.txHash, + l2BlockNumber, + l2BlockHash, index, note.owner.toAddressPoint(), + note.noteTypeId, ), ); } diff --git a/yarn-project/pxe/src/simulator_oracle/index.ts b/yarn-project/pxe/src/simulator_oracle/index.ts index f19f840a3439..137b4137d955 100644 --- a/yarn-project/pxe/src/simulator_oracle/index.ts +++ b/yarn-project/pxe/src/simulator_oracle/index.ts @@ -34,8 +34,8 @@ import { MessageLoadOracleInputs } from '@aztec/simulator/acvm'; import { type AcirSimulator, type DBOracle } from '@aztec/simulator/client'; import { type ContractDataOracle } from '../contract_data_oracle/index.js'; -import { type IncomingNoteDao } from '../database/incoming_note_dao.js'; import { type PxeDatabase } from '../database/index.js'; +import { type NoteDao } from '../database/note_dao.js'; import { produceNoteDaos } from '../note_decryption_utils/produce_note_daos.js'; import { getAcirSimulator } from '../simulator/index.js'; import { WINDOW_HALF_SIZE, getIndexedTaggingSecretsForTheWindow, getInitialIndexesMap } from './tagging_utils.js'; @@ -92,7 +92,7 @@ export class SimulatorOracle implements DBOracle { } async getNotes(contractAddress: AztecAddress, storageSlot: Fr, status: NoteStatus, scopes?: AztecAddress[]) { - const noteDaos = await this.db.getIncomingNotes({ + const noteDaos = await this.db.getNotes({ contractAddress, storageSlot, status, @@ -569,17 +569,17 @@ export class SimulatorOracle implements DBOracle { // Since we could have notes with the same index for different txs, we need // to keep track of them scoping by txHash const excludedIndices: Map> = new Map(); - const incomingNotes: IncomingNoteDao[] = []; + const notes: NoteDao[] = []; const txEffectsCache = new Map | undefined>(); for (const scopedLog of scopedLogs) { - const incomingNotePayload = scopedLog.isFromPublic + const notePayload = scopedLog.isFromPublic ? L1NotePayload.decryptAsIncomingFromPublic(scopedLog.logData, addressSecret) : L1NotePayload.decryptAsIncoming(PrivateLog.fromBuffer(scopedLog.logData), addressSecret); - if (incomingNotePayload) { - const payload = incomingNotePayload; + if (notePayload) { + const payload = notePayload; const txEffect = txEffectsCache.get(scopedLog.txHash.toString()) ?? (await this.aztecNode.getTxEffect(scopedLog.txHash)); @@ -594,13 +594,13 @@ export class SimulatorOracle implements DBOracle { if (!excludedIndices.has(scopedLog.txHash.toString())) { excludedIndices.set(scopedLog.txHash.toString(), new Set()); } - const { incomingNote } = await produceNoteDaos( + const { note } = await produceNoteDaos( // I don't like this at all, but we need a simulator to run `computeNoteHashAndOptionallyANullifier`. This generates // a chicken-and-egg problem due to this oracle requiring a simulator, which in turn requires this oracle. Furthermore, since jest doesn't allow // mocking ESM exports, we have to pollute the method even more by providing a simulator parameter so tests can inject a fake one. simulator ?? getAcirSimulator(this.db, this.aztecNode, this.keyStore, this.contractDataOracle), this.db, - incomingNotePayload ? recipient.toAddressPoint() : undefined, + notePayload ? recipient.toAddressPoint() : undefined, payload!, txEffect.data.txHash, txEffect.l2BlockNumber, @@ -611,12 +611,12 @@ export class SimulatorOracle implements DBOracle { this.log, ); - if (incomingNote) { - incomingNotes.push(incomingNote); + if (note) { + notes.push(note); } } } - return { incomingNotes }; + return { notes }; } /** @@ -629,10 +629,10 @@ export class SimulatorOracle implements DBOracle { recipient: AztecAddress, simulator?: AcirSimulator, ): Promise { - const { incomingNotes } = await this.#decryptTaggedLogs(logs, recipient, simulator); - if (incomingNotes.length) { - await this.db.addNotes(incomingNotes, recipient); - incomingNotes.forEach(noteDao => { + const { notes } = await this.#decryptTaggedLogs(logs, recipient, simulator); + if (notes.length) { + await this.db.addNotes(notes, recipient); + notes.forEach(noteDao => { this.log.verbose(`Added incoming note for contract ${noteDao.contractAddress} at slot ${noteDao.storageSlot}`, { contract: noteDao.contractAddress, slot: noteDao.storageSlot, @@ -644,7 +644,7 @@ export class SimulatorOracle implements DBOracle { public async removeNullifiedNotes(contractAddress: AztecAddress) { for (const recipient of await this.keyStore.getAccounts()) { - const currentNotesForRecipient = await this.db.getIncomingNotes({ contractAddress, owner: recipient }); + const currentNotesForRecipient = await this.db.getNotes({ contractAddress, owner: recipient }); const nullifiersToCheck = currentNotesForRecipient.map(note => note.siloedNullifier); const nullifierIndexes = await this.aztecNode.findNullifiersIndexesWithBlock('latest', nullifiersToCheck); diff --git a/yarn-project/pxe/src/simulator_oracle/simulator_oracle.test.ts b/yarn-project/pxe/src/simulator_oracle/simulator_oracle.test.ts index e70072687536..e4e95f0ada55 100644 --- a/yarn-project/pxe/src/simulator_oracle/simulator_oracle.test.ts +++ b/yarn-project/pxe/src/simulator_oracle/simulator_oracle.test.ts @@ -32,9 +32,9 @@ import { jest } from '@jest/globals'; import { type MockProxy, mock } from 'jest-mock-extended'; import times from 'lodash.times'; -import { type IncomingNoteDao } from '../database/incoming_note_dao.js'; import { type PxeDatabase } from '../database/index.js'; import { KVPxeDatabase } from '../database/kv_pxe_database.js'; +import { type NoteDao } from '../database/note_dao.js'; import { ContractDataOracle } from '../index.js'; import { SimulatorOracle } from './index.js'; import { WINDOW_HALF_SIZE } from './tagging_utils.js'; @@ -461,13 +461,13 @@ describe('Simulator oracle', () => { describe('Process notes', () => { let addNotesSpy: any; - let getIncomingNotesSpy: any; + let getNotesSpy: any; let removeNullifiedNotesSpy: any; let simulator: MockProxy; beforeEach(() => { addNotesSpy = jest.spyOn(database, 'addNotes'); - getIncomingNotesSpy = jest.spyOn(database, 'getIncomingNotes'); + getNotesSpy = jest.spyOn(database, 'getNotes'); removeNullifiedNotesSpy = jest.spyOn(database, 'removeNullifiedNotes'); removeNullifiedNotesSpy.mockImplementation(() => Promise.resolve([])); simulator = mock(); @@ -483,7 +483,7 @@ describe('Simulator oracle', () => { afterEach(() => { addNotesSpy.mockReset(); - getIncomingNotesSpy.mockReset(); + getNotesSpy.mockReset(); removeNullifiedNotesSpy.mockReset(); simulator.computeNoteHashAndOptionallyANullifier.mockReset(); aztecNode.getTxEffect.mockReset(); @@ -642,10 +642,10 @@ describe('Simulator oracle', () => { await simulatorOracle.processTaggedLogs(taggedLogs, recipient.address, simulator); - // Check incoming + // Check notes { - const addedIncoming: IncomingNoteDao[] = addNotesSpy.mock.calls[0][0]; - expect(addedIncoming.map(dao => dao)).toEqual([ + const addedNotes: NoteDao[] = addNotesSpy.mock.calls[0][0]; + expect(addedNotes.map(dao => dao)).toEqual([ expect.objectContaining({ ...requests[0].snippetOfNoteDao, index: requests[0].indexWithinNoteHashTree }), expect.objectContaining({ ...requests[1].snippetOfNoteDao, index: requests[1].indexWithinNoteHashTree }), expect.objectContaining({ ...requests[2].snippetOfNoteDao, index: requests[2].indexWithinNoteHashTree }), @@ -655,7 +655,7 @@ describe('Simulator oracle', () => { // Check that every note has a different nonce. const nonceSet = new Set(); - addedIncoming.forEach(info => nonceSet.add(info.nonce.value)); + addedNotes.forEach(info => nonceSet.add(info.nonce.value)); expect(nonceSet.size).toBe(requests.length); } }); @@ -667,7 +667,7 @@ describe('Simulator oracle', () => { new MockNoteRequest(getRandomNoteLogPayload(Fr.random(), contractAddress), 12, 3, 2, recipient.address), ]; - getIncomingNotesSpy.mockResolvedValueOnce( + getNotesSpy.mockResolvedValueOnce( Promise.resolve(requests.map(request => ({ siloedNullifier: Fr.random(), ...request.snippetOfNoteDao }))), ); let requestedNullifier; From cd5a615f154446878cb8681d70b9e55c14511690 Mon Sep 17 00:00:00 2001 From: Lucas Xia Date: Tue, 7 Jan 2025 17:30:21 -0500 Subject: [PATCH 03/14] chore: fix write_recursion_inputs flow in bootstrap (#11080) Uncomments the TODO and adds the flow for the verify_rollup_honk_proof test. Deprecates the regenerate_verify_honk_proof_inputs.sh script. --- barretenberg/acir_tests/bootstrap.sh | 16 +++--- .../regenerate_verify_honk_proof_inputs.sh | 51 ------------------- .../verify_honk_proof/Prover.toml | 4 +- .../verify_rollup_honk_proof/Prover.toml | 2 +- 4 files changed, 12 insertions(+), 61 deletions(-) delete mode 100755 barretenberg/acir_tests/regenerate_verify_honk_proof_inputs.sh diff --git a/barretenberg/acir_tests/bootstrap.sh b/barretenberg/acir_tests/bootstrap.sh index 1b1a7771d9b1..ad6ced2c2d14 100755 --- a/barretenberg/acir_tests/bootstrap.sh +++ b/barretenberg/acir_tests/bootstrap.sh @@ -16,6 +16,15 @@ function prepare_tests { # TODO(https://github.com/AztecProtocol/barretenberg/issues/1108): problem regardless the proof system used rm -rf acir_tests/regression_5045 + # Regenerate verify_honk_proof and verify_rollup_honk_proof recursive input. + echo "Regenerating verify_honk_proof and verify_rollup_honk_proof recursive inputs." + COMPILE=2 ./run_test.sh assert_statement + local bb=$(realpath ../cpp/build/bin/bb) + (cd ./acir_tests/assert_statement && \ + $bb write_recursion_inputs_ultra_honk -b ./target/program.json -o ../../../../noir/noir-repo/test_programs/execution_success/verify_honk_proof --recursive && \ + $bb write_recursion_inputs_rollup_honk -b ./target/program.json -o ../../../../noir/noir-repo/test_programs/execution_success/verify_rollup_honk_proof --recursive && \ + cp -R ../../../../noir/noir-repo/test_programs/execution_success/verify_honk_proof .. && cp -R ../../../../noir/noir-repo/test_programs/execution_success/verify_rollup_honk_proof ..) + # COMPILE=2 only compiles the test. denoise "parallel --joblog joblog.txt --line-buffered 'COMPILE=2 ./run_test.sh \$(basename {})' ::: ./acir_tests/*" @@ -29,13 +38,6 @@ function build_tests { prepare_tests - - # TODO: This actually breaks things, but shouldn't. We want to do it here and not maintain manually. - # Regenerate verify_honk_proof recursive input. - # local bb=$(realpath ../cpp/build/bin/bb) - # (cd ./acir_tests/assert_statement && \ - # $bb write_recursion_inputs_honk -b ./target/program.json -o ../verify_honk_proof --recursive) - # Update yarn.lock so it can be committed. # Be lenient about bb.js hash changing, even if we try to minimize the occurrences. denoise "cd browser-test-app && yarn add --dev @aztec/bb.js@../../ts && yarn" diff --git a/barretenberg/acir_tests/regenerate_verify_honk_proof_inputs.sh b/barretenberg/acir_tests/regenerate_verify_honk_proof_inputs.sh deleted file mode 100755 index 03a46ad70cc6..000000000000 --- a/barretenberg/acir_tests/regenerate_verify_honk_proof_inputs.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash -# Env var overrides: -# BIN: to specify a different binary to test with (e.g. bb.js or bb.js-dev). -set -eu - -BIN=${BIN:-../cpp/build/bin/bb} -CRS_PATH=~/.bb-crs -BRANCH=master -VERBOSE=${VERBOSE:+-v} - -if [ -f "$BIN" ]; then - BIN=$(realpath "$BIN") -else - BIN=$(realpath "$(which "$BIN")") -fi - -export BRANCH - -# The program for which a proof will be recursively verified -PROGRAM=assert_statement -# The programs containing the recursive verifier -RECURSIVE_PROGRAMS=(verify_honk_proof verify_rollup_honk_proof) - -./reset_acir_tests.sh --no-rebuild-nargo --programs "$PROGRAM" -cd "acir_tests/$PROGRAM" - -# Base directory for TOML outputs -BASE_TOML_DIR=../../../../noir/noir-repo/test_programs/execution_success - -for RECURSIVE_PROGRAM in "${RECURSIVE_PROGRAMS[@]}"; do - TOML_DIR="$BASE_TOML_DIR/$RECURSIVE_PROGRAM" - - if [ ! -d "$TOML_DIR" ]; then - echo "Error: Directory $TOML_DIR does not exist." - exit 1 - fi - - echo "Generating recursion inputs for $RECURSIVE_PROGRAM and writing to directory $TOML_DIR" - - # Decide the command based on the recursive program - if [[ "$RECURSIVE_PROGRAM" == "verify_rollup_honk_proof" ]]; then - COMMAND="write_recursion_inputs_rollup_honk" - else - COMMAND="write_recursion_inputs_honk" - fi - - $BIN "$COMMAND" --recursive $VERBOSE -c "$CRS_PATH" -b ./target/program.json -o "$TOML_DIR" -done - -cd ../.. -./reset_acir_tests.sh --no-rebuild-nargo --programs "${RECURSIVE_PROGRAMS[@]}" diff --git a/noir/noir-repo/test_programs/execution_success/verify_honk_proof/Prover.toml b/noir/noir-repo/test_programs/execution_success/verify_honk_proof/Prover.toml index 33b300afae76..9c268316ab89 100644 --- a/noir/noir-repo/test_programs/execution_success/verify_honk_proof/Prover.toml +++ b/noir/noir-repo/test_programs/execution_success/verify_honk_proof/Prover.toml @@ -1,4 +1,4 @@ key_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" -proof = ["0x0000000000000000000000000000000000000000000000000000000000000040", "0x0000000000000000000000000000000000000000000000000000000000000011", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000042ab5d6d1986846cf", "0x00000000000000000000000000000000000000000000000b75c020998797da78", "0x0000000000000000000000000000000000000000000000005a107acb64952eca", "0x000000000000000000000000000000000000000000000000000031e97a575e9d", "0x00000000000000000000000000000000000000000000000b5666547acf8bd5a4", "0x00000000000000000000000000000000000000000000000c410db10a01750aeb", "0x00000000000000000000000000000000000000000000000d722669117f9758a4", "0x000000000000000000000000000000000000000000000000000178cbf4206471", "0x000000000000000000000000000000000000000000000000e91b8a11e7842c38", "0x000000000000000000000000000000000000000000000007fd51009034b3357f", "0x000000000000000000000000000000000000000000000009889939f81e9c7402", "0x0000000000000000000000000000000000000000000000000000f94656a2ca48", "0x000000000000000000000000000000000000000000000006fb128b46c1ddb67f", "0x0000000000000000000000000000000000000000000000093fe27776f50224bd", "0x000000000000000000000000000000000000000000000004a0c80c0da527a081", "0x0000000000000000000000000000000000000000000000000001b52c2020d746", "0x0000000000000000000000000000005a9bae947e1e91af9e4033d8d6aa6ed632", "0x000000000000000000000000000000000025e485e013446d4ac7981c88ba6ecc", "0x000000000000000000000000000000ff1e0496e30ab24a63b32b2d1120b76e62", "0x00000000000000000000000000000000001afe0a8a685d7cd85d1010e55d9d7c", "0x000000000000000000000000000000b0804efd6573805f991458295f510a2004", "0x00000000000000000000000000000000000c81a178016e2fe18605022d5a8b0e", "0x000000000000000000000000000000eba51e76eb1cfff60a53a0092a3c3dea47", "0x000000000000000000000000000000000022e7466247b533282f5936ac4e6c15", "0x00000000000000000000000000000071b1d76edf770edff98f00ff4deec264cd", "0x00000000000000000000000000000000001e48128e68794d8861fcbb2986a383", "0x000000000000000000000000000000d3a2af4915ae6d86b097adc377fafda2d4", "0x000000000000000000000000000000000006359de9ca452dab3a4f1f8d9c9d98", "0x0000000000000000000000000000004ae614a40d61d28f36aaf03d00a064355d", "0x000000000000000000000000000000000010edd34b6c69cb31a6a833a1d040d2", "0x000000000000000000000000000000f4976ee83b95241474007fdc30b06ebdd7", "0x000000000000000000000000000000000019cd0d7e4577008a8335c6260be826", "0x0000000000000000000000000000004ae614a40d61d28f36aaf03d00a064355d", "0x000000000000000000000000000000000010edd34b6c69cb31a6a833a1d040d2", "0x000000000000000000000000000000f4976ee83b95241474007fdc30b06ebdd7", "0x000000000000000000000000000000000019cd0d7e4577008a8335c6260be826", "0x000000000000000000000000000000f968b227a358a305607f3efc933823d288", "0x00000000000000000000000000000000000eaf8adb390375a76d95e918b65e08", "0x000000000000000000000000000000bb34b4b447aae56f5e24f81c3acd6d547f", "0x00000000000000000000000000000000002175d012746260ebcfe339a91a81e1", "0x0000000000000000000000000000007376c0278bcc77156c008b389f6bd12e8f", "0x0000000000000000000000000000000000176ebed74bf3b57ca42a2fac842809", "0x000000000000000000000000000000fc4a601439d45b9ce23c9d9cc37cb21dd2", "0x000000000000000000000000000000000017dc6f8c53261c44cd0348a9970d88", "0x000000000000000000000000000000292042e9c3c101d8dd41b3acfc0db429a2", "0x0000000000000000000000000000000000114f6b3755c65915e12f13533cdd41", "0x0000000000000000000000000000007bb311a6bd5f4f3d543ca30a1a0201614f", "0x00000000000000000000000000000000000871a5a04dda33543cf59b3babf733", "0x03ecb02e48ba68818287222348fc537135b6426d4580ea31cdd540250a7a95fb", "0x2c779e44987737a835c92393388504ebf27da5db3438865f760cb56ee5856a06", "0x0ac17380181974c0082ef0fada047fc7906a94dc18e5be249dd29e52961522e0", "0x206c623397f11ed76a292c7c605fe56c1ae4f6babb6889786aaff461535cf79e", "0x11dfbe6d0977046fd72b55bdb9b41f983fc06ea6404cb36efdf1786d6f0dcbf7", "0x1081a4f21029bfcf4f8388257bf88d932963b2368c4fde96836fb6f023f16622", "0x2e981de982d368f04b0a49e537a05ed5583080c3eafed9617bd06e1214641be9", "0x2571d21e04b1d59935490270a4789e53042f18e15fc7b94dfd267c8deadfc74e", "0x0f70f3f5319d3564bcc6fad428552eefce8f341ced5187fa186d0f099315f225", "0x18f7ee010c96f63d18d2a277e5f5a8ef19b525907817d69616d24495ad804021", "0x1cf7e347bae24a2c1a93b5fd11ff79e68bd2c1bd32056df6d2e1582d17db1d8d", "0x01c451a702451ea9871b7e19d3e2052d8fa49a571ae46616453f27d324cfc907", "0x0614dbf2404cb5fef2e5408f1115502954097981a5ea67d1f80812fa247b1f93", "0x09884374bb354fdb4b118f4da44cd37e75ba7a655201f94cc4064acbdc35887d", "0x158211f68576bcafd791ff02039bb8246b1ba94d99f30a0f282565dd8d82ce0b", "0x0a5231e4039c7b7e0ad77d319958403997a33a0be31e71032733cd70067b14db", "0x2803fc0a9f60d9e202eb6caddcacfbb94a5a7df2695c2a0c909815093ca1864c", "0x0faa80f3cef0e86746df7518f865936959d65eb64ccb05bfb574ac5561683eae", "0x298544d77ee6f4cae7aaa4e9203a233fa18dab360d6f54daf9f8801802586d58", "0x0ba76e9cadf0380b82a3b5ec1c71b80295ce3caeec73aefecffed90f28c1b012", "0x0d965885fc07c4a140f50a83cb750c876191651ee47462d0931e0e67bc9ab5cb", "0x0aad443f96fbde49595f31a47d233ca83ed2bcda86801a8fd7a596ea666c7716", "0x298ef11d346c061b8899cb10c0cd7150aa2d6c554340cf2ee6aa76125e7d1e7f", "0x27518b0512f1efb3a79650941d3adb015b357c92a8c06e086be7b3e7666cea47", "0x0cd6b10a38d5af7f0a5fa97c0ffcba406e8a65a92fe050b3b79f3f1f45d723e2", "0x2f5e1210a841f9c6a7ee7d7f290479696387a58192cb775a64adf0dc225e3d4f", "0x2ffd390be1aecefc25137d01e5b7a85410254ae9e21e7067a9869217cb828ee1", "0x244a77246b5beb3e0e38c8dda39a516050303e83c051300d08bbe5450320b47f", "0x16ed38ff1019df1d168974833ccc96d8648d05c2823021d45e1d5599998a8aec", "0x24cbbf8ca1a5bb082c1081d9252a5e964ff7aae4d83e04468db55960b80a585f", "0x01b3a78bcc6e7529c6ded587b8958d903ef990421d5706afbef64a7976a51084", "0x2c3a013cdecd027b32c8c99c163dd822df374ef018aac8f3d1fb8d57335f9503", "0x0ad83466928e5d70e1e0bb26633a1e0c61399733c15fffafb22df18029e583d6", "0x095023de752480ca3edd408d3c34d732bd9836919e84931d3f42a978867bc53e", "0x283d221f0a2e6b6616bc3eda23e15bb8c8b459010014db7608e646c70ea1da2e", "0x1390c81536ca3d71228eeccf9844702aa3df012bbc3902fe30323f55ee8c7872", "0x0ef66f0302753884f05043080104589e1bf036566a9a00d4688d3c7910631508", "0x15eceeed97d9267597c028fafac72dba40f3ea441880bdd2202b30846a243044", "0x2b38e3f3b5193811df1bafd58432d5abd1c5f575a5d9c2a449682a0f2f035034", "0x2bbcc40d11d6a96c85a63162143ec53314573bb0af7c32d89b791394c80d14a5", "0x22d909e8fb5152b5b98f7cb3fc38f4ef7d7e8f2a857347da59ba2e979bd2ec96", "0x29e3f7a95437fe6ea1e72cd4c7c2fcf1892ab22ba69387f1a6a795e91bcc26f2", "0x02d8c8d031ada707d85693ed106135cecb7fe52de73eedbc54a91a2c856d0de1", "0x28020fb768c50bf52497832c04fb0e14cdb651b98b80864d0b68228ddfd922a0", "0x24d61051f82ff93eb42b5afdcad9e236c669f9f849bf811a853f1e9cc302f8ce", "0x250e89de38769cf70e6cb3685f99e39f44d8ebc1a468930f49e1d80342092b6a", "0x0ad45df677495b9199c57f620db716c543fb6437d574453b7721c2faee6316ba", "0x043d8715e16e3f2dc5a537355c0576254a36db25002f13958696ed13c24add46", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0bb8cb6a256f110f134a15b66b644eb49dc8e0239f92489408e6265a323bb513", "0x18f02f61683cf6a7492291a7041ee1b3cfa8dfb5aa40e2f6571d13750f0f459a", "0x0a982c10c93ae173751f4165e6456c9b85e2551bd503919acae78c801ccc0e1e", "0x0b6e6266bdc6d44d05ae76d2db249877a46ad978fc758654a3a6a7208d2725a6", "0x20de00721f30db8280aa6804c90f3fbe23477e1f746a8eff61c4c5b2af7e821c", "0x1321548f766ded3432627a50704d233455c61d8e59afec2883dbe2f381c033f9", "0x00c56c902b14aa59f6f59badf20f59c51b08aeb6afbdd97a5ac7b98b998b0a56", "0x1745c01290e99476fa655e5fcf2e5b3d24f42624cbd25a40f60af3f3e8489512", "0x08e915bebf8f6c86b332a681d35c57dcd0e0804f22e4e78884ab5edc0a41d6d0", "0x0c77b29e3a0c4368ce5231f94d13fa9b84a6e350cc8f2a57b3f6920a2bf0e879", "0x07ab821c4f07e1dd1cce43b9d9dbf4c9da2e22fea675a57ecf5a47a6992059a2", "0x0bcf85d1f4e34e7598a68bc09cfacf119b0afa1193ad4163096e44ca8eef7a22", "0x0c8a367da01b9097d24eb7b5471c6bd049f7938080bb8cc6fb92945fa934faf9", "0x2cda5caa3a93dcc134cf176f4ad6c79577d273bd2706da3fcaad92a9bc336ac8", "0x2c19cbfce048ef9bb9efb5b9875645b0bc7825aa1a05ad71dbbd3a34d1d76501", "0x28d7f11c2b6b7ff8717b79b098e5bd37eb39a8ea5d03b15339c86fb93e497d97", "0x21ba86c3baacb0fe4270c64c1a5f2861af2f5aa1d6391afe8214e1ce9eac8dfa", "0x0c5289ff2fe581ccf0caa97b4041d381e384c4aef0417edd4dafa7f64a3bfa6f", "0x0c744b0b301542ec4f334696945d7b89b137c5b9434bec277dc938c3dc9ca7aa", "0x006d246e7b0ad18157fa925981f097121fe34cc769128fd8993c4d15cfdf0aee", "0x00000000000000000000000000000022a7ebdc5723cfdb5d73c4c0392e43c407", "0x160d495d0b4462662665faccb1d65d81f0c3f006254a6082a0ceffc49483d76a", "0x24a5a2b9bef1abc3a818d2f27ca5cca7e1b3da34ea6056f338ac54638e26c3b0", "0x0a3dcf45eb6c14391ed8aeab11cb9460f85cb11a1ecb868ad75095796c0f5dac", "0x160c8087a99bf109389ca20d0ce624f71dd2e40fe64d62712e45669ed550fd61", "0x1a65519621040c52fdec5594d095add265c99210929eeb29a3a8180b480bb313", "0x09bf095c40c00dce181347b0d8eaa83ecd0f1f8fcb5dab34ffe19e219672e681", "0x10f3444d7a623e54ad2e882c436191975143217e9f8121c8770a3bbd3ec183ce", "0x0cd68d59322f30bdaf0a6a628f095f880ff716b157ef9a2d589f2cfc40b53e3d", "0x20732eab49adfd109626e0e84496a929a690377e98ee03f13f66ad4541949300", "0x28c850b8bc7f6ae88835bed342eda477e8d1f013a4db34b7ff33198e0a9f8e09", "0x14d234765f29b713df4d1291d452c73a5dc00458242df1be96e04ffb0a3c396e", "0x162572b68ab59291f430cf3113d4fcd3ddca59c4808c134345f6765693f8e1ce", "0x0bc37cb2ffd0f1691bf4d8c621d49f8c23ff58989d09d96c019cc6fc9a46e155", "0x0bc37cb2ffd0f1691bf4d8c621d49f8c23ff58989d09d96c019cc6fc9a46e155", "0x2aa58bd9f811c2970dcefde8c31c2c6db2349eed5161f80c0280a3acbd9f4f0d", "0x141198df3b9c1917d2e7a136ca3438fd9630719591c24388a0559873756d288b", "0x1975864b97d6ff0ace3d600020772ea32181c2f3e413ae67bac22e4a3bbcba9c", "0x2023d432e6630619c99c25a2f293f5ed78f373ee5212bff02b92f00a43bab0e0", "0x23cbaa3113b7265b926bc8811fccce701b3d4e4006ae6b66cefffd0e2f059fd4", "0x00000000000000000000000000000061e09b904168dcad01e82d26f8a21bb884", "0x000000000000000000000000000000000027a29682b86d1b09daa382868b245a", "0x000000000000000000000000000000efc6d7071b6c8cf492bc3ba72f4eda84c5", "0x000000000000000000000000000000000010860d04901949ad63a94863c77149", "0x00000000000000000000000000000036cacf503222db1b5d0edd58aafc1e74f9", "0x00000000000000000000000000000000000fef16ca13117c1f45f6df0782c273", "0x000000000000000000000000000000013704a507a82f6224d7c369d3d6c3929e", "0x00000000000000000000000000000000002887168ff50b7339d4d181d2a84cc0", "0x000000000000000000000000000000e57f500eab5f7d08ac3c93ce080dc1f15e", "0x00000000000000000000000000000000000c720872540cd88fec315c3e6a7625", "0x0000000000000000000000000000004b6897120d1858d29ac10cba52cf73dc44", "0x000000000000000000000000000000000019a9523d9a2481b5dbb1c23cb9686e", "0x00000000000000000000000000000052442fa24d3d5c3b9a608d8259757905a4", "0x00000000000000000000000000000000001c58b3787ffa3edd9f049c1c775a85", "0x000000000000000000000000000000f5737a5b8d278973356217e75bdc986ea2", "0x00000000000000000000000000000000001e0959f30c996ac7e3b265bac2de9d", "0x00000000000000000000000000000030122ef6c7a097b6b2ea6efa763797b8b4", "0x0000000000000000000000000000000000191344dd8af6c1c1c3beef933de271", "0x0000000000000000000000000000002f38961e4eb47676a42a5b59457e19a7b1", "0x000000000000000000000000000000000002936d1fa64f399018fbf60a1f2001", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0f349727b02c8c3916e6904450b4db7d748c746d693f12acfd44757e349ae543", "0x109b539e615d399af085519623a8f0ea43fd3e672e8b3397deb033110b896ba7", "0x1d2d7546c079198782bc8c1ecf377c86567d90d05988acd013af254a84ccfca2", "0x11922ebe299248b1a194ff41750bbad0297b8e4db3944036983764ba171195a1", "0x14cb035cb0d920e42127d67ed6763fd0cdadeac07c0aa57ab5c038a501aca88c", "0x2e82b6bc3d9337d1f2c080ed47e935308317c159408ff3a054718e737f827a49", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000000000c883c136e90256f3059fb812416fe61171", "0x00000000000000000000000000000000002cbe86e3f824a75195f942b5de0abe", "0x000000000000000000000000000000ff2335151394b16f671dcfdc5ee78485f3", "0x00000000000000000000000000000000000fceb210dd93cd99b7bb225af47ae8", "0x0000000000000000000000000000001a95675079e3f1508e636cf69b7978db7f", "0x0000000000000000000000000000000000079f7a59ed7b4a3dda951fa8fbad98", "0x000000000000000000000000000000b15ed33e983574376efe5ae0c29c6bdd1f", "0x000000000000000000000000000000000004031f5fd23cf82aad9e5d0bfd0363"] +proof = ["0x0000000000000000000000000000000000000000000000000000000000000040", "0x0000000000000000000000000000000000000000000000000000000000000011", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000042ab5d6d1986846cf", "0x00000000000000000000000000000000000000000000000b75c020998797da78", "0x0000000000000000000000000000000000000000000000005a107acb64952eca", "0x000000000000000000000000000000000000000000000000000031e97a575e9d", "0x00000000000000000000000000000000000000000000000b5666547acf8bd5a4", "0x00000000000000000000000000000000000000000000000c410db10a01750aeb", "0x00000000000000000000000000000000000000000000000d722669117f9758a4", "0x000000000000000000000000000000000000000000000000000178cbf4206471", "0x000000000000000000000000000000000000000000000000e91b8a11e7842c38", "0x000000000000000000000000000000000000000000000007fd51009034b3357f", "0x000000000000000000000000000000000000000000000009889939f81e9c7402", "0x0000000000000000000000000000000000000000000000000000f94656a2ca48", "0x000000000000000000000000000000000000000000000006fb128b46c1ddb67f", "0x0000000000000000000000000000000000000000000000093fe27776f50224bd", "0x000000000000000000000000000000000000000000000004a0c80c0da527a081", "0x0000000000000000000000000000000000000000000000000001b52c2020d746", "0x0000000000000000000000000000005265060992033960e8e32bc3fc09c3dffe", "0x00000000000000000000000000000000001d477657d4c186192157174e1ae85d", "0x000000000000000000000000000000cd51c49ebd008943587ea23486b8b5589a", "0x000000000000000000000000000000000029cff3c57394ddf5cc5323399502b0", "0x000000000000000000000000000000c2ec36ea535b8aa21337d02d48df12dffd", "0x000000000000000000000000000000000005af47d2e8508f0b0f9a09c4344c5b", "0x0000000000000000000000000000008b0495a384458dc7891e7694abeba9c27f", "0x00000000000000000000000000000000000693f38a17576df05f40917378ee5b", "0x0000000000000000000000000000006234b1604de9892ab1a1dd7e5a12e5b64d", "0x0000000000000000000000000000000000027beb67a31282343d16798d7f6881", "0x0000000000000000000000000000007cf97aa50f47c9263dad2e4c2c94cb1243", "0x00000000000000000000000000000000002892ea06de7e07a8cb8b46e6292fa0", "0x00000000000000000000000000000079cf93b804469cfd1aed183baaeae73de8", "0x00000000000000000000000000000000000e59187557f6855bde567cb35ede86", "0x0000000000000000000000000000008bd253f9ec6d2aa0aa50326c8365f4771f", "0x0000000000000000000000000000000000094ed7be0bdab40ba71f0b5a713f46", "0x00000000000000000000000000000079cf93b804469cfd1aed183baaeae73de8", "0x00000000000000000000000000000000000e59187557f6855bde567cb35ede86", "0x0000000000000000000000000000008bd253f9ec6d2aa0aa50326c8365f4771f", "0x0000000000000000000000000000000000094ed7be0bdab40ba71f0b5a713f46", "0x000000000000000000000000000000c6fbd597bf32620b74384b4182361f42c4", "0x0000000000000000000000000000000000018edc9ac63e10a04a67e9a498a93a", "0x000000000000000000000000000000f84f1abee938aa614d378583f16052e4fd", "0x0000000000000000000000000000000000071410de8b0d772ec833ab10f01f9d", "0x000000000000000000000000000000183c61e378b1ca713479769b7b2e74d603", "0x000000000000000000000000000000000003f21807c5069ab301a6d44b1d2960", "0x0000000000000000000000000000000ba9d96216597d251984d0a302327cd6fb", "0x00000000000000000000000000000000001379e1299d694a37dbff2a7e451267", "0x0000000000000000000000000000000265b8a70e3adaf365ce6afab43132ce80", "0x000000000000000000000000000000000025e91bb4ccd7abf754509beb7d23b4", "0x0000000000000000000000000000004929d635d6bd6dd0a5af7c245c462d732c", "0x0000000000000000000000000000000000227dd7610f4731e1b44f25d9e78fe6", "0x2d12d5c5058c324f9bc322ea29a04784b54f8035f139416d5bcfd943b9926801", "0x035178addba56dda1c8d22cc57e110d872e4681288802f23e8121c50366d9800", "0x06de7f41c17a9eb137d2b70b0d0feb97d6f83112060a530cf5ab9a7517e9d78a", "0x0f273c12ada01ad0e8069add3d3b8a8faa0bdcb4dfc3623fd4ac16c1e552e12b", "0x074ebece0d875a3bb670ad14fd85b2f02457b8ed862c93b54066d9b669a183c3", "0x11b89f60144876fcb3dda5d7cc8635d59b4361768b9b25f1378b26b49828f725", "0x288ff447a67c1c9b141e2ac417f07ea586bc56bca2c1dcba4936b41441393038", "0x2d3ffc59491e07d005e69e1487027011a76eb3c6d524a9b4aa6bf1bc46b6349f", "0x1466ef0e63cae250079dc66e41e42dae283f52d8787ced3e2d17b4c7c9c7d898", "0x225b3258dc7d920544b3b6531b7af2ccadb1c70a0995acc4501b88cc5f0fb907", "0x1f0e4e558fdfd2cef659615cd3d60478d5c63cc747f825a946e7c603a39752a8", "0x27c3896812da6e9b849b3040c6ac87fac3d663b3115a76d88c303f57b644d990", "0x1a537570f364e5b1dd9af6c4b2c7d1112556c00a75ddd8315a1bb1b9096700d7", "0x2d3f559a00ab352c8786dc2020127e107ee08768268c6b0097b2d6176842f414", "0x09bc339c3880c79a593f7db4ddc73fccfeae63b9fa4c5d5cc2f4bb280517c6cf", "0x2f8bc578f20113073ff2be60b6da3495f89a42120bc52bbd253796874f9759fd", "0x26be7abb2371fc72625ec11ffab449c1778b80451fea16526e6248efd49de5b0", "0x21cf35a90e5a308b8aad543bfa4750f19bd8e13e266a096cd630a39a475c066d", "0x15a2722c132db7dd062ccc988626ee32930ed9f4cc2dc8f0f5b83acd01c7395f", "0x18fefba3a72aca38f11dd1b258e3dbc5a3af8baf0aeb2b7f95ba75db421254b5", "0x2135cfbb055b1dcc2629ef569fce3203458a4a93351da029888787fb69950e89", "0x2a9324753d1299472226591c7681740d5ac53600958ffe33e20e936e3e134504", "0x2b37b9147927b1c9bbc4ce18150ad33400889a5ccebf417b4b9776a4238a0bc5", "0x12155671f2b7ccc0c25ff0a5748ee1c222f193d6902c4a9d37981800d05300f7", "0x08f07b01a5989df1b57fb57ec34266d468586ffd77546656ffd945917f2f310e", "0x0ec1ee0e959b0f8d58af8c82c2d8259cea457d0cb98a9c3da29c7f534a6e217a", "0x22aef80d85ba0200f99435006647d80993dc3336dda00ef68b7cebdd8c3f37e5", "0x2b07beb48ee0be89ba61106738486f4bd7a27f066d98672afc0eddbe0f62fd7c", "0x031c53dd417a71e0a092e57e9cf05b34b1d6afd989ebee1c2a7440e6fd18e142", "0x19705da6d82f9c572e529f9ff53f611dc7cdc5353febbdd7d99baf68f5d7fb08", "0x02dff73237605fb60aaeec62c4d70e211dafd696323ebb4fdb23da1356edc7b7", "0x28123310ea392855c4c5ae09a808e76d9aaebd1a2be528cd9ff2b58f2ae2e2b5", "0x2fb6955e954aa2ab2ba684330098e5c96f95d36543e766c7059c36e2e92c86ec", "0x1c108db3f6cd00c92f834baf1a88d03ddfb799bc91f729102ab68665f14a0429", "0x27b7c4e8392389c0cb16829cf7edac4ec71b7a95fc9ac63cbc811526fff42949", "0x00bda672de3a14c5d3d109a7fd2b355ab9cd5948b25c89e7063219788cad2b5f", "0x2540ed01eca6e3fbe9b413fed252a8b51b905ef52d3c44b6e3f9d96d89cceb25", "0x0980154978657d2050da8f97f83d1e92756b6d8f6d9a2c2858cdc89b26fbf262", "0x0f16055808088e8b53714c3cd0446a4a913d0924d5b7911a2f044ebd42f6174e", "0x0fe63161bd27a029a308803a11e6483e0d93dd7a045830759e6d6dd2750fdebf", "0x1c7e932d81a1c04a013e3bba9b56058302669cff5eb72999e12b6cf1528c3297", "0x2ee5a9a008f39be5f918f1edda8581a645e8ec7a599f659c1d1d543b4b57a54c", "0x153937bfad1211834575747a5b7ba58c4773b9f6fbc94d40598a244be55d51fd", "0x2dbd25164c929288b7cdd48b7628b89d1d61317959c311a7737657c624a47184", "0x27c9b7aa6d6333bc40fa43c4c9a851900fee79281caba089586eb2d8269c3c54", "0x2becaa90c4e2bb8acbe6dda8a2a3b43d9d04467898ebb1dc3e14a83f81d32512", "0x2b912d1ba0a02db4c8233000999aff38a430681acb23d1bdde1fa0fa062a17f5", "0x2075cdc89c791cb2d6b84a5a963f3600c51b7b1b2fabeed10c738f55ab1fb4a1", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x1471a95eb0ded8389636686aa80dd03de1d6463b220aad6bf79ad09808a1d668", "0x182e36542540118bf3f916f5fa1a8e9815f8e9790aa4d409eb0d4dd853501264", "0x0c39aee6873d5cda3ab71fc6445f6e2442780dfb3d676f9e3d52c72c7e9d2212", "0x072f89165101953f3721c7026fb31f3ab483e28968f3b0fef9ed94c2ea762fcd", "0x01d45e6d3df87d2c189099593bfade85b1b3cc46f9197cd2fe86441975738b43", "0x0357669d3816688746b9956a15ee6932ece3f90452670d3170470b1b492d43ce", "0x0888ced17aa0b48253ae7281b047364a55b21de8cc6d3d95576e1c12d844e896", "0x22e1db5f3280b301e204a4f0fa197e885acdf1b4a7796a1fbc8cddc9745387fb", "0x2df0db1e5eee18402c47d12e0e6cdb01233bff44c531a10beaefa54fda09ed72", "0x1b2a1e808d4e97c016343cd684638f3dd868c6bba4310305194295bf3e3cc28e", "0x17424701ca23f7af5d1da3578075813a381ab149d8e0955f983101fb0dafd274", "0x1a94eb7d138fcc01534c8b595a1b26f92ed69e554afd1a9cca08fade4c079e8d", "0x2a4054c6234b357a39fcb5e5422014cb9e2c2e78471fc7c0de4ed34699ebf537", "0x1c32828ae686569702e809917a6c4c9b312ecc2a1f4ff46f2a9a8f2cb1b9d8f6", "0x30336f19d17ab0663f491e03cf93cdd00297ae6d355ebe964c739e09556a9917", "0x1a601b9ea1a9c906d50145eaf9a04a92c54e0e735ecb5d70646eeba2550af3a7", "0x23c58b060ae1d78bfb9ac877019853f5aa163bff15f7f5948fe2ee56b6337412", "0x25fb1879de2f781f9ca372272993747db0a8c297d0c4c8e42828a5a15002dcd0", "0x24dd8e2f31a2b4840f45153fa22b010892d26826ffd2a701494dac528054f7be", "0x0883817539bb697cc376c85a88ef1953caa44a920bf1da6e3995fac80612b5e8", "0x0000000000000000000000000000002c8a80ab07bba8ea2c44e6cc7a5b6cba32", "0x27825b9d5cb4ccf2fa78745def0028b976dca4f32df2ce69c75415e0f238f536", "0x2769a1f59949dd4653929cff29ec6a66e2da94318b59a4dbe8f227d9b8123093", "0x25999ee45d5bc32b4907e46aae89833a08201bc10709f15cd35da391a2edd67e", "0x2a344e28ea8cdeecce8522a2bc601ca6ef195c06dc977a6df77d280f8f5bb176", "0x0f20867f6a27630060f7b33c42e110d3ecc2a63c2595398f64071ea5032ec397", "0x0aab5753f49b34843dbaaaf495a2f47ff12322c79c94eee76bcbf3f865c30267", "0x2027172e4ced4b6f710cfbd7ba3b685be782735c53eae17afa2eda35825b3b9d", "0x0dc044704fe514ae924b05d6aba5b431afeae6e4b9cb456a789f3e8e8deb6051", "0x06b97bac55f6413c26abe689d9946f317ada969531245c0c899c69684bcc68c7", "0x0bb72a73b8c5d6d0cfed762f30040d42be18b9c945f86c42346867a38f2679c6", "0x0018b84c9bfbd6ee153769d648f55580a995baa3859d4783e8c4b514b45e8051", "0x1cb9cc9da1e96a946e3a9e1168eda85fa379def26a78fdbe515ab45d777df665", "0x0aceacf3dd99bb0fd30c2cdfc54633a7285a7aae048f2ce7a4baeb910835940c", "0x0aceacf3dd99bb0fd30c2cdfc54633a7285a7aae048f2ce7a4baeb910835940c", "0x1c0643f95e44ace2ac1ded3edf88730c40bc669faa78d8991aaab241609e29bd", "0x17c09c851d565f7dfea75315518f04a28487b8964b61b920f0419ffd2a0b0fbb", "0x06e6f5462be57045ead38ce7146d81216ddb07b4320b9fd2c308aa2369a10c66", "0x03302944c99c6a0559eb4cdbfae6429f2125b47e16eeee590c54da69574cd527", "0x0f46b7fa3b7c399f1f8992b32a0a900706c3b6f3db366be175081fff39f79899", "0x000000000000000000000000000000deab220098e0743b21ed93f6388e80a65d", "0x000000000000000000000000000000000003885559ebf4ab35d49b0bce4d79f7", "0x000000000000000000000000000000017e2de970aaa284197111fd9905c4a742", "0x00000000000000000000000000000000000b1345364238b08e3fe9707410c18f", "0x0000000000000000000000000000006d73dd0a654f2bd614c5776e04c0e60cd2", "0x00000000000000000000000000000000002e68275e03a839ecd487489154f294", "0x00000000000000000000000000000001e1f93d2b018f0a6b39ef1fd29a5e9710", "0x00000000000000000000000000000000001545df2edfad784f403a3ef4ae2865", "0x000000000000000000000000000000ff7ae4905cbb3d622172e48dec6f1b2620", "0x00000000000000000000000000000000001b9caac1ec4b6386a2cc38677bd826", "0x000000000000000000000000000000401072f183011dbf2761f1e506c156e297", "0x00000000000000000000000000000000002bf1ac2ef46cabb190b21d8463e1b3", "0x0000000000000000000000000000001aa0a85b68445babca19d465f16f3d0f44", "0x000000000000000000000000000000000026af9be6313c8e278673d7af6f4bf3", "0x000000000000000000000000000000721825342b3c04f9e6378b644348c801a6", "0x000000000000000000000000000000000015ba091e88e2ff46007a89d2d1afd5", "0x0000000000000000000000000000007344bce8d1d609356ad8f8ac0d34ec3da7", "0x00000000000000000000000000000000001a7ff303dbb62a1af6b632acbb3ef4", "0x0000000000000000000000000000000b4fe0012ff9655be51e69b0996b06179c", "0x00000000000000000000000000000000002d7ef4d382f16509894e2b6032af10", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x19f0c008fa095f42bad43fb28b2b4b47359270ded337b6d25391fdae9b391d75", "0x1c94592a94c4beb4a7e85554aa2bf80765155ad05e8936c25288cd8c4f67a3f9", "0x025138b970f04c9e9d196714071b05a4f20904fff74e69b30c548c975f248f31", "0x188fa91b4dac482ae0f2e44baf3866c1f9fd612d74bc04c96f5f565508f84b2b", "0x0fc936e564c2c8c68f65745643116c3fdb10b5181ae44d2de5bb1f6cec6ef3fe", "0x2583a70cd8b72a1a3e5968e2c88b95979d11cc06d4f80d2da250af7712721003", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000000000e714f5ed5ef689b2794f15772d4a946efa", "0x00000000000000000000000000000000002e59cd0cabcf055eeec66cce924421", "0x0000000000000000000000000000005d0309091e80086f656f824ad5ec932475", "0x00000000000000000000000000000000002066f6e6deee86ef9dea59eab0b755", "0x000000000000000000000000000000c8e88bb1d6ec1fc5434e7a032b1d6a5667", "0x000000000000000000000000000000000008013ea9ff1748d590acbf58e37dac", "0x000000000000000000000000000000ebc576489a7a4e90b23a50cfec950b755a", "0x00000000000000000000000000000000001874d0e5f8c341fd0b5e3ddd81eaa1"] public_inputs = ["0x0000000000000000000000000000000000000000000000000000000000000003"] -verification_key = ["0x0000000000000000000000000000000000000000000000000000000000000040", "0x0000000000000000000000000000000000000000000000000000000000000011", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000003", "0x0000000000000000000000000000000000000000000000000000000000000004", "0x0000000000000000000000000000000000000000000000000000000000000005", "0x0000000000000000000000000000000000000000000000000000000000000006", "0x0000000000000000000000000000000000000000000000000000000000000007", "0x0000000000000000000000000000000000000000000000000000000000000008", "0x0000000000000000000000000000000000000000000000000000000000000009", "0x000000000000000000000000000000000000000000000000000000000000000a", "0x000000000000000000000000000000000000000000000000000000000000000b", "0x000000000000000000000000000000000000000000000000000000000000000c", "0x000000000000000000000000000000000000000000000000000000000000000d", "0x000000000000000000000000000000000000000000000000000000000000000e", "0x000000000000000000000000000000000000000000000000000000000000000f", "0x0000000000000000000000000000000000000000000000000000000000000010", "0x00000000000000000000000000000060e430ad1c23bfcf3514323aae3f206e84", "0x00000000000000000000000000000000001b5c3ff4c2458d8f481b1c068f27ae", "0x000000000000000000000000000000bb510ab2112def34980e4fc6998ad9dd16", "0x00000000000000000000000000000000000576e7c105b43e061e13cb877fefe1", "0x000000000000000000000000000000ced074785d11857b065d8199e6669a601c", "0x00000000000000000000000000000000000053b48a4098c1c0ae268f273952f7", "0x000000000000000000000000000000d1d4b26e941db8168cee8f6de548ae0fd8", "0x00000000000000000000000000000000001a9adf5a6dadc3d948bb61dfd63f4c", "0x0000000000000000000000000000009ce1faac6f8de6ebb18f1db17372c82ad5", "0x00000000000000000000000000000000002002681bb417184b2df070a16a3858", "0x000000000000000000000000000000161baa651a8092e0e84725594de5aba511", "0x00000000000000000000000000000000000be0064399c2a1efff9eb0cdcb2223", "0x0000000000000000000000000000008673be6fd1bdbe980a29d8c1ded54381e7", "0x000000000000000000000000000000000008a5158a7d9648cf1d234524c9fa0c", "0x0000000000000000000000000000002b4fce6e4b1c72062b296d49bca2aa4130", "0x00000000000000000000000000000000002e45a9eff4b6769e55fb710cded44f", "0x00000000000000000000000000000072b85bf733758b76bcf97333efb85a23e3", "0x000000000000000000000000000000000017da0ea508994fc82862715e4b5592", "0x00000000000000000000000000000094fa74695cf058dba8ff35aec95456c6c3", "0x0000000000000000000000000000000000211acddb851061c24b8f159e832bd1", "0x000000000000000000000000000000303b5e5c531384b9a792e11702ad3bcab0", "0x00000000000000000000000000000000000d336dff51a60b8833d5d7f6d4314c", "0x0000000000000000000000000000009f825dde88092070747180d581c342444a", "0x0000000000000000000000000000000000237fbd6511a03cca8cac01b555fe01", "0x0000000000000000000000000000007c313205159495df6d8de292079a4844ff", "0x000000000000000000000000000000000018facdfc468530dd45e8f7a1d38ce9", "0x0000000000000000000000000000000d1ce33446fc3dc4ab40ca38d92dac74e1", "0x00000000000000000000000000000000000852d8e3e0e8f4435af3e94222688b", "0x0000000000000000000000000000006c04ee19ec1dfec87ed47d6d04aa158de2", "0x000000000000000000000000000000000013240f97a584b45184c8ec31319b5f", "0x000000000000000000000000000000cefb5d240b07ceb4be26ea429b6dc9d9e0", "0x00000000000000000000000000000000002dad22022121d689f57fb38ca21349", "0x000000000000000000000000000000c9f189f2a91aeb664ce376d8b157ba98f8", "0x00000000000000000000000000000000002531a51ad54f124d58094b219818d2", "0x000000000000000000000000000000ef1e6db71809307f677677e62b4163f556", "0x0000000000000000000000000000000000272da4396fb2a7ee0638b9140e523d", "0x0000000000000000000000000000002e54c0244a7732c87bc4712a76dd8c83fb", "0x000000000000000000000000000000000007db77b3e04b7eba9643da57cbbe4d", "0x000000000000000000000000000000e0dfe1ddd7f74ae0d636c910c3e85830d8", "0x00000000000000000000000000000000000466fa9b57ec4664abd1505b490862", "0x0000000000000000000000000000009ee55ae8a32fe5384c79907067cc27192e", "0x00000000000000000000000000000000000799d0e465cec07ecb5238c854e830", "0x0000000000000000000000000000001d5910ad361e76e1c241247a823733c39f", "0x00000000000000000000000000000000002b03f2ccf7507564da2e6678bef8fe", "0x000000000000000000000000000000ee40d90bea71fba7a412dd61fcf34e8ceb", "0x0000000000000000000000000000000000140b0936c323fd2471155617b6af56", "0x0000000000000000000000000000002b90071823185c5ff8e440fd3d73b6fefc", "0x00000000000000000000000000000000002b6c10790a5f6631c87d652e059df4", "0x00000000000000000000000000000029a17181c7934fc3fdbd352eac5cb521b9", "0x00000000000000000000000000000000001f497cbf5284ff29a2d336e5991999", "0x000000000000000000000000000000072bd9c0c6beda1fdee6d4ff0432ba9e1b", "0x000000000000000000000000000000000013ea38a0bd2aa751a490a724fac818", "0x000000000000000000000000000000c599f63dcd3edd49f08ae5c3141c1e3493", "0x00000000000000000000000000000000002bdb36be0bea09950dd32a8ccf6fbc", "0x00000000000000000000000000000047f27f29724e7f19eba0340256a0bd4b7d", "0x00000000000000000000000000000000001c1c5ccf87a962129ca785f8f35120", "0x000000000000000000000000000000c5c71efdae00679bbe4a95096e012b1817", "0x000000000000000000000000000000000017a365de041e317817d0135f2b48e0", "0x0000000000000000000000000000008ae711ac402f7848d719c93a89ba8d39f1", "0x00000000000000000000000000000000002b6fb40ed8a1935226f4f9786a0499", "0x0000000000000000000000000000002f03a71501d83de1da5715a4e9462d6198", "0x00000000000000000000000000000000001644064443b8546f48eae693af47b8", "0x00000000000000000000000000000083763ab1b6e8fe269b2fe4c7b9c448c08d", "0x000000000000000000000000000000000021d7cc18c59676a8eeb47c0111c251", "0x000000000000000000000000000000b5f937153073e03ea7d51a996e0ebc2e6b", "0x000000000000000000000000000000000011ddd0e26457373eb06e0493177672", "0x000000000000000000000000000000c5f6eb9f6fc8fa99811a4a88c74a6d018b", "0x000000000000000000000000000000000025bcd07a0732c123567834f5109558", "0x000000000000000000000000000000aeb08a0b1a4442189448b4e97490568146", "0x000000000000000000000000000000000002a1744e4771705536a88f07e0f90f", "0x000000000000000000000000000000b938568293bd0724b0ea76c2ec34c4a829", "0x0000000000000000000000000000000000053296e8f3b9ad3af877dfa9c7c2a7", "0x000000000000000000000000000000f0ca1db6323996eba26bdc86dafef9d10b", "0x00000000000000000000000000000000001441a46c58af03d5645d52721d956a", "0x0000000000000000000000000000008bbf8f884013c66c28ba09c2fbd573b656", "0x0000000000000000000000000000000000206c391ca06fac27d1908e94570243", "0x0000000000000000000000000000002d4f5aaed88ba4f79612d53b804ca8f194", "0x00000000000000000000000000000000001674011c96392df08970fa6b7b4cb8", "0x0000000000000000000000000000009f88297c1729d76c4d9306853598c91325", "0x0000000000000000000000000000000000256f51adfcacc3c1e340be4d32d3e9", "0x0000000000000000000000000000000ab9955eec0d74eb799afed2a802b24d75", "0x00000000000000000000000000000000001fcbe43ea105b30d36ed0b21b03411", "0x000000000000000000000000000000d66b1d5433f1aa5305cd1edce7c22de466", "0x00000000000000000000000000000000002331546a256b8a3b751956806680d4", "0x000000000000000000000000000000292b512a940306c9b122a0feb4e9780af9", "0x00000000000000000000000000000000000904e02f0334f3a3f72e65ce82f34b", "0x000000000000000000000000000000778103226eff8f576eba0a0a2ffa134d57", "0x000000000000000000000000000000000001fe54f93991aa61a056f75e5137b0", "0x00000000000000000000000000000089058e539eb10c10fa13dd50e39517555d", "0x000000000000000000000000000000000009e91383ce6118cef78093d2c550fc", "0x000000000000000000000000000000d95e2e1bf12461b508cc8d63fee4a8613d", "0x00000000000000000000000000000000000ab28965260d651673541f10f2e02f", "0x0000000000000000000000000000008f6f361c7fe163277c1022dacf2a0f307b", "0x00000000000000000000000000000000001e47e6531c4ec673e9c18a9062c1df", "0x000000000000000000000000000000e55ba7b44de2c0927d4df995625325c68c", "0x000000000000000000000000000000000005d3e2113696d710431294256dab1a", "0x000000000000000000000000000000150b1462a7b440ef041dc9e7af7e1d1f15", "0x000000000000000000000000000000000017b03e1a64b4988e05ca4291f3ce6a", "0x0000000000000000000000000000008d494ccfb05451bea33fe43623c45a9d7b", "0x000000000000000000000000000000000001ed433638a57a66f8205daea09e50", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000000000f68b70e0e4b0cb9e2c7bd64fa4b75b32dd", "0x00000000000000000000000000000000001bcedd9106bdd4e13e0b751c672a83", "0x00000000000000000000000000000042fd857eb4bf620db08b0e181807df9f59", "0x00000000000000000000000000000000001ccfa89524772b4bd5b6bf6741d71f"] +verification_key = ["0x0000000000000000000000000000000000000000000000000000000000000040", "0x0000000000000000000000000000000000000000000000000000000000000011", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000003", "0x0000000000000000000000000000000000000000000000000000000000000004", "0x0000000000000000000000000000000000000000000000000000000000000005", "0x0000000000000000000000000000000000000000000000000000000000000006", "0x0000000000000000000000000000000000000000000000000000000000000007", "0x0000000000000000000000000000000000000000000000000000000000000008", "0x0000000000000000000000000000000000000000000000000000000000000009", "0x000000000000000000000000000000000000000000000000000000000000000a", "0x000000000000000000000000000000000000000000000000000000000000000b", "0x000000000000000000000000000000000000000000000000000000000000000c", "0x000000000000000000000000000000000000000000000000000000000000000d", "0x000000000000000000000000000000000000000000000000000000000000000e", "0x000000000000000000000000000000000000000000000000000000000000000f", "0x0000000000000000000000000000000000000000000000000000000000000010", "0x000000000000000000000000000000ea6f0ffc3623f62df87b74c4dcf518fd39", "0x0000000000000000000000000000000000173d770a8f5cb72b5b7df483f41e34", "0x00000000000000000000000000000078cbd4d4ee5fbdc3e18d02a1f70cbb5d91", "0x0000000000000000000000000000000000021f87cdc6ab8ffcec1ad655c4957e", "0x000000000000000000000000000000becb2c582944a105e60c8137244c7fbe50", "0x00000000000000000000000000000000001131c406ad5519e89c0595a6eb090a", "0x000000000000000000000000000000835914e338d4388cd6b377c6f29c3ae8d7", "0x0000000000000000000000000000000000090349ad561dca142627a600ee4277", "0x000000000000000000000000000000974f2b1de449db7000391c8aec96756b19", "0x00000000000000000000000000000000002073a05050310929610ff7d081bfef", "0x000000000000000000000000000000e1ea79efc9dc97e61ef4b380bf93f5d160", "0x00000000000000000000000000000000002e70a9d847019e5f99be0ce5849ef9", "0x0000000000000000000000000000003181bcdd733575d173aeb749a241457fee", "0x00000000000000000000000000000000002a99429ae3e7fc810959e114a4935e", "0x000000000000000000000000000000638591cb7a86b050e9c915fdf75fc0188d", "0x00000000000000000000000000000000000eec7be2a69ddc8b3c3a39729f2ff1", "0x000000000000000000000000000000a6e81418467d38b93104d402dea2d642c1", "0x00000000000000000000000000000000002497efe6b96c26dc4b5e015c627530", "0x000000000000000000000000000000f9ac5e0111dc36f9cc1e9a9905235a374d", "0x0000000000000000000000000000000000127f146a5df1de7c90d1a4a9a373fa", "0x000000000000000000000000000000bb0e4ad8256760164511649027827b2468", "0x00000000000000000000000000000000002c2b05a49b25c71848061f721b0e52", "0x000000000000000000000000000000d2e0cfa24df62aeb0b250c6b8ce4bce249", "0x0000000000000000000000000000000000177cfc8a9f03ba7a0fdf0b99899778", "0x000000000000000000000000000000bc3661650d53f9b24d923d8f404cb0bbc9", "0x00000000000000000000000000000000000c4032c3079594eb75a8449d3d5ce8", "0x00000000000000000000000000000054eb5fe796a0ca89441369b7c24301f851", "0x00000000000000000000000000000000001084d709650356d40f0158fd6da81f", "0x000000000000000000000000000000b59bdbe49ff8208baeb13b8cd40c72281f", "0x0000000000000000000000000000000000212700d6e138f55e8fe4d41aca557f", "0x000000000000000000000000000000d0d87076eba438e31effd2ea0f1b0e45d2", "0x00000000000000000000000000000000000628be7db7fa2e49440a4867f3c5c8", "0x000000000000000000000000000000c9f189f2a91aeb664ce376d8b157ba98f8", "0x00000000000000000000000000000000002531a51ad54f124d58094b219818d2", "0x000000000000000000000000000000ef1e6db71809307f677677e62b4163f556", "0x0000000000000000000000000000000000272da4396fb2a7ee0638b9140e523d", "0x0000000000000000000000000000002e54c0244a7732c87bc4712a76dd8c83fb", "0x000000000000000000000000000000000007db77b3e04b7eba9643da57cbbe4d", "0x000000000000000000000000000000e0dfe1ddd7f74ae0d636c910c3e85830d8", "0x00000000000000000000000000000000000466fa9b57ec4664abd1505b490862", "0x000000000000000000000000000000677bd789aa094b735f2abf3d9cfd032188", "0x0000000000000000000000000000000000236e982930a9984fd08a3edddf25a1", "0x000000000000000000000000000000c07a966aebd836d8a800f54b1c3bb5c36f", "0x00000000000000000000000000000000002ddf6475059b2e9451db5b8d857bff", "0x000000000000000000000000000000ee40d90bea71fba7a412dd61fcf34e8ceb", "0x0000000000000000000000000000000000140b0936c323fd2471155617b6af56", "0x0000000000000000000000000000002b90071823185c5ff8e440fd3d73b6fefc", "0x00000000000000000000000000000000002b6c10790a5f6631c87d652e059df4", "0x00000000000000000000000000000029a17181c7934fc3fdbd352eac5cb521b9", "0x00000000000000000000000000000000001f497cbf5284ff29a2d336e5991999", "0x000000000000000000000000000000072bd9c0c6beda1fdee6d4ff0432ba9e1b", "0x000000000000000000000000000000000013ea38a0bd2aa751a490a724fac818", "0x00000000000000000000000000000024894ab0070e4f72cf1fffafa8b39307c4", "0x000000000000000000000000000000000019f564c37de48cf28b308da5f2e2f8", "0x000000000000000000000000000000a08a6899213caaa89baca51a3598a07b99", "0x00000000000000000000000000000000000b5e594c4ae54f867a3bd8973689d8", "0x000000000000000000000000000000a3ba29ef6ca86e9f0d01acd1abac8ccd34", "0x0000000000000000000000000000000000155cad00fb78a200a9a95a2a220ce3", "0x00000000000000000000000000000038a5f38d32ca28822645e2c790fc26f029", "0x00000000000000000000000000000000000906f90f083e6f1121af20a5067a04", "0x000000000000000000000000000000d53e76dd5279fe31335ed32d80dcc5ca31", "0x00000000000000000000000000000000002cf52886dd6e8f1fd0adb60005c606", "0x0000000000000000000000000000002ddcbd934e2f9c7ff98d2e55c070cc2fe2", "0x000000000000000000000000000000000028db51dbb15364210353420c11faf9", "0x000000000000000000000000000000397594051f075d214bbf3f48b71c63f4b8", "0x0000000000000000000000000000000000047b66ca1874c32782c036fb9aefeb", "0x0000000000000000000000000000009e9fba95bbfa0e8726ec97a6d808caa2d4", "0x000000000000000000000000000000000004ade9dfa460ee9d37d6ccb02c1e20", "0x0000000000000000000000000000002b8e95ee572dc79770aa90657517801faf", "0x00000000000000000000000000000000001bb5b68de1c268c3d95913e3147c15", "0x0000000000000000000000000000007d6628253cf6c468d2fb28f77f36b15831", "0x000000000000000000000000000000000014d3535ebb73ddbddcfd2bbeb5c12d", "0x0000000000000000000000000000005f0f2c1ce2daf455b3f3d0098e1a74774c", "0x00000000000000000000000000000000000f65e16cb15a76fc408beabbd219e3", "0x000000000000000000000000000000a2f6f792ce9d9d148a330fabf682a0d0b7", "0x00000000000000000000000000000000000a243a33df583888f21721cfccf6c0", "0x000000000000000000000000000000cb6d5d306b6754ba07e397736489c614e2", "0x000000000000000000000000000000000005caedb54aad66bad31ff224151ec3", "0x000000000000000000000000000000f1e5fcf49bc8ac16b03b30c861fad85fe6", "0x00000000000000000000000000000000001fef824be2fa25332c2bca21d3126b", "0x0000000000000000000000000000000ab9955eec0d74eb799afed2a802b24d75", "0x00000000000000000000000000000000001fcbe43ea105b30d36ed0b21b03411", "0x000000000000000000000000000000d66b1d5433f1aa5305cd1edce7c22de466", "0x00000000000000000000000000000000002331546a256b8a3b751956806680d4", "0x0000000000000000000000000000002b1c1c2637db3f8fecd9d8bb38442cc468", "0x00000000000000000000000000000000000450f8716810dff987300c3bc10a89", "0x0000000000000000000000000000005db2bf83f8a194086a4cca39916b578faf", "0x000000000000000000000000000000000010005567f9eb3d3a97098baa0d71c6", "0x00000000000000000000000000000031e12e1ce3a444583203ea04c16ec69eb2", "0x0000000000000000000000000000000000103bcf2cf468d53c71d57b5c0ab312", "0x0000000000000000000000000000004207277f4116e0af5a9268b38a5d34910b", "0x00000000000000000000000000000000000c5d6e7a8b0b14d4ed8f51217ae8af", "0x00000000000000000000000000000083bc4ff48edd6aa66759994187f28dd173", "0x000000000000000000000000000000000017cb85a0f539b780ee6319982f5ba4", "0x00000000000000000000000000000012fb642de7b51efcce75a189bdf598f3b8", "0x000000000000000000000000000000000026fa70b6c942ddd3700064b48ba1ee", "0x000000000000000000000000000000eb0ab515191143e5a3c8bd587526486628", "0x0000000000000000000000000000000000132b76a71278e567595f3aaf837a72", "0x0000000000000000000000000000002c37ccc495848c2887f98bfbaca776ca39", "0x00000000000000000000000000000000002c6b2a0de0a3fefdfc4fb4f3b8381d", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000000000f68b70e0e4b0cb9e2c7bd64fa4b75b32dd", "0x00000000000000000000000000000000001bcedd9106bdd4e13e0b751c672a83", "0x00000000000000000000000000000042fd857eb4bf620db08b0e181807df9f59", "0x00000000000000000000000000000000001ccfa89524772b4bd5b6bf6741d71f"] diff --git a/noir/noir-repo/test_programs/execution_success/verify_rollup_honk_proof/Prover.toml b/noir/noir-repo/test_programs/execution_success/verify_rollup_honk_proof/Prover.toml index 4c4591c2f4de..559149c7ec69 100644 --- a/noir/noir-repo/test_programs/execution_success/verify_rollup_honk_proof/Prover.toml +++ b/noir/noir-repo/test_programs/execution_success/verify_rollup_honk_proof/Prover.toml @@ -1,4 +1,4 @@ key_hash = "0x0000000000000000000000000000000000000000000000000000000000000000" -proof = ["0x0000000000000000000000000000000000000000000000000000000000001000", "0x000000000000000000000000000000000000000000000000000000000000001b", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000042ab5d6d1986846cf", "0x00000000000000000000000000000000000000000000000b75c020998797da78", "0x0000000000000000000000000000000000000000000000005a107acb64952eca", "0x000000000000000000000000000000000000000000000000000031e97a575e9d", "0x00000000000000000000000000000000000000000000000b5666547acf8bd5a4", "0x00000000000000000000000000000000000000000000000c410db10a01750aeb", "0x00000000000000000000000000000000000000000000000d722669117f9758a4", "0x000000000000000000000000000000000000000000000000000178cbf4206471", "0x000000000000000000000000000000000000000000000000e91b8a11e7842c38", "0x000000000000000000000000000000000000000000000007fd51009034b3357f", "0x000000000000000000000000000000000000000000000009889939f81e9c7402", "0x0000000000000000000000000000000000000000000000000000f94656a2ca48", "0x000000000000000000000000000000000000000000000006fb128b46c1ddb67f", "0x0000000000000000000000000000000000000000000000093fe27776f50224bd", "0x000000000000000000000000000000000000000000000004a0c80c0da527a081", "0x0000000000000000000000000000000000000000000000000001b52c2020d746", "0x00000000000000000000000000000000000000000000000198351784bcb51220", "0x0000000000000000000000000000000000000000000000010d0f8f1f7113655e", "0x000000000000000000000000000000000000000000000004112bf58ccdc9d1a6", "0x0000000000000000000000000000000000000000000000000002a60f71be5fae", "0x00000000000000000000000000000000000000000000000c277ca8f3f566b58e", "0x00000000000000000000000000000000000000000000000eb132e7fdc58ac690", "0x000000000000000000000000000000000000000000000009f620b17904c216fc", "0x0000000000000000000000000000000000000000000000000000418193e46832", "0x16cf7cc6f21f642a8118cfa0dc61f2537a91ecacc5f3668eabd665cc680e03fb", "0x18158b8584791bfbe5ee10a85fdd34c00d56a8a5d88129ffe078746088491b46", "0x000000000000000000000000000000f31a9f28cd3a9e1f6075aaf9ec8727208c", "0x00000000000000000000000000000000001233f898e5172cd4bc911b998709fe", "0x000000000000000000000000000000ca718983bbd788cb6bb027395398bb2eb4", "0x000000000000000000000000000000000005b1206cd018c3ccdef2d56d001872", "0x00000000000000000000000000000078e6f7d3378f422821fb4d4c068b216657", "0x000000000000000000000000000000000003b440ded66529bee75ef104f807dc", "0x000000000000000000000000000000803d9477bd05cdc528ae79ac9ac3063b59", "0x00000000000000000000000000000000001fbc07b498117324c534a1959454de", "0x000000000000000000000000000000186d9a95a47ff0ad2b0140d0d4617c19a2", "0x00000000000000000000000000000000001ae8fbb60548a48b872fc55c81ae2a", "0x0000000000000000000000000000003b01e2f9a4875516f4efaa4e8927193d77", "0x00000000000000000000000000000000001e49d5f5e233972d0ce5bd6affcbd2", "0x0000000000000000000000000000002a171861b26b214d20a7cb4d428a270b19", "0x000000000000000000000000000000000006d220e2a01128ecd1358cfd02bb10", "0x000000000000000000000000000000e45bf2a5a87cf3f64798f8279a77be8f0b", "0x00000000000000000000000000000000001fc24780eee3fa3aedc08349ec0a49", "0x0000000000000000000000000000002a171861b26b214d20a7cb4d428a270b19", "0x000000000000000000000000000000000006d220e2a01128ecd1358cfd02bb10", "0x000000000000000000000000000000e45bf2a5a87cf3f64798f8279a77be8f0b", "0x00000000000000000000000000000000001fc24780eee3fa3aedc08349ec0a49", "0x0000000000000000000000000000001d37b931273e72178e88ce50335e2dc83e", "0x00000000000000000000000000000000000511d63534ad2ccafc77415b1a29b0", "0x000000000000000000000000000000e7d019c73ebbc6451c01ac52f156ecf865", "0x0000000000000000000000000000000000268c3d97d581e919b815696da25cc3", "0x0000000000000000000000000000000d9599859b3bdcdb478812ee25d2f0eeee", "0x000000000000000000000000000000000026c9e7abbb73875fddb1ac55cdf1e2", "0x00000000000000000000000000000033c989fdb71acf8d4184c7a0d321e08d73", "0x00000000000000000000000000000000001c175d26699767e4c519b04251b5ee", "0x0000000000000000000000000000000f92946b5ba26bb09b66d65834d2f4cf5b", "0x000000000000000000000000000000000012b63a80baf4d982c5122a471bc42a", "0x0000000000000000000000000000006fa3c86e91550801f284938bfa104ca096", "0x00000000000000000000000000000000002c51726c2563a7b5d9dc69ea0263fc", "0x306287f56c48effd2f9699a46db9267c91263b6de06d7b7be9cfa4662dab37dd", "0x0001c67d74e8b02c88b9ac1213c831e0970dacda994bf5155a12512dc254c824", "0x1925a443b3d49b3a0d80d8ca41c6f32687b5dfaaa8f21a65517bc5db6bd1e47b", "0x251a4faf274456bbe0c7f69fa8f67e5a1c079622d6233f636500dfbcf9b621cb", "0x0e6a61c9e1bafd7067d9830443de3c05afc3dd79f45a195de5a90732a0868f45", "0x0a7245508b1615f792270dba05f387ada642988a9584ffb4030c4a90c7efcf12", "0x15863f2959c9d468cf756679c24ad8d8aeca54121684681e546e5e40a0b6ceb0", "0x0404eef3cb7467c0065e2ed7525a88d3d9b8d62fe0c441ed5fc2439722641f02", "0x08f4ec100b001fba3c773208d57cc0b6416ca1341e02129e717d93fc2e3e40c2", "0x0a49765410098eb75f5e725f163dbfa492e91b739f0cbcd6ac8a84898d0c4b55", "0x191eec3f8f395fb4c4fea8cd5e726d5a01b8f7de6d73b92af658a9826982effa", "0x27dadf71f0d9b4b09eb744718d20bed1185bf6fe9074c0e38a3574a9fef10468", "0x000daf66f8c35c1d3b887a3f974bde18e804ac7768fea8257518ae1303d441d8", "0x1622a82d0d30d00a9a5df5e5448ce64e575385413872f601a5d3f507eb07004a", "0x2d6191ae1a2657e766345dd4e60c43db5043bbda7b159b768dffa0371055901a", "0x2544bbdd4ce4b098eb4feddcaa7aa95a69f418f205d3e6716cf20d6d607b31fc", "0x27539990c10c0e5d05e07efa3c268354576cb00e2e50d27ae72204baa46a04f2", "0x1bf39a47211a4b4224dc726a437ea853097dfc7ada0f3e2d4e3f4d3a7edd1bc4", "0x15759bd32285dc0c51e46a0eeea80f755bfa77e18a65c62e241a2c7fbb8370b8", "0x2616a41128e14a226c459a93a19b13de581caa4f75c6368dbf7257a323fc84b9", "0x1bc5b5a9238571c7efeb9e992e4b410e2affdf015518126bc6b23ca2986d02c6", "0x08a03b8831139f22a329f22ab8a87eed1c9313db7d993718c6b1c0735e66a719", "0x2e3e957d6c4b250f0cdbdd00ada94bb53dc70104196176e9abe473647aa86a09", "0x1b6c77870100cd99fa8a85db4bdcab5da5c3505704cfbb2bda11463d25b6eea6", "0x00e1e81ba9dfbd1b7cd9192d5f0218c2eff9bf6f4dd859e07bdb163633ebf310", "0x2e7d519ecb078293b55adc1f9078e01f375a97dc2374725c9b178bb1df019aea", "0x0af9c92343c56476189c42b4c578a170c85111555b3fddaa74666a0f7f860ec1", "0x213b21f0891215c865fa84e0c1744765e3c0a36b5062c39e46b95704f478f746", "0x22f71989fdc01723d4e1cc854cbd9b482af30ad642f3a5dad765e016264bfd95", "0x0de2e531eab5853f2d7759b3e258fc0d5860d10678331b00d2612c4f794538e9", "0x26d4d98c23dccd50cb40b89ea899fcc23cd06e141582932d0acf1915c85a1c6c", "0x27094a91f28e55036e178acd6adeec53adb0a4b93e8365a57f237ca9d2e94405", "0x019662c5cbf555a9b96b65742647426a33c97b595e8516c433e742b49e22cabb", "0x2d32a500f4e75b3377432fb7febb00bf1fa6306a621f8801306ab293b12b370a", "0x2984ccbc3fa69b375e758005d2e668619e71c84e007fc9361305d17c046c18b6", "0x15a8c7880db4f1e48ba2f406d514eaa76df3c8e3db2964808f38e59ab63268e0", "0x014f53ec2db52091b3a6a2d445e4bd93ac9f5ed122ba701c5682c26c1f5bc4cb", "0x1cd8668cba6d841aaad54684e3613db68dfd0a57258f5e6d7207ca5aa91f8f7c", "0x2c198f396bd3785539b5d9b8ec33da835fae84caac528b587dbfa5d380378d28", "0x1912c183ff1b57a17d1cf630346d4547566384ab3ca09602bf98d83ead40ef52", "0x23b691d4c3445720248facd6dc688d2afa13277ed408405e833a053b7543bea3", "0x275b0dfd8d39f50c6d672e02e10a775102c54674ae0eeda61acca7bd339fe3d7", "0x1ec7eaa32c32988df48890320c31e49a6d8e1db47fe19aa936433045a6b20d3e", "0x07be4532de3a24a63bee613d6b42cbd294bcf8b0fa401d9bf838f7c5a6fd7a11", "0x030d7505ece9e71c5e2fc1717cdf463c41f2be0e368bb39e8d9337652e4848c9", "0x13759dca280cbe036507810ef0baf9d02389ce0772200ceba30957c4280504fb", "0x155b5775cf065eca5d4791b76503cf6864b1f089e09658f8d73bce95aad8b63d", "0x03408af42e89123440902eee1b218ac54893a05c499e544ab152f2dc4d2a7406", "0x0f095b86ec10064e8538959a22d69f1842d0cb92a8bfc9f63e9af82d9f518aa8", "0x2ecff3efe9ca5247b99ee0ff636cb7c667ca0752ca3bd7e019750c6a0824c05e", "0x15a1eb4c9f778792e854b14a65f461491346eb3b5afbc0f47a04f37df950c0c7", "0x1c45fe9bd5a8a577e734667d5d2f75aaf042288faadd45840c15fda952d683e6", "0x0b1916e811028364d7ab4726ce9ee4158df2f3d7ec6b6de78b5dc5eb0ca33271", "0x26198efbc197e8b8995c6663dc22091aa79a66b43551576aed3bfac59a9a633c", "0x1c600b24660c474a5e7d065773c8bf46861b86bfd35263b7dedb6844cee0c2e0", "0x0f70705ffbc0c80c20feffa4040d88bda32bce28c68cae7f09f1298fa4e918b3", "0x26a5e8599e18ca537978b64c6e36d14aaaf77b1e73969ecc89d74f72c5141a91", "0x0d6d63868e3e7095a8c26da8ecd37e232f9fc59096db96f17ed3934ecba34478", "0x2193d7b12212843e643dbbdcf3cedb55fa67bac5e65a2ce8583ea507c04cce6c", "0x2141f72eb19fa0b2490400bf9b436c73f14c60e77a16138ae4b0d39629f8ed7b", "0x2e25c471d729c4742747fe52fbaf000d3b958480ea93141abbc6bb389ad854c7", "0x0b2299402112e0205f74bb313786994ca83c7bd204cca59e6dfa3b147c21203b", "0x159c2236da8acc75769bb8138dce9c6ea319651e9abed3c12ddd8f554e292486", "0x03b25006c2280965d306ba2a24c81a09d72d2b0c5f7f214221c76f6501efc911", "0x241850ae454b281ca5be4b064855da6481ce150485770e9b273de8a29a64fbd4", "0x2d1b2592def2035dacc6a50dd657994d98b669c13c8c4fa7a5de32bb1ff2afee", "0x18d3529fbe8fb1864ea8f336dc7c3088c229cfa3221d97b86b7399e3580f25be", "0x0cbc1780a299eed3dec9a3fc932606e76a56a9e6007e4818eefb3acc0c97eff1", "0x2b7951293695c48e3a040fd16efd03e6d2805a2e7d14863b12d44e2f0be6e548", "0x2e7279731396111d824de2d6fd4daf6bde38241f466774c888cab684af0310c9", "0x02787750cc8668538916ed23c77ef9f29a69904a5160910786c5e150c842fc7d", "0x0eecf3012294c565cea1737dcdaa677702e519c37394587bfb67f648712da35d", "0x04390e489dd2324235647de594b8fa12b9265f02a085e7ef528b0cde68b0c785", "0x12c1b72615ed431b56834d7427e04977c1ef53a7a8e5c8bb709f6930faa43ac9", "0x0ff305bdb025415d21cf771039088b787ea6b4f673fb88baf0bac451fd1e4b92", "0x045142ff5fe9c320cad25dc9a3cafa4668636c80228abecb46eb54c820eb2e5e", "0x2a0d0e0bcbaf05661431062ae2d2bd21fae75caa81fe7731051b64e6fbbce173", "0x23c761d849f4fabddd42918bdb9acd36381667f3ea3610c7a1599ba6096ca70d", "0x24091599cb2e211ed9d108b9197a3827507232941dc23113dbcee7e3459ccbd9", "0x0302343a788ded8936bb590a8eefd4aec4d704c2c6c24d70a60e4870c75196a1", "0x291b653f0b3b851572d7c0db159f88659326d61d1bd265bb08556e0e2156b753", "0x2e6683095e6a8ecff419b9c1bda2fca70f2686d7458230fcdb0b061469f91dea", "0x0856b8f721b54e425fe9aa589ba710f2845e72fc351793738df49c40967d716f", "0x12ae3e5184a7fed794ac452f94d51221ba134cf35f35179b66349bc4f426f33f", "0x23c35f99e0892be80095db2623042be2742c2b138b1df1efe03bd899dd35937d", "0x036bd6bd2b5b631e928f002e91ca13c55c24ad1b915839582709d0aabb1a3082", "0x1fb1cfc6f64e0b2e0a1d9bafc1702a468197f4a2fe41b233e04203dd699131fb", "0x1cfa0be2485c7cc8baee2f61c8059b887b581e4eab15c23941d226e3c2c849e1", "0x1fb8e18786782eb1842c6f1f4eb4cf22e1b8c5f310a6346db75735387f80013d", "0x20921175a4d50b6f672caffce2f12040e6e3bc792c4f38cb51b477fa19f12364", "0x15b7206684270facba2d70bf47ffa4f7d449f65cff70f8021b6a06598d60f4ea", "0x06932a178b45439cdc4e2c0313aaa31c29f561dea1e200d2347e82e1dcb2985d", "0x1486c1622fec7d6e0f7f08b4185daa992d0515e1e7ff782944cda22ff0df6065", "0x15ef8cf4627592aabc6efc812e210d4dfc4da02e41e53320b61364bd21deceed", "0x0a7974b21e7412c8ebe6c76217e74810a2b81eeda730a263ac64fb3bba2ec025", "0x046f771fc1399865a01e60419d2c969279fe1675aa0eeeb6a439e23a46813c89", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x166c19d70d8289a27c0eb973c525449ff7c70f23b32c38664848d4e4f14c955e", "0x22a2a920418bc6b0e16bd4b1696403b50d767a2339f788c62d3501dfd6d49554", "0x1c98c74062a05e52635b8cd160f7a76ec9045086de6fd29a2fdb2d51263bcc79", "0x1a3fc6e17e3a842c75bec9c41eeeb86751d10593ac2f69e6613c6608ce1e81f5", "0x21b27032c51038cf5487c60cf185d961fdec079677d267de3584d0b10c725240", "0x2de258ec1715ebc899390c9b05df9d65bd4757b569e5089afe6fc5c82c644b6b", "0x17061178ce0a7677558f33c2d6e4df02abb874f0ce7c22ad6a4a970161e0067f", "0x0169fa33066295974bb138801aacb5394816f5e05f242777d01b61b26e9eb2a7", "0x083eb97ea0e9791b11e64d920061cdff4622e9667a1760a80daa0dccfcafa042", "0x14b2070214354b2a8d7bd85efd042b2694677e41f5eb086f661df62be9d2409b", "0x2ea8ff97b1f59d4140c261964679111a963887587083e2443fa501f5e04245a1", "0x0ea3f4b3a74a29e3b5915426dff09eecf626ccd235f440a0adb67dbee38b8a18", "0x0898eaf4c2a5b4fd444e4f6260ad50e8df5ee1122cfb24c92dc606e4c617e076", "0x2e999b837edd61563dd94622763ba78468dab492c60829b55ad0b7095657826b", "0x180b65b148ae698c1018f24bfb49d4a700f67c47743e00efd34664e55ef632bc", "0x1eb2e1145982710a3ec233db72a0e4503883915b5e40ca5176b690af47c9ad87", "0x0c02c12a4089148c7a6e04277d9fea54915a88bc9f8d82cf4d58678a134e0124", "0x1715e74ad1c0bb740556e1e0227ce90e02310f5b033d5432559413a654f66fc2", "0x2de1d99911bcca2220e64331bc24481772f6ce35eebb082d63b3eab29a9b757b", "0x29327816bcf7c5c7ab28e339320f894dde297645c27d0aa0cee46a5c40471d0b", "0x07de8fabb98b1082d45824659e4b0ea62df3b7b76f26edfd9d67105a04ad75f8", "0x2e5bea4efb41fc22121db6fe400d91132968c5d898c14a0568610578fb7d9d57", "0x2f12a17b5d6bc006672bf388fd786fe2a0b3a15c380147fa4b7bd2b695c8101f", "0x26f724ff2a50863698db3dcfff0886edd8983d0c79fb5c1e5f591c5da66b302e", "0x1d1c4729b0d36cbcd59d69128fe6107a5d2280cd4ac31cfabad0262b51f00fe3", "0x14b18cd70319121bbc9cad9171e55d538864f9101cdd171e44b4058519cef3f9", "0x079a0b9d12cdf0cfb34a3708a4850a998cbd9b5ec62ce3f1103adac2fdd8a820", "0x12304d32e34962cf30b9955972c350e359d6bf62d0de9c98c72d9f0ab51131bd", "0x1b6ff02390ab39e40e65e045040f6e777ebfdea61902709dff743594eaf89509", "0x0e6e12ee6f19e11a543e63c4402419d0f07b424aec46eb4b909e090e57a6e6ea", "0x0e586c602754d885e91f077f9f219c1935a25c1ff5656fe5b445bff7efbef1a0", "0x116eb62fe75014d073f3526bbd97269f41064cdec2fefaab38a0acb333dd01bd", "0x1282bd7d7cbf0b806f729e331c1a7ac0c2598e2d75d1d2e0d62f3177df456b65", "0x0a85412e6b0eec538dd5038b532fb9e8e78476f1c4c677ba4e1ab310bbe40881", "0x0a85412e6b0eec538dd5038b532fb9e8e78476f1c4c677ba4e1ab310bbe40881", "0x2ffadaf1e9bf16dacff62d3ffb2d0f531da05737784be3a2d8eb61cafeed5560", "0x2002a5977ca93eb87d175fe3becb116997eac4993bbb73ec86d9326e1870bf2d", "0x1b418c821f6658d3c049194500604a449a1f7dc0d4aba87ad2bf554beefcfca5", "0x26407c0e8e64c2d127867b79cd0eef3edd6331ff3ed73d690eb748d94e08a9da", "0x2d4d4d75b30f50f2c562a046416637321909ec5bbc8c42eeb821b9326f89082a", "0x0000000000000000000000000000004f3b54655d2514081bf5b44620a2321680", "0x0000000000000000000000000000000000115472529ac9d0d7f94b6e15c6577b", "0x0000000000000000000000000000008ab9aa27023aa3fc58f408ab70b61a95b4", "0x00000000000000000000000000000000001118c892f3db5267f7d6d914edc04b", "0x0000000000000000000000000000001e8e1a870c828d9f8dddb0bdd8717a1150", "0x00000000000000000000000000000000001543c08c73ce441069251bee8a7ccf", "0x0000000000000000000000000000008215f11fa2188558ff721f8375825fb83c", "0x00000000000000000000000000000000000e31ae1d3a8332ed8cd38a8b209732", "0x000000000000000000000000000000d3ec44f7b83edc73d68c8892508d1592bd", "0x000000000000000000000000000000000006c1040c255d7b7688c31b4510f23b", "0x000000000000000000000000000000ec0d8427da7f35dedc93a42151b733feda", "0x0000000000000000000000000000000000296be1164397e24a3a95191d8f6acc", "0x0000000000000000000000000000006ef8210a3d90676f69caa1fe5d8353c226", "0x000000000000000000000000000000000024da7d17ed96fd2936e4bf381c460b", "0x000000000000000000000000000000d77f23fcadf7a6c19b7abef79268be9d30", "0x000000000000000000000000000000000007633ab01f5031fce5f16dba2b8e85", "0x0000000000000000000000000000005373fa1bb2baf156400ff4e60e6d9e84a3", "0x0000000000000000000000000000000000027e546ad562d24dae1063cbdbc5b4", "0x000000000000000000000000000000215aace588221c522bbc3d37eeb6f5273a", "0x0000000000000000000000000000000000063836cba05de3aa7813f54ed551b0", "0x000000000000000000000000000000050ae581123a9f65c92e35fd8fa9701dbc", "0x00000000000000000000000000000000002410871be237d666ed18fbaa0d4b53", "0x000000000000000000000000000000cd56ffd0cd263e30b90a521fd5b596fafe", "0x000000000000000000000000000000000002c79b34816830ec1e23bb1c131378", "0x000000000000000000000000000000150243fc42bde77914c155525f502b52cc", "0x000000000000000000000000000000000018bb64e2202e775ba805ed061abbdd", "0x000000000000000000000000000000d6b80a8a854fca134bb93030711f047275", "0x00000000000000000000000000000000000a87725eff75afc2d27f36b70ce951", "0x0000000000000000000000000000008af1e797628750941961d1ef9244b50f60", "0x000000000000000000000000000000000028b2290830a86f3bcd9db3a086251a", "0x00000000000000000000000000000007c3e0411ed5f2f276d2a658a9771a18a2", "0x00000000000000000000000000000000000974acd5f5847e300968d89b5a9ca9", "0x000000000000000000000000000000cb629eb69673c03619a88d48ca9ae68970", "0x00000000000000000000000000000000001d114437273293fd65b36e8321e274", "0x000000000000000000000000000000ecb2df851d702c95bd599346fb56d68e3e", "0x00000000000000000000000000000000002653d2cd543961e9e83a93387e9b96", "0x000000000000000000000000000000ead451fa7ba7e312c96a74107c27ad9736", "0x000000000000000000000000000000000011b952a737bcee1489197a273fb677", "0x0000000000000000000000000000006829212925ff54efee074c43911a3bca56", "0x00000000000000000000000000000000001fcd76b6a7065773fff04246a0dde7", "0x0000000000000000000000000000009585201bb8a8aaca49f72e3ef81fd0182b", "0x00000000000000000000000000000000002e3e3c6039ddf04d350f64019bb10e", "0x000000000000000000000000000000e4b332d5cc93d838948795e32bce4f9048", "0x00000000000000000000000000000000000bbbc875dc13137229856beeaa8f3e", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x22206fcc5c3b0898156852484d5f37f85d35d8b8aeb565697dd199d09e7a5cec", "0x19d3624ed1ab8eb7cb2c0c611f105cac54fd99cb83d3e1a3118aaded389a1962", "0x195139b81a6b92e865e582abbd4bfffb20a58dabe86663c2970374b4c332a08b", "0x217c7b444d49a26539a8f4fa6986dfd99e6c54123b3176a328f982d53c93f780", "0x2aea9a445c7855ada0acd0217ae4ae246ce32e7d3184876be8facd5d6ad7cf21", "0x229635ed1530b6d4c1bcaab18683ee77de072256ff66e89ce73f0871e8629b6f", "0x0d2e7c3d34ec80dbf267d86a682f348de3efef15097b4800c0a3920b5ac828bf", "0x25bf71d3459cb3b36e082388eb0bcbed1c47aac10167983a8d746a9ae4eced96", "0x1ccaaea883ccd7ac517f8d79afcddb652e0ef1895649b1f3468390a80731e1b7", "0x0be5724df9d80b16038ec9bbea91bab1dd7b4c87653a86a9e9ad386406659a1f", "0x2b78eea73d09a89dc9d114e9b3f26af9ddebb6dd36abd2efbc39abfe905d1aa1", "0x17edf16afacd239c408db23dce3db2ca0bfc154217a345cbadc130994fe53ed1", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000000000807a729ac756815393e47d04c6246b8348", "0x000000000000000000000000000000000019f305937c8c47b7dacf5fab1aa8b4", "0x000000000000000000000000000000c0ed4e98aa74ce610873cabc4b95a00134", "0x00000000000000000000000000000000000d516bc6b3a02be3f087b76c12be88", "0x000000000000000000000000000000e45af0c8ba661e75785fd2471326778e10", "0x00000000000000000000000000000000001589091efbdf11f8afa9c2d54dad86", "0x000000000000000000000000000000ffe3819b65cb309abdc6119ee873a7046a", "0x00000000000000000000000000000000000f2d67fc9070b0b7363747463c12a6", "0x0000000000000000000000000000000000000000000000000000000000000004", "0x1259539942eec51d5c53a19e6a6509d0bb10652a0ae852c7a4d48691a07c2d04", "0x21327da46c2c2f5183a7bb7a555d692582cb43319d028003ae3314427b2e2cee", "0x11ae288d0ebed5c93eb043e8e9e0a5a8da2e73c9564c013f6f77e2c75d9b6afb", "0x149ea3efa38041e1c2a490c28743de7ef70ed1ceac3290a147dbdb7427a1e5f7", "0x0ff8f2dcfa13ab248c35e38b827eb564140acca19094bd3f6b43480c24b1179b", "0x1d362e1726dce5a89a0b1028b5ae19c553cc33de9ad99ffb4a6f4df311a4c861", "0x03d28762bf78921834d18558fc20481a6921d4a863426a993d36ba0d9147bb58", "0x2fc693fe8b1c2bf894dc0ea77917c0e114b69ae0fe5e4aec86d813f485c9cfe1", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x025f07864b94d3ac018dc7e250aa8cd4cf266e8a258bc88bfd0f06eb19638b9f", "0x2f16d6396da879ee6c9d00000ceb26718cb7f696535e7700c57a49ead54acb67", "0x000000000000000000000000000000e7d4d22c7924866dbd40a7d07c78f3d221", "0x000000000000000000000000000000000011d8a95d17e954a17361390291aa74"] +proof = ["0x0000000000000000000000000000000000000000000000000000000000001000", "0x000000000000000000000000000000000000000000000000000000000000001b", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000042ab5d6d1986846cf", "0x00000000000000000000000000000000000000000000000b75c020998797da78", "0x0000000000000000000000000000000000000000000000005a107acb64952eca", "0x000000000000000000000000000000000000000000000000000031e97a575e9d", "0x00000000000000000000000000000000000000000000000b5666547acf8bd5a4", "0x00000000000000000000000000000000000000000000000c410db10a01750aeb", "0x00000000000000000000000000000000000000000000000d722669117f9758a4", "0x000000000000000000000000000000000000000000000000000178cbf4206471", "0x000000000000000000000000000000000000000000000000e91b8a11e7842c38", "0x000000000000000000000000000000000000000000000007fd51009034b3357f", "0x000000000000000000000000000000000000000000000009889939f81e9c7402", "0x0000000000000000000000000000000000000000000000000000f94656a2ca48", "0x000000000000000000000000000000000000000000000006fb128b46c1ddb67f", "0x0000000000000000000000000000000000000000000000093fe27776f50224bd", "0x000000000000000000000000000000000000000000000004a0c80c0da527a081", "0x0000000000000000000000000000000000000000000000000001b52c2020d746", "0x00000000000000000000000000000000000000000000000b8746002cbbcd311d", "0x00000000000000000000000000000000000000000000000d84045a5cddfe424e", "0x0000000000000000000000000000000000000000000000088936c2d073d67c62", "0x000000000000000000000000000000000000000000000000000068c36330fc9a", "0x00000000000000000000000000000000000000000000000acb5cc273fdec4ef9", "0x00000000000000000000000000000000000000000000000c26692b23b10f94ff", "0x000000000000000000000000000000000000000000000006f3c82642dbffc654", "0x00000000000000000000000000000000000000000000000000004161bbdf59c2", "0x27077141b3b69eef68bdb60ba306990b34262f742a633f61f108a83fb1124027", "0x2fbebd1bc360ebf2bc23794e8105aff514e7e3aa74470a6a868adae73fd8e1cc", "0x00000000000000000000000000000065c6196a352c9951ee52aa570e726f366f", "0x00000000000000000000000000000000000eac9d2c7814fc13cfe594cb71344b", "0x0000000000000000000000000000004e4bd661854ff161aa8e5c6a060996831a", "0x00000000000000000000000000000000000aa6094cdaac9a33be9ca0a0ee0602", "0x0000000000000000000000000000002ad76268ce80801b402a58e96ac84066ea", "0x00000000000000000000000000000000000cf642819500a84b75396476d57473", "0x00000000000000000000000000000027988a8f8dda439138efc182ecf7822b65", "0x00000000000000000000000000000000002291dc80f736fb01b9ba68d49d078d", "0x0000000000000000000000000000009ff0931d03876326c74094d6c63a9db7e2", "0x00000000000000000000000000000000000eb3bbc61161d2047ae2a2a30bb7e7", "0x0000000000000000000000000000006af2209dce0dbcb1c02d14531610a63a87", "0x0000000000000000000000000000000000228f7864cfb58c999d53bba03fabd2", "0x0000000000000000000000000000002a171861b26b214d20a7cb4d428a270b19", "0x000000000000000000000000000000000006d220e2a01128ecd1358cfd02bb10", "0x000000000000000000000000000000e45bf2a5a87cf3f64798f8279a77be8f0b", "0x00000000000000000000000000000000001fc24780eee3fa3aedc08349ec0a49", "0x0000000000000000000000000000002a171861b26b214d20a7cb4d428a270b19", "0x000000000000000000000000000000000006d220e2a01128ecd1358cfd02bb10", "0x000000000000000000000000000000e45bf2a5a87cf3f64798f8279a77be8f0b", "0x00000000000000000000000000000000001fc24780eee3fa3aedc08349ec0a49", "0x0000000000000000000000000000008bf0c4055432b864ffb9f8d410675576d2", "0x00000000000000000000000000000000000a16292e62c9ed0c299e3b7b7f3530", "0x000000000000000000000000000000584b711e8d292f830cb608a4a05a227076", "0x00000000000000000000000000000000000d4fda7fbe28b5146d303e26aa9a8f", "0x000000000000000000000000000000d02d8266cf951520fa3852cbc5e1f9312e", "0x00000000000000000000000000000000001d2b2157f41fc5b03f9a5ac57b6783", "0x0000000000000000000000000000002059fbb0f8ee0c7aaa185260fd7c321fc3", "0x00000000000000000000000000000000001ee440dcbb2e4f24ed68334e45e527", "0x00000000000000000000000000000022dd9b5c2e8bd4aa74677b7a9af6d902d5", "0x00000000000000000000000000000000001897a238b24d0a1cd4a06f509e5a26", "0x00000000000000000000000000000065623e6a05bfabbbc2f1d64fe431788745", "0x00000000000000000000000000000000001c8ad93dccd171298381bd3a26936a", "0x025f5c37ea0e38a104ef32fdbfd3145a07fd306b50a75e59e2ebe31af3a52c05", "0x2e04f23af7236788b36112b8c1ae44032036b7dd2912123760f61278fc5ad3fc", "0x0b0af65835f3bd70dacb82baad996e5072a98ed8000575b667ff973b7734f65c", "0x24717a5fc222a95e324b80209496f4696ced88b6eb0bfc2c37e5dd3ce8e1a2a1", "0x2a149ea427afe59e5a2e037e1f097ad9ece9be5f692f9492242c1a93024b5653", "0x0f6e10b5a83dde62698e0a00cd2f6f5f5c7a27f6a2f4d554db895e6bc6136ef0", "0x18e6029412bbcf4b7beaeba809321e35950b2c12c1a3d73e9eeaec81cc001442", "0x0817e8ca0ea53812f70744488c49af40b35f0cb0d798300dabccdabb925d9b22", "0x0e8db3dfffe1501b381587e08a1ba003d98167a4f91d88f156b09f13a5dbdd47", "0x22d22d247c91efe1f297fc7b8c3b40eb2dcf815a2dc0142c2ccec80157e2420a", "0x19947dd6e7df9c6eee2a464131ac868fa85e12c569afe687ea8d0c62ffd59233", "0x1d2c914f77a56279a0c9d32db065f2dbd10f2f8d842dc0014d551031041f7aa7", "0x1d29745d02ec5f169e2a9db489e3944ed15ee4e8b629bb647dbbd38427d5029e", "0x09bf58b5921e8cb2372521f7e8a8502235f156606c3098ffbe987b48b2af4073", "0x05a7cc2a5940b521239644d7250513bff7645f16eb0eb0683e3929260f81cdb6", "0x2dab86b959d04873c610a1676e233cce79fce6fdd3b5a82e81f1f773012efa7e", "0x0a255443bc8d00f60335d90fc9cd705d7b06a303c690f1312ade848358881e75", "0x076648a5db79df2a48cea47faa78c8adc59847be294457d8e8db7f8326c7b339", "0x1a553cf1f9ef08ba1c162910806cc5bd4b01db74f2c4985786a854cde1f52441", "0x225165901686b64f9de109f03fe3c843b56a2eae98d375ea620300dfdcce443c", "0x171e7fddc3036c8856c695e490e190646aaafc76cf2ed30d983bfadae66d3bdf", "0x2817863863d702dea17af857ddde79f0f76aee8bc35b7ffb691c9e80d33cde61", "0x1612ff7f39c0146c68b35c620c105e0bd92b2af5a589410af5b183aa68021f1d", "0x0cac976fc3d15c7bdc57465aef613e8989b74e6e334153bd89904629e6faa866", "0x1255fe9e9f69c6251d8079a44998e888e46bc3876e03c7cb9c7e62ddbd99e677", "0x20b44b67b2b9e6a634870c3af4fc84398954c7f3fd8a953511b65d10e23c4d81", "0x08cbad1a18b57f06777bec129d814b85600d66b47b60000b647db7a0e90fec39", "0x1908598df043a822b0e01f30c1fd77784896ab94ea66c6aa2da6b05f5de07433", "0x0b0be106eace90ba40992ff3a5f57681558e405aa66785006f83a378139d6822", "0x1a44dd9394351a1727d7ad5f6975edf97807ac8cc7b5cb02ac00117153014965", "0x0b622689d0db488b7cc81e840c432e207223a4f1331bc134b1e614fc02e3cc4a", "0x070a24a894645bc8deaa11efee6a0f0e7f7f3248b3de515bda529bc0fa758064", "0x09c434c45dbbbf2773438282e34930de805859da6f4daffd7640897331b6962d", "0x2f31aadb6eca7198272529d7cdbdd71234eda2815cac236e2cd76a52142d6b2d", "0x0fcd848eb33c87bb74a18c180edbf59191c2175479fa724de7d0afc4efc6b951", "0x138e8285ce88659c4b79a30c05a738f4c00aeb0100a9ea1f26fdec90aba2ad75", "0x071ca2dce8bab66696b99edf1f5fa5023bea9e657525444cfe56d29ff7d81106", "0x0f7e018b0132e26b51b786c44ae718d258630faa273b3f3d089abbb71f4ad8bf", "0x1d5b6c5b9124f124c25b00dbcff98926d1de8f28b2755020c6039e5f7d170017", "0x10b670af86d16e5653babf56bc8c89c7c83961a4d5a808aac1dcce0788ffef76", "0x284629a1f1cb8f26390401f570a46e043b06eb245b313e5233de51fda18af292", "0x179caea1d3b52e9884a6d4862e860d0d0867002b15f5ae5efc00d21e4ffecd0a", "0x14286e9f7472a7b61c36f20d72384213508c0b1b7a538f86b58ad9dc44bb110b", "0x24dd004f49596ad62b68cfea222acf35265f76e99ba921e3e91a34850ec5d89c", "0x09aadee62531248ad35126722e4d98eb4f2796d25e8f2b9fc8d908508f1c6850", "0x2f36e98d9402e18e3ab004bb128ddbe09539d0f69656a05272bd0a97966da1fd", "0x2479f4a4677186790630040e24f0bf9a4b131b3c33cd2cd8b0821319224bb0db", "0x304971c815b4065d9dda595382f892e960d6f82f88de4445e57c627f63818b9a", "0x2f53fb025635bdecaa81dbfc096bda42a60a1b8a1e133422d8b1ab66713d093e", "0x22450012367334753f7cb2c27cc360540246865b476a61655676a6b831f2935e", "0x1a7395119ef24d3e90d317574317fa0132effd35c5b538d39548ff69c6e035b6", "0x28932e09d058c5883671a632a9213ef780aca7cd8336431e5302fc1b74ed37f6", "0x209a8ff5a11f1c328921ec2e0be429710b7abcb581cd0b13f187ce4d10c86c86", "0x24681e237c8b186c1fa2d889a76617e781364880b4cc069f1c6b64e729a92fc9", "0x0df482c84a01dd32e6744639a1982739850e72a4d153767142028026e4466c20", "0x0775a3c226714a03368384158395ef8ecf9fee9f3e5d2a23563a2e958be61e0e", "0x144f4b74b34652087138c8f5252a7a56632a0e3f6c96e37c638571d75673e9b8", "0x24ad0a0a8649ba88dec87c938a1911ffd4f9e45f22bf3ccb6b40d00a52307ce4", "0x074835ca1b4ac1e703ee952bae884b833a4597de0906b6d8cc85559c7d7d466b", "0x21c618e70de949dd894270be6bdac5e0fe0e364bd27fe2b45c54442601047bb5", "0x2776f41a215cc480e20cff7d80f37758e373b9a655b14cffbe0dd1ad20b0d3fa", "0x1909a023dff04cd83875e8621d1f639b34a2055e824cabdc91b8eacae28f1222", "0x02219cc97f57dddef9f31ef420a2d4ebff434e5b0c9a2d609becce8186e3c761", "0x115fbf5eeefe29e11f72b79794d5a588240a58d0a336ba1ef8c45be25852b2e0", "0x05c563283984ed7f9fca5bb7dfdc595fe05f80b096ed192e1754f70c8add451d", "0x22fda8d37d884c75e1d4f3bb62e8511c9475d4509753981d0e0a9b9ba004559e", "0x1ae7cc16832942b0cc37936bfc8ba48b0b7178ffd4907956592125f77e5f0acf", "0x069a2009413f8b7b13ad0e29ebb7d77e79962324860c373e5a4dc88184acf2cb", "0x1527b22cf81c5a5e061f872a8754483caea31c78ab8e823835bee1b95c2fbc2b", "0x22fa65608e96af14215b06c04df266b326b4e385c5d7f5b516494e12455677db", "0x26f5d12fb4e6c0a6d9506bac8b4ce6b6e53393e4aff865df56a56960ed08251d", "0x026c0a3e4964eaf24c0a92907b907b3fce8e5d450d2dad25260afe137e3ee3c8", "0x23dccaf45c2c563d4cbf408454a935cec82365ab40d755aa6f5cec347f26219c", "0x08f2866c2013554b4d4276c4a81343a215dcf83eb26cf6dddfe99ddf8d72aba9", "0x284b9052a96cb05f0fdb308f543e21a926c4f3c64014b3a6d242ccf7cf8f3f6a", "0x2ce884fb94718be5fffe21db4b6fc8fe2c6fe08d6f4e725dd29995154dd5f57e", "0x07d329b62f9800b4d89cb3112424c33e0cfebe8500a86d9ae17207062702b4fa", "0x1b533ad65f00e02c664ce16a1b64a3a8fb2ca8b8e1b107e4cc40fe564c5801dd", "0x266a555b60e3dafc89b2880adf1ff397be00c1decbc3c838f761dcd8f5d872a7", "0x11264a632f2e0b3e86fb30267586ab258e0ae2ab0bc49e814f7a38b1f3886a54", "0x0e57559b8cc8d54d3cfb830acbc43d84afdd74ed6857a1afa8f81387286a0a7c", "0x21862b599dbfbc49a35e88bc262b898a147791d061ca3dc7fa4af7fb4c732b88", "0x2b6c18561289ded21def5b9238757cf8b12970a9704094123093dcad1cc15c22", "0x2a1792b5e883ede1eab7443b35482240e0d17062eac4d8bde58c35859bcbc387", "0x17d85c38220545b7e7a9be06b153a19c8e1010a71b47f07fd62044188b353064", "0x256944755fcf0e24bb0f782d535f880a1cea528d6e0630d4ebefed1db9470829", "0x16222c2b9e472307c9dc2316fbb48b0d4c76012eb087541243ba9d320fd861f4", "0x1ceb17923fba82df59ceccee8d985ea828330e5c26e4be2f3321819f838cb19d", "0x026b8f46fda3b85e263af5c77048b09a5d6b50d95e405514fda136d8726194fd", "0x18479d53ed62b7c11c4f4dcc09c4d0411d5e14a1cd6f482159caa0d36c040606", "0x1c2cb816c03d52bd3892f7010c666eb9023df6e54a9aac31a72dfb850428e61d", "0x23e62fc8f3740ee827e86987e3520213848436f2afd149822af8a3c25b97c714", "0x1279a2b9c9c69b375a3fd59fbe6bc9df9f432f63ba75e53a2d75e907cf45657d", "0x117d5edc333b97386af6f374c71ee282d7f81f42df021e39f209d0c4800d34d8", "0x27d94cf61138e0a277ba01ec8565b62c5e41aa504bbd4baa0f2e68229fa2bcb0", "0x17ba4b7c3c093d1d26d8a077a4ce7643fa792fd9ece57c8747fdf4fa2ea30695", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0b8b3217f5fe9c72fede996a5ad69d3b6acf8c160105184c40ac6983527d39a5", "0x0d43cad1f9a07883084cefb87e84e8d3122252840da8d3d02ed7ce9cc7892ced", "0x243e81bb2ffb4d40e57cafe2d24d0782f6d736a8dd7fcf8a950c5d6bf49e7c80", "0x04d2cbb4f2166cd6309c4b717a32a1a0d644b6e8f88beb141389f8f9477844e6", "0x1640750281dfdc30cdc0dd5287a47bf9901b030954f9a141ca16edf1e0cd1ce2", "0x2a631c514cb15205ff3109482f046efadf1ba925b45f7204c167937e8193430f", "0x013403ff8ca923d1264c47607ef84d484e08f72a8c7427d51c60a2b5a273f2a7", "0x2018b376b5018120de35eae0b9b1374b5269132e36820c14d9c95821a91e75fc", "0x019733574899b830b08505234c08648f3e3af256b2fb190d3c0134f8828d7991", "0x1ff51f1afc62c39c9098607f3c290ee441277070f617f782dbf60bb42b2c5e1a", "0x052fd04ab2653dcbcc6d57ee2e34ef4d1503fe36856bac1fc095a0af39241322", "0x05f8daeeec7ca421d4dd9a824f5c7014640658a5acaebacdd67293ccb908fb7e", "0x07e14f3a38cbb8dc7b92aa2025c551dd311e0569b04b69cbcb12e08686f2fc8c", "0x12cdc04526438b8eba0532989f80c0a53d851c733bdaf70cafd1435604a17659", "0x2605dca63f3e1d0ede88c10b4ec1dbebd3d561bee9e99ba298b405641785c2fe", "0x0c07dbf94350f1cdc78ffe85c52724dc594e1e28741b0c22624eef4a09fb503a", "0x0e7e0b7389c14ba80bba5579ef1d2659f5651ea3ceda091fee86ff772501ac93", "0x24f96b8bb891c3bcdbba35142159064defad5a0c4095c907b6b5a4aab15c0fc5", "0x304c70bc0c0ff81063d98fe51881dc2505b25e8763697fb8b03d06215cc73dba", "0x0dd4f88ad194bf3ce2cc5303447f6f3a8cad99e1847e11b7e7508e5515381570", "0x1261f37c17ee6ec94384546d4381102d48d79047819c1e0e2bc457be5d9a6997", "0x2ce1bbeaff11c010147a78088c5586f8b09bf22365bc626c5e9661641d4bfefa", "0x21127a60a786987c12c10a4c1b094456833225c948a6d07d05ed5dca45ee88cc", "0x304b9d8048cc3a7e452da848e827714072f0d0050b6aae36dbbe2d1798e4e0f8", "0x1d70eb5e3cb06fe66fa9f7af0460a207e7efb41b4994e96c348aba91e1630754", "0x1a51c1c33d4fa7bf495998f66b7799a7626d54ee60c0cce19fdd302135603019", "0x2301dbd6fe2b6ceab41ba8cc0fb0c2c9d33752aeae58c4844e581198b68be3b8", "0x0ca95c1ef44e332e24b8b7dd0e25fd63c3dab0335af5efa463133f75a6756d5a", "0x09e4b7708f3ff28829cdd8adc0f476690837c2592a6ec3b13cb42420a3ac2e27", "0x2222f053f3f9fc30356852963c7c1aef009c52aa824754cf5c5f2ae783d01048", "0x268448a3962224f1aa3aa009e43ecadb522f99979b25aea949aa39aa556f0a49", "0x1d4fc7e52539f5d1b5101afbefa84ce847d27b55b760e7fe727dd4050c8422d8", "0x2e8100d836ac0ddd851b14dfd0bf0b7fa045d9d299682868236b2a3bfd0a6c93", "0x0b05d0e6eb22049804f13cf5acf3071aba55a43840d2373e8fb46979708b9f0a", "0x0b05d0e6eb22049804f13cf5acf3071aba55a43840d2373e8fb46979708b9f0a", "0x26fe9707cae606580f38fdb1aab8cbd5a1e6f43d855eef09cc99673e572edcd5", "0x154c5c0f01a58b2007b9d775f7f6e00e27ce4b6eb4d51a0b87b04d1acaf742b5", "0x20873c3e17f2a3332d8cf4f9e4897ac3a9373cdd1a13f3ffdfdbdcf26cd1692e", "0x1dbcbbc44c8c8d6059c139edfdf0ab7ea610c8da34c3157751c480b76a4a3968", "0x13999c5eac82ceb72ce430287a6852eb7bd918231aefa8ba4a31ab3ca168282f", "0x00000000000000000000000000000062b891458dd24b563ea32ce551e2dc1401", "0x000000000000000000000000000000000008e017337250089638d381fb588111", "0x000000000000000000000000000000f29511b503a94faa26818f1d66f10b0668", "0x00000000000000000000000000000000002197f37ce37f7fb449a1378d57d96e", "0x000000000000000000000000000000c1d451cc9694e9a647924b3cc14134b7f1", "0x00000000000000000000000000000000002e001fac22bba00cb0815c300ecb1f", "0x0000000000000000000000000000003ed149c42b948f547faf28e048d124f85c", "0x000000000000000000000000000000000017a23afc38dd04e83dff7e927858c1", "0x0000000000000000000000000000007841b62aa36e2e5b54bb997a1723ba590d", "0x00000000000000000000000000000000002dcc68212d68b60317dddfad80e137", "0x00000000000000000000000000000035ac5728bc439a89fd6f0d597b1fea2b98", "0x000000000000000000000000000000000011c5a2e823f6b5acf905499976e08b", "0x0000000000000000000000000000000e2e50ca6377fe4b229f6c20ca81759d4e", "0x00000000000000000000000000000000002494259436db67310e79bc15b7946c", "0x0000000000000000000000000000006f1eac56102cc4eb5346cdbbdafcbacfac", "0x0000000000000000000000000000000000072131e35c11d628e48b098d6df495", "0x000000000000000000000000000000e05bbbc5bdcd5cbccb8690c62efe5b0fc2", "0x000000000000000000000000000000000019fbffba4ac991536afae2f420f94c", "0x0000000000000000000000000000007bb016811148df04855f797de065112992", "0x00000000000000000000000000000000000bb79ee897f8ee1318ad700a37c8bb", "0x000000000000000000000000000000942b96f32d7bf93ee813378b6014a18741", "0x000000000000000000000000000000000010ce7a1322a0157c915d19597f5e97", "0x000000000000000000000000000000f177bf8da36647518042aba3f5728c86ba", "0x000000000000000000000000000000000015eb978cf35cc176d523fa02a452ec", "0x00000000000000000000000000000093cdce5ba76ddf9dad3b5927b591406ee7", "0x00000000000000000000000000000000000cadcba14b18e01600f046c63397cb", "0x000000000000000000000000000000135d610c5e71ed12990c6067ecdda28f5e", "0x0000000000000000000000000000000000277411552ac27755eed15b464e1518", "0x00000000000000000000000000000051e80ab382f0f58f93a03558ae1906dc87", "0x000000000000000000000000000000000013b9732b57127f5e070b27bb834ecb", "0x0000000000000000000000000000006a3fdefc289de1ecb4607c81dced47539a", "0x000000000000000000000000000000000017c2af98d008875356625e40fbc876", "0x000000000000000000000000000000e704dd534cd2c196fd7265ae7e10e2d4ee", "0x00000000000000000000000000000000000eae170af2248dfbd1c6c0938a7ed9", "0x000000000000000000000000000000eccf380f69533eae3f5088a1cd1f687403", "0x00000000000000000000000000000000002758e79ccd2f0d7a5f4cfc6431a29d", "0x000000000000000000000000000000026b9284913baa6a73a2ac170bdc1d2905", "0x000000000000000000000000000000000017213cce8b7bcc9e0a5c0c131bdf95", "0x000000000000000000000000000000e51c33e735abe76bfcfc7f74d70066435d", "0x00000000000000000000000000000000002423d304ea2398bb024c79173e4ab8", "0x0000000000000000000000000000003b1f3084ca16a46a5636f4df91db0c4072", "0x00000000000000000000000000000000002d109f44066ae8e8b3d171fe5dc857", "0x00000000000000000000000000000077bc221de09ded0fb646554102d2a5729a", "0x00000000000000000000000000000000001bace5a3765f10657fbda74713faf7", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x27fd867f34a134e8a1117139770610a49326fe0993e9cedb97f1c49bf4d0c37e", "0x1e13f5fe62ad39d934c53a89ca23fb82df706bef914b026d91760567d32fee3d", "0x1377749e187da3005944ee59d2b3e47b6e19aace08096f368fb410ef8ca4807e", "0x0b8a3021c1b8675d83dfc0498c8ca03f64c1356a5147d489bb2909c698831017", "0x1bd2cad03de053ca3c1654b9d5190583a91fc1ce8852832e885d1d057d69f3e4", "0x045ef1e8bc5e55555974cccb36454b0b4b96662d5002a3699ad7039c8e6b8f76", "0x084df6d4d71ebfe664fd82adb1745fab26af6f4fbeda691609ec7b03ac14fceb", "0x080aff2ead8b977685173fe16885d44b660f7a9d236479e69aa52aabf5dedf9b", "0x108f76cce50b85875eab4a1affe83f3d502ffe89f9ebb45717931941dd36374c", "0x2f6238f167a82b1fa51f0b586718668c219cf0c5b86a4f9ecd8f9ee8466cbdaa", "0x174a1f05bfb1af1cb02f356eb61993058f1a4acc4015eeeff6ab6bc861c0082e", "0x11264388c26c33ddd5da54a50961054e53d0b80692d8d1fa3cc3385096cfbd21", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000000000ef2c2c3734b9d7f1ca6d8a4f25e5b30045", "0x000000000000000000000000000000000024e1c390cdef8e388ac5b71c03914f", "0x000000000000000000000000000000f1f778afa1e6d8795e138992c04ac53d3e", "0x000000000000000000000000000000000027e4472a6bce2207caec3c24623515", "0x000000000000000000000000000000fc0b167a383cb223183bca4890ed77ba73", "0x000000000000000000000000000000000006d40d5de6da4d7d9b077bf64ae6d2", "0x000000000000000000000000000000c71af3057609219e48234375e3d1c46385", "0x000000000000000000000000000000000022371900aa96962e1043e3105ec801", "0x0000000000000000000000000000000000000000000000000000000000000004", "0x25a1742d9f07d048818f06aae510eeb61a2e7e41174ab8ee3c2bed8f14d6ac7b", "0x06bfca75d1c374ce279c3b91525022bae1f318f0c02e572edceb3a1c1b8295df", "0x18fa8d4d23b0bbb642d22a9579930c4aae36727cec64d950166db96041077926", "0x0f1f02058bd777782fd203c59484286b8c93eb06a2a4c3e7b60594fc26aeabab", "0x238575f4f83e25bdbff8b9f3aa32736e2c3eb408cf315d18e2a4e8136e010f7f", "0x0f43df640ed3a1abaef94d0874aa8ec8e8c927df1865864ec154fcb555064eb8", "0x1892dbf1a8806091a23b1e95546c151584dd48c122ba966404092a745ebb4812", "0x2b51eee8db7e2770c813c3c492c26dcc89aa517bf9f00b5fb4c0b474f00bd422", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000002cf135e7506a45d632d270d45f1181294833fc48d823f272c", "0x2ee66ccd9a0415f633e3bb1ff8ef493df665ff85d804c1ef65d34c3ae5827c47", "0x24ac27c84b886c7ae9e28be05e6f72bd7c7936eebd0596310e24000b966f72f8", "0x00000000000000000000000000000006612875c72874d6231dd30894c6266900", "0x000000000000000000000000000000000002a85ff4cf723963d93731dcfbeb37"] public_inputs = ["0x0000000000000000000000000000000000000000000000000000000000000003"] verification_key = ["0x0000000000000000000000000000000000000000000000000000000000001000", "0x000000000000000000000000000000000000000000000000000000000000001b", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000003", "0x0000000000000000000000000000000000000000000000000000000000000004", "0x0000000000000000000000000000000000000000000000000000000000000005", "0x0000000000000000000000000000000000000000000000000000000000000006", "0x0000000000000000000000000000000000000000000000000000000000000007", "0x0000000000000000000000000000000000000000000000000000000000000008", "0x0000000000000000000000000000000000000000000000000000000000000009", "0x000000000000000000000000000000000000000000000000000000000000000a", "0x000000000000000000000000000000000000000000000000000000000000000b", "0x000000000000000000000000000000000000000000000000000000000000000c", "0x000000000000000000000000000000000000000000000000000000000000000d", "0x000000000000000000000000000000000000000000000000000000000000000e", "0x000000000000000000000000000000000000000000000000000000000000000f", "0x0000000000000000000000000000000000000000000000000000000000000010", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000011", "0x0000000000000000000000000000000000000000000000000000000000000012", "0x0000000000000000000000000000000000000000000000000000000000000013", "0x0000000000000000000000000000000000000000000000000000000000000014", "0x0000000000000000000000000000000000000000000000000000000000000015", "0x0000000000000000000000000000000000000000000000000000000000000016", "0x0000000000000000000000000000000000000000000000000000000000000017", "0x0000000000000000000000000000000000000000000000000000000000000018", "0x0000000000000000000000000000000000000000000000000000000000000019", "0x000000000000000000000000000000000000000000000000000000000000001a", "0x0000000000000000000000000000001f218b9483ed0942db15a28f417b248c6a", "0x0000000000000000000000000000000000120f46fb150fa5544f70413659ac49", "0x000000000000000000000000000000054bf69002abed9f9354db858292ee051b", "0x000000000000000000000000000000000003bd06a2c7606596f9eebda30dc708", "0x0000000000000000000000000000006c892b6234def66f6577959d064de4f749", "0x0000000000000000000000000000000000275343f0c8be74b6adaaf08488d71d", "0x000000000000000000000000000000826318e94744b1f7ff6776deffacebe17b", "0x00000000000000000000000000000000000f57fa00c8a7dafecb9ebaa52c523e", "0x000000000000000000000000000000032d7ef2b49315f1f09e67af355aebe815", "0x00000000000000000000000000000000000058cf4aba931d69238a327636e771", "0x00000000000000000000000000000091a26171db51087d9773ee271fe440fe4e", "0x0000000000000000000000000000000000014772ce2168f21ce8e217ac82596e", "0x000000000000000000000000000000d8197c7f95b3d7b116cb23b2be067742eb", "0x00000000000000000000000000000000001fb1a5cc1a1c33fa4699ade4a992f4", "0x000000000000000000000000000000ea89f3283423819ba34d92f1af1b60cf2a", "0x0000000000000000000000000000000000054f8cf376bda1948450747ce44405", "0x000000000000000000000000000000ac09001ff01875c762a7d467f333c9f0fa", "0x0000000000000000000000000000000000159abc799405ce9b72e9b8f0a58907", "0x000000000000000000000000000000870a9353bab217f6617fcea8b66efe55f5", "0x000000000000000000000000000000000016a23b3c4e2a9a54a68d8e187b4acd", "0x0000000000000000000000000000004e42c7133c8b802e7073cbdc76a95f54bc", "0x0000000000000000000000000000000000116d2ee2d6d93084d2f5576a9eff91", "0x0000000000000000000000000000000a9c29dd5c7e6b6bed485755ab7867129f", "0x0000000000000000000000000000000000182bf61f320d66dc49746f3f767b8a", "0x000000000000000000000000000000d9ad8b5943ead2741efdeb311b8305c9db", "0x000000000000000000000000000000000025043141e7a515687c6d80d0853b76", "0x0000000000000000000000000000003447e05ab4400999c9704862944ef03bb3", "0x00000000000000000000000000000000000d8d5f85133d06d56249c6463ac023", "0x000000000000000000000000000000a81a33be27f85f6030c2d794fc5ea7a0ec", "0x000000000000000000000000000000000025580b84ad2a823052effa19d61d88", "0x000000000000000000000000000000d398efe5afb73ff0ff0d5b4d919ebfeae4", "0x00000000000000000000000000000000000ce6de4173c77b111df4ae25bcf751", "0x000000000000000000000000000000d693725e4d29c3c1856f58d3657e4f8afd", "0x000000000000000000000000000000000000e860bbb23a26836fab3733b1a5d2", "0x00000000000000000000000000000004d908124a014f6dd4217600bbe017179a", "0x0000000000000000000000000000000000009639107ef0d7660211c3cb26fd83", "0x0000000000000000000000000000002c120d25144b16975f344bb8e0911f50aa", "0x0000000000000000000000000000000000025c989a5fbbc39a745dfa0c526d1b", "0x00000000000000000000000000000029c1683a4f2321682c17677f325c27de6a", "0x000000000000000000000000000000000017dcb48f840e14a56297e5e157ab5d", "0x0000000000000000000000000000006f8e97f2719363e73a919b60136cdf6fa7", "0x00000000000000000000000000000000001cc7ed8398842814b8d8b0a47fbff9", "0x00000000000000000000000000000074ba3ad568a253626720f6cf84a8048147", "0x000000000000000000000000000000000015a62e81e4d73a4bc690880130b274", "0x000000000000000000000000000000db0e9ab080d6e0b016d94b483c68a22b06", "0x00000000000000000000000000000000000530f0adac9e85a13bbe967daae7d1", "0x0000000000000000000000000000000a14cc5e4f5bd6610a377407c783d936d0", "0x00000000000000000000000000000000000550cdda8250517265285faa5a7517", "0x00000000000000000000000000000039d6a99d59ce1d827d7a6ae4ba48e2070a", "0x000000000000000000000000000000000027e18e542338c47beb02405dec6795", "0x000000000000000000000000000000e119c0de9378fef5e737a3e6c30e399742", "0x00000000000000000000000000000000002128ad7838a6a53762477930fd162b", "0x000000000000000000000000000000053d0020faf1ab4ecf00d41c2a01f4c504", "0x0000000000000000000000000000000000067729164ec966f4d8dec2642bfcca", "0x0000000000000000000000000000004e45ee83f5be6f212f96d9f88f62bc459a", "0x000000000000000000000000000000000020065b860db7e7f600ab625cda79c2", "0x00000000000000000000000000000093200fd4a93240ee6fff2d25065692e138", "0x0000000000000000000000000000000000244c194c60da2b4d787d5f98c136d1", "0x0000000000000000000000000000009354951db4088a11f00a3f56f9f54f0d7c", "0x000000000000000000000000000000000022dba94f08aaa5e6113bd537d354c3", "0x00000000000000000000000000000051931edd7fc2b2ff98d701d3072a909b41", "0x00000000000000000000000000000000001a026a2f8c1a2eb52a4d73daf3ab70", "0x000000000000000000000000000000a14701bcefa7c0c8d498abd548d689bc10", "0x00000000000000000000000000000000002da7bcb43520678e91f1c1422ee3fc", "0x000000000000000000000000000000deb2deb6c321a235675612f31bfd349dac", "0x000000000000000000000000000000000021315fa1cc6bb01b68f70de8e42f65", "0x00000000000000000000000000000013c727a1f60952056815260454d067900a", "0x000000000000000000000000000000000016d6e8d1ef7ebe3a30f3c8b0920807", "0x00000000000000000000000000000039d2e1e0191154f0059ed5412fc9c1cb1e", "0x000000000000000000000000000000000010435db71d51c501515cf705eb8277", "0x00000000000000000000000000000038222e1253633affb05f15fc206a5cbe07", "0x000000000000000000000000000000000003816781c9f9a9cca72015ee3348f4", "0x000000000000000000000000000000137f14764aed7a2559351dca3212a626ac", "0x00000000000000000000000000000000002d207af6743643d96947c9b1a259a6", "0x00000000000000000000000000000056089fbf1dc6b4af91ff8121303d83319d", "0x0000000000000000000000000000000000211ee2c4cf62fe3e7a9ce95faeb23e", "0x000000000000000000000000000000bbd960e0fdbaa3f47270679afd6bfcd349", "0x0000000000000000000000000000000000075069f76e6438da345431e1b2c58e", "0x000000000000000000000000000000ce72715195cd6f174603a8a614eb077e47", "0x00000000000000000000000000000000002724dd7694b7e169e5a264a6e02f9e", "0x000000000000000000000000000000a53ef0e9fc8df74a32e08c53a230c36836", "0x0000000000000000000000000000000000153ce938348613707a18a83d7511fe", "0x0000000000000000000000000000007234f68ff4ed021c91a2786b9b6cd75d1c", "0x000000000000000000000000000000000024a8faba9f2405c6660f1750c5cdcb", "0x0000000000000000000000000000002b80d6b55199d55c762fbaec636a525f3e", "0x0000000000000000000000000000000000217f0ffe90bea51c49a1b331adae9c", "0x0000000000000000000000000000000ed2d8303f6f9c83d86d5c13f3fb4e99dd", "0x000000000000000000000000000000000009c45c61155d314160b50b20e35c94", "0x0000000000000000000000000000009cf5a0abb80a3b2fe13b28fe8f315409b7", "0x0000000000000000000000000000000000188a2ffed7f8cbe84c7a0f1b018cd0", "0x00000000000000000000000000000085656153a6120eebdf3a488dccad95d00d", "0x000000000000000000000000000000000023cd626f5dde3ce81de0e7d4f74dc2", "0x000000000000000000000000000000d078687b7ffc17ed454fba23b4ecae0ec4", "0x00000000000000000000000000000000002501de6f063c457fccf291f449fe04", "0x0000000000000000000000000000009a4a3363201808e24813118bbaf3bd079b", "0x00000000000000000000000000000000002da4af07c13c8064fb9c44ff43a9cd", "0x000000000000000000000000000000cf91f0cb73295831bc93869fc19cdbad99", "0x00000000000000000000000000000000001ee5d0cdde02f62e468b034f988c56", "0x000000000000000000000000000000183a142ac675e313630847be47fe912b91", "0x00000000000000000000000000000000001558e16ed49142b74e4a2085b22287", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000000000c47f6850760801197f1d78c8b522e3e8ce", "0x00000000000000000000000000000000001c16df0851ab44fc5fc86fc32d901a", "0x0000000000000000000000000000003a206d1590ecddff13695a16efa7c66055", "0x000000000000000000000000000000000011d6dc438ccc1de6046419780f726b"] From 651f1b653b97fd11711f8e5c8e0e9ec64987a159 Mon Sep 17 00:00:00 2001 From: AztecBot Date: Wed, 8 Jan 2025 02:24:25 +0000 Subject: [PATCH 04/14] git subrepo push --branch=master barretenberg subrepo: subdir: "barretenberg" merged: "e66e46848a" upstream: origin: "https://github.com/AztecProtocol/barretenberg" branch: "master" commit: "e66e46848a" git-subrepo: version: "0.4.6" origin: "???" commit: "???" [skip ci] --- barretenberg/.gitrepo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/barretenberg/.gitrepo b/barretenberg/.gitrepo index 27b8c829517d..7c20ad8725f0 100644 --- a/barretenberg/.gitrepo +++ b/barretenberg/.gitrepo @@ -6,7 +6,7 @@ [subrepo] remote = https://github.com/AztecProtocol/barretenberg branch = master - commit = bfda2c9914f49f917bae7d62f27555e7ff3e6b4f - parent = b73f7f9442f9a51e82925dea3c32bc64173d81e5 + commit = e66e46848abe6b5b192eed7b23a7d2522b5bb096 + parent = cd5a615f154446878cb8681d70b9e55c14511690 method = merge cmdver = 0.4.6 From 7194a7e3ec37b0d706be286a73b353ad7b2094f9 Mon Sep 17 00:00:00 2001 From: AztecBot Date: Wed, 8 Jan 2025 02:24:59 +0000 Subject: [PATCH 05/14] chore: replace relative paths to noir-protocol-circuits --- noir-projects/aztec-nr/aztec/Nargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noir-projects/aztec-nr/aztec/Nargo.toml b/noir-projects/aztec-nr/aztec/Nargo.toml index 7a1f1af58631..f5b64704d0dc 100644 --- a/noir-projects/aztec-nr/aztec/Nargo.toml +++ b/noir-projects/aztec-nr/aztec/Nargo.toml @@ -5,4 +5,4 @@ compiler_version = ">=0.18.0" type = "lib" [dependencies] -protocol_types = { path = "../../noir-protocol-circuits/crates/types" } +protocol_types = { git="https://github.com/AztecProtocol/aztec-packages", tag="aztec-packages-v0.69.0", directory="noir-projects/noir-protocol-circuits/crates/types" } From a5496c0eca01037851179187310aad8d5f15da3c Mon Sep 17 00:00:00 2001 From: AztecBot Date: Wed, 8 Jan 2025 02:24:59 +0000 Subject: [PATCH 06/14] git_subrepo.sh: Fix parent in .gitrepo file. [skip ci] --- noir-projects/aztec-nr/.gitrepo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noir-projects/aztec-nr/.gitrepo b/noir-projects/aztec-nr/.gitrepo index 625c3bf3ddaf..fae57e20e7bc 100644 --- a/noir-projects/aztec-nr/.gitrepo +++ b/noir-projects/aztec-nr/.gitrepo @@ -9,4 +9,4 @@ remote = https://github.com/AztecProtocol/aztec-nr commit = 8f332207062c425762a983cde8eb1b8eabe06743 method = merge cmdver = 0.4.6 - parent = f0d0c47d2cffe8017e8c0bc92e43f7bfb2ef47ce + parent = aa2a5a72c92cf746068fe49ca3299ad8bb2942f7 From 67a6a72c09b9125971964e05677b344760a3c849 Mon Sep 17 00:00:00 2001 From: AztecBot Date: Wed, 8 Jan 2025 02:25:03 +0000 Subject: [PATCH 07/14] git subrepo push --branch=master noir-projects/aztec-nr subrepo: subdir: "noir-projects/aztec-nr" merged: "9814410197" upstream: origin: "https://github.com/AztecProtocol/aztec-nr" branch: "master" commit: "9814410197" git-subrepo: version: "0.4.6" origin: "???" commit: "???" [skip ci] --- noir-projects/aztec-nr/.gitrepo | 4 ++-- noir-projects/aztec-nr/aztec/Nargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/noir-projects/aztec-nr/.gitrepo b/noir-projects/aztec-nr/.gitrepo index fae57e20e7bc..c8602c4c4c73 100644 --- a/noir-projects/aztec-nr/.gitrepo +++ b/noir-projects/aztec-nr/.gitrepo @@ -6,7 +6,7 @@ [subrepo] remote = https://github.com/AztecProtocol/aztec-nr branch = master - commit = 8f332207062c425762a983cde8eb1b8eabe06743 + commit = 98144101975ca3f2d1b752eb7d8c2c95d031b8f3 method = merge cmdver = 0.4.6 - parent = aa2a5a72c92cf746068fe49ca3299ad8bb2942f7 + parent = a29cbdaa98793469f823b7d50d29da38f3a3b919 diff --git a/noir-projects/aztec-nr/aztec/Nargo.toml b/noir-projects/aztec-nr/aztec/Nargo.toml index f5b64704d0dc..7a1f1af58631 100644 --- a/noir-projects/aztec-nr/aztec/Nargo.toml +++ b/noir-projects/aztec-nr/aztec/Nargo.toml @@ -5,4 +5,4 @@ compiler_version = ">=0.18.0" type = "lib" [dependencies] -protocol_types = { git="https://github.com/AztecProtocol/aztec-packages", tag="aztec-packages-v0.69.0", directory="noir-projects/noir-protocol-circuits/crates/types" } +protocol_types = { path = "../../noir-protocol-circuits/crates/types" } From 4ed1530e90ee7bb7a3835fd5f7fd80539b642855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Rodr=C3=ADguez?= Date: Wed, 8 Jan 2025 11:18:17 +0100 Subject: [PATCH 08/14] chore: Refactor tail public inputs (#11031) As preparation for https://github.com/AztecProtocol/aztec-packages/issues/9269 remove legacy stuff from the tail public inputs --- .../src/core/libraries/ConstantsGen.sol | 4 +- .../crates/blob/src/blob.nr | 4 +- .../src/main.nr | 6 +- .../crates/private-kernel-empty/src/main.nr | 4 +- .../src/components/tail_output_composer.nr | 23 +-- .../tail_output_composer/meter_gas_used.nr | 7 +- .../src/components/tail_output_validator.nr | 22 +-- .../src/private_kernel_empty.nr | 6 +- .../src/private_kernel_tail.nr | 15 +- .../meter_gas_used.nr | 4 +- .../tests/tail_output_composer_builder/mod.nr | 4 +- .../tail_output_validator_builder/mod.nr | 9 +- .../validate_empty_values.nr | 35 ----- .../validate_propagated_values.nr | 10 -- .../private-kernel-tail-simulated/src/main.nr | 4 +- .../crates/private-kernel-tail/src/main.nr | 4 +- .../crates/rollup-lib/src/abis/mod.nr | 1 + .../crates/rollup-lib/src/abis/tx_effect.nr | 43 ++++++ .../src/base/components/constants.nr | 29 +++- .../src/base/private_base_rollup.nr | 140 ++++++------------ .../rollup-lib/src/base/public_base_rollup.nr | 103 ++++++------- .../crates/rollup-lib/src/components.nr | 102 ++++++------- .../crates/rollup-lib/src/lib.nr | 16 +- .../types/src/abis/accumulated_data/mod.nr | 4 +- ... => private_to_rollup_accumulated_data.nr} | 65 +++----- .../kernel_circuit_public_inputs.nr | 94 ------------ .../abis/kernel_circuit_public_inputs/mod.nr | 4 +- ..._to_rollup_kernel_circuit_public_inputs.nr | 75 ++++++++++ .../crates/types/src/abis/tube.nr | 6 +- .../crates/types/src/constants.nr | 16 +- .../crates/types/src/lib.nr | 2 +- .../crates/types/src/tests/fixture_builder.nr | 32 ++-- .../bb-prover/src/prover/bb_prover.ts | 12 +- .../bb-prover/src/test/test_circuit_prover.ts | 7 +- .../src/interfaces/proving-job.ts | 6 +- .../src/interfaces/server_circuit_prover.ts | 7 +- .../circuit-types/src/test/factories.ts | 7 +- .../circuit-types/src/tx/processed_tx.ts | 9 +- yarn-project/circuits.js/src/constants.gen.ts | 4 +- yarn-project/circuits.js/src/structs/index.ts | 2 +- .../kernel/combined_accumulated_data.test.ts | 10 -- .../kernel/kernel_circuit_public_inputs.ts | 51 ++----- ...ivate_kernel_tail_circuit_public_inputs.ts | 25 ++-- ...private_to_rollup_accumulated_data.test.ts | 10 ++ ... => private_to_rollup_accumulated_data.ts} | 61 ++------ .../src/structs/rollup/private_tube_data.ts | 8 +- .../circuits.js/src/tests/factories.ts | 36 ++--- .../src/conversion/client.ts | 8 +- .../src/conversion/common.ts | 44 +++--- .../src/conversion/server.ts | 77 ++++------ .../src/execution/server.ts | 14 +- .../src/block_builder/light.test.ts | 6 +- .../src/orchestrator/tx-proving-state.ts | 6 +- .../src/prover-agent/memory-proving-queue.ts | 7 +- .../proving_broker/broker_prover_facade.ts | 7 +- .../src/test/bb_prover_base_rollup.test.ts | 2 +- .../prover-client/src/test/mock_prover.ts | 11 +- 57 files changed, 579 insertions(+), 751 deletions(-) delete mode 100644 noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_empty_values.nr create mode 100644 noir-projects/noir-protocol-circuits/crates/rollup-lib/src/abis/tx_effect.nr rename noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/{combined_accumulated_data.nr => private_to_rollup_accumulated_data.nr} (53%) delete mode 100644 noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/kernel_circuit_public_inputs.nr create mode 100644 noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/private_to_rollup_kernel_circuit_public_inputs.nr delete mode 100644 yarn-project/circuits.js/src/structs/kernel/combined_accumulated_data.test.ts create mode 100644 yarn-project/circuits.js/src/structs/kernel/private_to_rollup_accumulated_data.test.ts rename yarn-project/circuits.js/src/structs/kernel/{combined_accumulated_data.ts => private_to_rollup_accumulated_data.ts} (64%) diff --git a/l1-contracts/src/core/libraries/ConstantsGen.sol b/l1-contracts/src/core/libraries/ConstantsGen.sol index 8d2325e2b20b..744f48a5f672 100644 --- a/l1-contracts/src/core/libraries/ConstantsGen.sol +++ b/l1-contracts/src/core/libraries/ConstantsGen.sol @@ -195,7 +195,7 @@ library Constants { uint256 internal constant SCOPED_READ_REQUEST_LEN = 3; uint256 internal constant PUBLIC_DATA_READ_LENGTH = 3; uint256 internal constant PRIVATE_VALIDATION_REQUESTS_LENGTH = 772; - uint256 internal constant COMBINED_ACCUMULATED_DATA_LENGTH = 902; + uint256 internal constant PRIVATE_TO_ROLLUP_ACCUMULATED_DATA_LENGTH = 741; uint256 internal constant TX_CONSTANT_DATA_LENGTH = 37; uint256 internal constant COMBINED_CONSTANT_DATA_LENGTH = 46; uint256 internal constant PRIVATE_ACCUMULATED_DATA_LENGTH = 1412; @@ -204,7 +204,7 @@ library Constants { uint256 internal constant PRIVATE_TO_AVM_ACCUMULATED_DATA_LENGTH = 160; uint256 internal constant NUM_PRIVATE_TO_AVM_ACCUMULATED_DATA_ARRAYS = 3; uint256 internal constant PRIVATE_TO_PUBLIC_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 1847; - uint256 internal constant KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 960; + uint256 internal constant PRIVATE_TO_ROLLUP_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 783; uint256 internal constant CONSTANT_ROLLUP_DATA_LENGTH = 13; uint256 internal constant BASE_OR_MERGE_PUBLIC_INPUTS_LENGTH = 52; uint256 internal constant BLOCK_ROOT_OR_BLOCK_MERGE_PUBLIC_INPUTS_LENGTH = 986; diff --git a/noir-projects/noir-protocol-circuits/crates/blob/src/blob.nr b/noir-projects/noir-protocol-circuits/crates/blob/src/blob.nr index 10ebc5c16941..b9d3201ace0a 100644 --- a/noir-projects/noir-protocol-circuits/crates/blob/src/blob.nr +++ b/noir-projects/noir-protocol-circuits/crates/blob/src/blob.nr @@ -462,7 +462,7 @@ mod tests { let mut tx_data = FixtureBuilder::new(); tx_data.add_new_note_hash(1); let mut blob: [Field; FIELDS_PER_BLOB] = [0; FIELDS_PER_BLOB]; - let blob_fields = tx_data.to_combined_accumulated_data().serialize(); + let blob_fields = tx_data.to_private_to_rollup_accumulated_data().serialize(); for i in 0..blob_fields.len() { blob[i] = blob_fields[i]; } @@ -507,7 +507,7 @@ mod tests { tx_data.append_l2_to_l1_msgs(5); tx_data.append_unencrypted_log_hashes(5); let mut blob: [Field; FIELDS_PER_BLOB] = [0; FIELDS_PER_BLOB]; - let blob_fields = tx_data.to_combined_accumulated_data().serialize(); + let blob_fields = tx_data.to_private_to_rollup_accumulated_data().serialize(); for i in 0..blob_fields.len() { blob[i] = blob_fields[i]; } diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-empty-simulated/src/main.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-empty-simulated/src/main.nr index b41b393668c5..095aaa3bf66f 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-empty-simulated/src/main.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-empty-simulated/src/main.nr @@ -1,6 +1,8 @@ use dep::private_kernel_lib::PrivateKernelEmptyPrivateInputs; -use dep::types::KernelCircuitPublicInputs; +use dep::types::PrivateToRollupKernelCircuitPublicInputs; -unconstrained fn main(input: PrivateKernelEmptyPrivateInputs) -> pub KernelCircuitPublicInputs { +unconstrained fn main( + input: PrivateKernelEmptyPrivateInputs, +) -> pub PrivateToRollupKernelCircuitPublicInputs { input.execute() } diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-empty/src/main.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-empty/src/main.nr index 1eeeb229b1bc..b320f0d42cdf 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-empty/src/main.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-empty/src/main.nr @@ -1,6 +1,6 @@ use dep::private_kernel_lib::PrivateKernelEmptyPrivateInputs; -use dep::types::KernelCircuitPublicInputs; +use dep::types::PrivateToRollupKernelCircuitPublicInputs; -fn main(input: PrivateKernelEmptyPrivateInputs) -> pub KernelCircuitPublicInputs { +fn main(input: PrivateKernelEmptyPrivateInputs) -> pub PrivateToRollupKernelCircuitPublicInputs { input.execute() } diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/tail_output_composer.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/tail_output_composer.nr index 7e8d5b28ac9a..32503d6ad707 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/tail_output_composer.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/tail_output_composer.nr @@ -3,10 +3,10 @@ mod meter_gas_used; use crate::components::private_kernel_circuit_public_inputs_composer::PrivateKernelCircuitPublicInputsComposer; use dep::types::{ abis::{ - accumulated_data::combined_accumulated_data::CombinedAccumulatedData, - combined_constant_data::CombinedConstantData, - global_variables::GlobalVariables, - kernel_circuit_public_inputs::{KernelCircuitPublicInputs, PrivateKernelCircuitPublicInputs}, + accumulated_data::private_to_rollup_accumulated_data::PrivateToRollupAccumulatedData, + kernel_circuit_public_inputs::{ + PrivateKernelCircuitPublicInputs, PrivateToRollupKernelCircuitPublicInputs, + }, log_hash::ScopedLogHash, note_hash::ScopedNoteHash, nullifier::ScopedNullifier, @@ -30,21 +30,22 @@ impl TailOutputComposer { TailOutputComposer { output_composer } } - pub unconstrained fn finish(self) -> KernelCircuitPublicInputs { + pub unconstrained fn finish(self) -> PrivateToRollupKernelCircuitPublicInputs { let source = self.output_composer.finish(); - let mut output = KernelCircuitPublicInputs::empty(); + let mut output = PrivateToRollupKernelCircuitPublicInputs::empty(); output.rollup_validation_requests = source.validation_requests.for_rollup; - output.end = self.build_combined_accumulated_data(); + output.end = self.build_private_to_rollup_accumulated_data(); output.gas_used = meter_gas_used(output.end); - output.constants = - CombinedConstantData::combine(source.constants, GlobalVariables::empty()); + output.constants = source.constants; output.fee_payer = source.fee_payer; output } - unconstrained fn build_combined_accumulated_data(self) -> CombinedAccumulatedData { + unconstrained fn build_private_to_rollup_accumulated_data( + self, + ) -> PrivateToRollupAccumulatedData { let source = self.output_composer.public_inputs.end; - let mut data = CombinedAccumulatedData::empty(); + let mut data = PrivateToRollupAccumulatedData::empty(); data.note_hashes = source.note_hashes.storage().map(|n: ScopedNoteHash| n.note_hash.value); data.nullifiers = source.nullifiers.storage().map(|n: ScopedNullifier| n.nullifier.value); data.l2_to_l1_msgs = diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/tail_output_composer/meter_gas_used.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/tail_output_composer/meter_gas_used.nr index a2eaeed7b8b4..12acfc1e3dfa 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/tail_output_composer/meter_gas_used.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/tail_output_composer/meter_gas_used.nr @@ -1,5 +1,8 @@ use dep::types::{ - abis::{accumulated_data::combined_accumulated_data::CombinedAccumulatedData, gas::Gas}, + abis::{ + accumulated_data::private_to_rollup_accumulated_data::PrivateToRollupAccumulatedData, + gas::Gas, + }, constants::{ DA_BYTES_PER_FIELD, DA_GAS_PER_BYTE, L2_GAS_PER_L2_TO_L1_MSG, L2_GAS_PER_LOG_BYTE, L2_GAS_PER_NOTE_HASH, L2_GAS_PER_NULLIFIER, L2_GAS_PER_PRIVATE_LOG, @@ -8,7 +11,7 @@ use dep::types::{ utils::arrays::array_length, }; -pub fn meter_gas_used(data: CombinedAccumulatedData) -> Gas { +pub fn meter_gas_used(data: PrivateToRollupAccumulatedData) -> Gas { let mut metered_da_fields = 0; let mut metered_l2_gas = 0; diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/tail_output_validator.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/tail_output_validator.nr index b8e22650ef47..88518112f9c1 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/tail_output_validator.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/components/tail_output_validator.nr @@ -3,26 +3,27 @@ pub mod tail_output_hints; use crate::components::tail_output_composer::meter_gas_used; use dep::types::{ abis::{ - kernel_circuit_public_inputs::{KernelCircuitPublicInputs, PrivateKernelCircuitPublicInputs}, + kernel_circuit_public_inputs::{ + PrivateKernelCircuitPublicInputs, PrivateToRollupKernelCircuitPublicInputs, + }, log_hash::ScopedLogHash, private_log::PrivateLogData, side_effect::scoped::Scoped, }, messaging::l2_to_l1_message::ScopedL2ToL1Message, - traits::{is_empty, is_empty_array}, utils::arrays::assert_exposed_sorted_transformed_value_array, }; use tail_output_hints::{generate_tail_output_hints, TailOutputHints}; pub struct TailOutputValidator { - output: KernelCircuitPublicInputs, + output: PrivateToRollupKernelCircuitPublicInputs, previous_kernel: PrivateKernelCircuitPublicInputs, hints: TailOutputHints, } impl TailOutputValidator { pub fn new( - output: KernelCircuitPublicInputs, + output: PrivateToRollupKernelCircuitPublicInputs, previous_kernel: PrivateKernelCircuitPublicInputs, ) -> Self { let hints = unsafe { generate_tail_output_hints(previous_kernel) }; @@ -30,7 +31,7 @@ impl TailOutputValidator { } pub fn new_with_hints( - output: KernelCircuitPublicInputs, + output: PrivateToRollupKernelCircuitPublicInputs, previous_kernel: PrivateKernelCircuitPublicInputs, hints: TailOutputHints, ) -> Self { @@ -38,21 +39,11 @@ impl TailOutputValidator { } pub fn validate(self) { - self.validate_empty_values(); self.validate_propagated_values(); self.validate_propagated_sorted_values(); self.validate_gas_used(); } - fn validate_empty_values(self) { - assert(is_empty(self.output.start_state), "start_state must be empty"); - assert_eq(self.output.revert_code, 0, "revert_code must be empty"); - assert( - is_empty_array(self.output.end.unencrypted_logs_hashes), - "unencrypted logs in private must be empty", - ); - } - fn validate_propagated_values(self) { assert_eq( self.output.constants.historical_header, @@ -74,7 +65,6 @@ impl TailOutputValidator { self.previous_kernel.constants.protocol_contract_tree_root, "mismatch protocol_contract_tree_root", ); - assert(is_empty(self.output.constants.global_variables), "global_variables must be empty"); assert_eq( self.output.rollup_validation_requests, diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_empty.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_empty.nr index 818f77cb6f34..b2d5fd26e656 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_empty.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_empty.nr @@ -1,6 +1,6 @@ use dep::types::{ block_header::BlockHeader, - KernelCircuitPublicInputs, + PrivateToRollupKernelCircuitPublicInputs, proof::{ rollup_recursive_proof::RecursiveProof, traits::Verifiable, @@ -36,10 +36,10 @@ pub struct PrivateKernelEmptyPrivateInputs { } impl PrivateKernelEmptyPrivateInputs { - pub fn execute(self) -> KernelCircuitPublicInputs { + pub fn execute(self) -> PrivateToRollupKernelCircuitPublicInputs { self.empty_nested.verify(); - let mut public_inputs = KernelCircuitPublicInputs::empty(); + let mut public_inputs = PrivateToRollupKernelCircuitPublicInputs::empty(); public_inputs.constants.historical_header = self.historical_header; public_inputs.constants.tx_context.chain_id = self.chain_id; public_inputs.constants.tx_context.version = self.version; diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_tail.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_tail.nr index 8ca0bd0d9345..750c82faf75c 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_tail.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/private_kernel_tail.nr @@ -4,7 +4,7 @@ use crate::components::{ }; use dep::types::{ abis::{ - kernel_circuit_public_inputs::KernelCircuitPublicInputs, + kernel_circuit_public_inputs::PrivateToRollupKernelCircuitPublicInputs, private_kernel_data::{PrivateKernelData, PrivateKernelDataWithoutPublicInputs}, }, constants::{PRIVATE_KERNEL_INIT_INDEX, PRIVATE_KERNEL_INNER_INDEX, PRIVATE_KERNEL_RESET_INDEX}, @@ -28,11 +28,11 @@ impl PrivateKernelTailCircuitPrivateInputs { } } - unconstrained fn generate_output(self) -> KernelCircuitPublicInputs { + unconstrained fn generate_output(self) -> PrivateToRollupKernelCircuitPublicInputs { TailOutputComposer::new(self.previous_kernel.public_inputs).finish() } - pub fn execute(self) -> KernelCircuitPublicInputs { + pub fn execute(self) -> PrivateToRollupKernelCircuitPublicInputs { if !std::runtime::is_unconstrained() { self.previous_kernel.verify(); } @@ -59,14 +59,13 @@ mod tests { }; use dep::types::{ abis::{ - gas::Gas, kernel_circuit_public_inputs::KernelCircuitPublicInputs, + gas::Gas, kernel_circuit_public_inputs::PrivateToRollupKernelCircuitPublicInputs, max_block_number::MaxBlockNumber, }, address::{AztecAddress, EthAddress}, messaging::l2_to_l1_message::ScopedL2ToL1Message, point::Point, tests::fixture_builder::FixtureBuilder, - traits::is_empty, }; use dep::types::constants::{ DA_BYTES_PER_FIELD, DA_GAS_PER_BYTE, EMPTY_NESTED_INDEX, GENERATOR_INDEX__IVSK_M, @@ -89,7 +88,7 @@ mod tests { PrivateKernelTailInputsBuilder { previous_kernel } } - pub fn execute(&mut self) -> KernelCircuitPublicInputs { + pub fn execute(&mut self) -> PrivateToRollupKernelCircuitPublicInputs { let kernel = PrivateKernelTailCircuitPrivateInputs { previous_kernel: self.previous_kernel.to_private_kernel_data(), }; @@ -108,9 +107,7 @@ mod tests { #[test] fn execution_succeeded() { let mut builder = PrivateKernelTailInputsBuilder::new(); - let public_inputs = builder.execute(); - - assert(is_empty(public_inputs.start_state)); + let _public_inputs = builder.execute(); } #[test] diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_composer_builder/meter_gas_used.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_composer_builder/meter_gas_used.nr index a0dd0501ea66..c7bf62dfb182 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_composer_builder/meter_gas_used.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_composer_builder/meter_gas_used.nr @@ -17,7 +17,7 @@ fn new_builder() -> FixtureBuilder { #[test] fn meter_gas_used_empty_succeeds() { let builder = new_builder(); - let data = builder.to_combined_accumulated_data(); + let data = builder.to_private_to_rollup_accumulated_data(); let gas = meter_gas_used(data); assert_eq(gas, Gas::tx_overhead()); } @@ -48,7 +48,7 @@ fn meter_gas_used_everything_succeeds() { metered_da_bytes += 51; computed_l2_gas += 51 * L2_GAS_PER_LOG_BYTE; - let data = builder.to_combined_accumulated_data(); + let data = builder.to_private_to_rollup_accumulated_data(); let gas = meter_gas_used(data); assert_eq( diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_composer_builder/mod.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_composer_builder/mod.nr index 3f9b6ef80433..616215d2e855 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_composer_builder/mod.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_composer_builder/mod.nr @@ -2,7 +2,7 @@ mod meter_gas_used; use crate::components::tail_output_composer::TailOutputComposer; use dep::types::{ - abis::kernel_circuit_public_inputs::KernelCircuitPublicInputs, + abis::kernel_circuit_public_inputs::PrivateToRollupKernelCircuitPublicInputs, tests::fixture_builder::FixtureBuilder, }; @@ -17,7 +17,7 @@ impl TailOutputComposerBuilder { TailOutputComposerBuilder { previous_kernel } } - pub fn finish(self) -> KernelCircuitPublicInputs { + pub fn finish(self) -> PrivateToRollupKernelCircuitPublicInputs { let previous_kernel = self.previous_kernel.to_private_kernel_circuit_public_inputs(); unsafe { let composer = TailOutputComposer::new(previous_kernel); diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/mod.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/mod.nr index e147656197e8..7982dae8ca77 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/mod.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/mod.nr @@ -1,4 +1,3 @@ -mod validate_empty_values; mod validate_gas_used; mod validate_propagated_sorted_values; mod validate_propagated_values; @@ -13,7 +12,7 @@ use crate::components::{ use dep::types::{ abis::{ gas::Gas, gas_fees::GasFees, gas_settings::GasSettings, - kernel_circuit_public_inputs::KernelCircuitPublicInputs, + kernel_circuit_public_inputs::PrivateToRollupKernelCircuitPublicInputs, }, constants::{DEFAULT_GAS_LIMIT, DEFAULT_TEARDOWN_GAS_LIMIT}, tests::fixture_builder::FixtureBuilder, @@ -49,8 +48,8 @@ impl TailOutputValidatorBuilder { } } - pub fn export_output(self) -> KernelCircuitPublicInputs { - let mut output = self.output.to_kernel_circuit_public_inputs(); + pub fn export_output(self) -> PrivateToRollupKernelCircuitPublicInputs { + let mut output = self.output.to_private_to_rollup_kernel_circuit_public_inputs(); output.gas_used = meter_gas_used(output.end); output } @@ -60,7 +59,7 @@ impl TailOutputValidatorBuilder { self.validate_with_output(output); } - pub fn validate_with_output(self, output: KernelCircuitPublicInputs) { + pub fn validate_with_output(self, output: PrivateToRollupKernelCircuitPublicInputs) { let previous_kernel = self.previous_kernel.to_private_kernel_circuit_public_inputs(); TailOutputValidator::new(output, previous_kernel).validate(); } diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_empty_values.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_empty_values.nr deleted file mode 100644 index 2e4be7bed2f0..000000000000 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_empty_values.nr +++ /dev/null @@ -1,35 +0,0 @@ -use crate::tests::tail_output_validator_builder::TailOutputValidatorBuilder; - -#[test] -fn validate_empty_values_succeeds() { - let builder = TailOutputValidatorBuilder::new(); - builder.validate(); -} - -#[test(should_fail_with = "start_state must be empty")] -fn validate_empty_values_non_empty_start_state_fails() { - let mut builder = TailOutputValidatorBuilder::new(); - - builder.output.start_state.public_data_tree.root = 123; - - builder.validate(); -} - -#[test(should_fail_with = "revert_code must be empty")] -fn validate_empty_values_non_empty_revert_code_fails() { - let mut builder = TailOutputValidatorBuilder::new(); - - builder.output.revert_code = 1; - - builder.validate(); -} - -#[test(should_fail_with = "unencrypted logs in private must be empty")] -fn validate_empty_values_non_empty_unencrypted_log_fails() { - let mut builder = TailOutputValidatorBuilder::new(); - - builder.output.add_unencrypted_log_hash(1, 2); - - builder.validate(); -} - diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_propagated_values.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_propagated_values.nr index 27d59065348a..81d47398929a 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_propagated_values.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-lib/src/tests/tail_output_validator_builder/validate_propagated_values.nr @@ -58,16 +58,6 @@ fn validate_propagated_values_protocol_contract_tree_root_mismatch_fails() { builder.validate(); } -#[test(should_fail_with = "global_variables must be empty")] -fn validate_propagated_values_global_variables_non_empty_fails() { - let mut builder = TailOutputValidatorBuilder::new(); - - // Tweak the value in the output. - builder.output.global_variables.chain_id = 1; - - builder.validate(); -} - /** * max_block_number */ diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-tail-simulated/src/main.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-tail-simulated/src/main.nr index 285d20b13950..660fa1e86160 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-tail-simulated/src/main.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-tail-simulated/src/main.nr @@ -1,12 +1,12 @@ use dep::private_kernel_lib::PrivateKernelTailCircuitPrivateInputs; -use dep::types::KernelCircuitPublicInputs; +use dep::types::PrivateToRollupKernelCircuitPublicInputs; use types::abis::kernel_circuit_public_inputs::PrivateKernelCircuitPublicInputs; use types::abis::private_kernel_data::PrivateKernelDataWithoutPublicInputs; unconstrained fn main( previous_kernel: PrivateKernelDataWithoutPublicInputs, previous_kernel_public_inputs: PrivateKernelCircuitPublicInputs, -) -> pub KernelCircuitPublicInputs { +) -> pub PrivateToRollupKernelCircuitPublicInputs { let private_inputs = PrivateKernelTailCircuitPrivateInputs::new(previous_kernel, previous_kernel_public_inputs); private_inputs.execute() diff --git a/noir-projects/noir-protocol-circuits/crates/private-kernel-tail/src/main.nr b/noir-projects/noir-protocol-circuits/crates/private-kernel-tail/src/main.nr index f520694f68b2..caf2a6b8fef4 100644 --- a/noir-projects/noir-protocol-circuits/crates/private-kernel-tail/src/main.nr +++ b/noir-projects/noir-protocol-circuits/crates/private-kernel-tail/src/main.nr @@ -1,12 +1,12 @@ use dep::private_kernel_lib::PrivateKernelTailCircuitPrivateInputs; -use dep::types::KernelCircuitPublicInputs; +use dep::types::PrivateToRollupKernelCircuitPublicInputs; use types::abis::kernel_circuit_public_inputs::PrivateKernelCircuitPublicInputs; use types::abis::private_kernel_data::PrivateKernelDataWithoutPublicInputs; fn main( previous_kernel: PrivateKernelDataWithoutPublicInputs, previous_kernel_public_inputs: call_data(0) PrivateKernelCircuitPublicInputs, -) -> pub KernelCircuitPublicInputs { +) -> pub PrivateToRollupKernelCircuitPublicInputs { let private_inputs = PrivateKernelTailCircuitPrivateInputs::new(previous_kernel, previous_kernel_public_inputs); private_inputs.execute() diff --git a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/abis/mod.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/abis/mod.nr index 0bcaaa80b27d..09dbeaf35d49 100644 --- a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/abis/mod.nr +++ b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/abis/mod.nr @@ -2,3 +2,4 @@ pub(crate) mod base_or_merge_rollup_public_inputs; pub(crate) mod block_root_or_block_merge_public_inputs; pub(crate) mod previous_rollup_data; pub(crate) mod previous_rollup_block_data; +pub(crate) mod tx_effect; diff --git a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/abis/tx_effect.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/abis/tx_effect.nr new file mode 100644 index 000000000000..54fcf722f766 --- /dev/null +++ b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/abis/tx_effect.nr @@ -0,0 +1,43 @@ +use types::{ + abis::{log_hash::ScopedLogHash, private_log::PrivateLog, public_data_write::PublicDataWrite}, + constants::{ + MAX_CONTRACT_CLASS_LOGS_PER_TX, MAX_L2_TO_L1_MSGS_PER_TX, MAX_NOTE_HASHES_PER_TX, + MAX_NULLIFIERS_PER_TX, MAX_PRIVATE_LOGS_PER_TX, + MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, MAX_UNENCRYPTED_LOGS_PER_TX, + }, + traits::Empty, +}; + +pub(crate) struct TxEffect { + pub(crate) revert_code: u8, + pub(crate) transaction_fee: Field, + pub(crate) note_hashes: [Field; MAX_NOTE_HASHES_PER_TX], + pub(crate) nullifiers: [Field; MAX_NULLIFIERS_PER_TX], + pub(crate) l2_to_l1_msgs: [Field; MAX_L2_TO_L1_MSGS_PER_TX], + pub(crate) public_data_writes: [PublicDataWrite; MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX], + pub(crate) private_logs: [PrivateLog; MAX_PRIVATE_LOGS_PER_TX], + pub(crate) unencrypted_log_preimages_length: Field, + pub(crate) unencrypted_logs_hashes: [ScopedLogHash; MAX_UNENCRYPTED_LOGS_PER_TX], + pub(crate) contract_class_log_preimages_length: Field, + pub(crate) contract_class_logs_hashes: [ScopedLogHash; MAX_CONTRACT_CLASS_LOGS_PER_TX], +} + +impl Empty for TxEffect { + fn empty() -> Self { + TxEffect { + revert_code: 0, + transaction_fee: 0, + note_hashes: [0; MAX_NOTE_HASHES_PER_TX], + nullifiers: [0; MAX_NULLIFIERS_PER_TX], + l2_to_l1_msgs: [0; MAX_L2_TO_L1_MSGS_PER_TX], + public_data_writes: [ + PublicDataWrite::empty(); MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX + ], + private_logs: [PrivateLog::empty(); MAX_PRIVATE_LOGS_PER_TX], + unencrypted_log_preimages_length: 0, + unencrypted_logs_hashes: [ScopedLogHash::empty(); MAX_UNENCRYPTED_LOGS_PER_TX], + contract_class_log_preimages_length: 0, + contract_class_logs_hashes: [ScopedLogHash::empty(); MAX_CONTRACT_CLASS_LOGS_PER_TX], + } + } +} diff --git a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/components/constants.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/components/constants.nr index dbe2eb34fd6d..8d7f2c9b80ca 100644 --- a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/components/constants.nr +++ b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/components/constants.nr @@ -1,12 +1,12 @@ use types::abis::{ combined_constant_data::CombinedConstantData, constant_rollup_data::ConstantRollupData, + tx_constant_data::TxConstantData, }; pub(crate) fn validate_combined_constant_data( constants: CombinedConstantData, rollup_constants: ConstantRollupData, ) { - // Verify the kernel chain_id and versions assert( constants.tx_context.chain_id == rollup_constants.global_variables.chain_id, "kernel chain_id does not match the rollup chain_id", @@ -24,11 +24,30 @@ pub(crate) fn validate_combined_constant_data( "kernel protocol_contract_tree_root does not match the rollup protocol_contract_tree_root", ); - // Verify the kernel global variables if set, note these can be empty if this is a request coming directly from the private kernel tail. - // TODO(@spalladino) How can we check that this is a request coming from the private kernel tail? assert( - constants.global_variables.is_empty() - | (constants.global_variables == rollup_constants.global_variables), + constants.global_variables == rollup_constants.global_variables, "kernel global variables do not match the rollup global variables", ); } + +pub(crate) fn validate_tx_constant_data( + constants: TxConstantData, + rollup_constants: ConstantRollupData, +) { + assert( + constants.tx_context.chain_id == rollup_constants.global_variables.chain_id, + "kernel chain_id does not match the rollup chain_id", + ); + assert( + constants.tx_context.version == rollup_constants.global_variables.version, + "kernel version does not match the rollup version", + ); + assert( + constants.vk_tree_root == rollup_constants.vk_tree_root, + "kernel vk_tree_root does not match the rollup vk_tree_root", + ); + assert( + constants.protocol_contract_tree_root == rollup_constants.protocol_contract_tree_root, + "kernel protocol_contract_tree_root does not match the rollup protocol_contract_tree_root", + ); +} diff --git a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/private_base_rollup.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/private_base_rollup.nr index d27dcd2b4674..4aadab2ece44 100644 --- a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/private_base_rollup.nr +++ b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/private_base_rollup.nr @@ -1,8 +1,11 @@ use crate::{ - abis::base_or_merge_rollup_public_inputs::{BASE_ROLLUP_TYPE, BaseOrMergeRollupPublicInputs}, + abis::{ + base_or_merge_rollup_public_inputs::{BASE_ROLLUP_TYPE, BaseOrMergeRollupPublicInputs}, + tx_effect::TxEffect, + }, base::{ components::{ - archive::perform_archive_membership_check, constants::validate_combined_constant_data, + archive::perform_archive_membership_check, fees::compute_fee_payer_fee_juice_balance_leaf_slot, nullifier_tree::nullifier_tree_batch_insert, private_base_rollup_output_composer::compute_transaction_fee, PrivateTubeDataValidator, @@ -12,15 +15,16 @@ use crate::{ }, components::{append_tx_effects_for_blob, compute_kernel_out_hash}, }; +use super::components::constants::validate_tx_constant_data; use dep::types::{ abis::{ append_only_tree_snapshot::AppendOnlyTreeSnapshot, constant_rollup_data::ConstantRollupData, - nullifier_leaf_preimage::NullifierLeafPreimage, public_data_write::PublicDataWrite, - sponge_blob::SpongeBlob, tube::PrivateTubeData, + log_hash::ScopedLogHash, nullifier_leaf_preimage::NullifierLeafPreimage, + public_data_write::PublicDataWrite, sponge_blob::SpongeBlob, tube::PrivateTubeData, }, constants::{ - ARCHIVE_HEIGHT, MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, NOTE_HASH_SUBTREE_HEIGHT, - TUBE_VK_INDEX, + ARCHIVE_HEIGHT, MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, MAX_UNENCRYPTED_LOGS_PER_TX, + NOTE_HASH_SUBTREE_HEIGHT, TUBE_VK_INDEX, }, data::{hash::compute_public_data_tree_value, public_data_hint::PublicDataHint}, hash::silo_l2_to_l1_message, @@ -29,7 +33,6 @@ use dep::types::{ }, messaging::l2_to_l1_message::ScopedL2ToL1Message, partial_state_reference::PartialStateReference, - traits::is_empty, }; global ALLOWED_PREVIOUS_CIRCUITS: [u32; 1] = [TUBE_VK_INDEX]; @@ -59,9 +62,7 @@ impl PrivateBaseRollupInputs { tube_data_validator.validate_with_rollup_data(self.constants); } - validate_combined_constant_data(self.tube_data.public_inputs.constants, self.constants); - - self.validate_kernel_start_state(); + validate_tx_constant_data(self.tube_data.public_inputs.constants, self.constants); let rollup_validation_requests = self.tube_data.public_inputs.rollup_validation_requests; @@ -113,15 +114,26 @@ impl PrivateBaseRollupInputs { self.tube_data.public_inputs.constants.tx_context.chain_id, ), ); + let out_hash = compute_kernel_out_hash(siloed_l2_to_l1_msgs); - let end_sponge_blob = append_tx_effects_for_blob( - self.tube_data.public_inputs.end, - self.tube_data.public_inputs.revert_code, + let tx_effect = TxEffect { + revert_code: 0, transaction_fee, - all_public_data_update_requests, - siloed_l2_to_l1_msgs, - self.start_sponge_blob, - ); + note_hashes: self.tube_data.public_inputs.end.note_hashes, + nullifiers: self.tube_data.public_inputs.end.nullifiers, + l2_to_l1_msgs: siloed_l2_to_l1_msgs, + public_data_writes: all_public_data_update_requests, + private_logs: self.tube_data.public_inputs.end.private_logs, + unencrypted_log_preimages_length: 0, + unencrypted_logs_hashes: [ScopedLogHash::empty(); MAX_UNENCRYPTED_LOGS_PER_TX], + contract_class_log_preimages_length: self + .tube_data + .public_inputs + .end + .contract_class_log_preimages_length, + contract_class_logs_hashes: self.tube_data.public_inputs.end.contract_class_logs_hashes, + }; + let end_sponge_blob = append_tx_effects_for_blob(tx_effect, self.start_sponge_blob); // Perform membership checks that the notes provided exist within the historical trees data perform_archive_membership_check( @@ -170,24 +182,6 @@ impl PrivateBaseRollupInputs { calculate_subtree_root(leaves.map(|leaf: NullifierLeafPreimage| leaf.hash())) } - fn validate_kernel_start_state(self) { - let kernel_state = self.tube_data.public_inputs.start_state; - if !is_empty(kernel_state) { - assert( - kernel_state.note_hash_tree.eq(self.start.note_hash_tree), - "Mismatch start state for note hash tree", - ); - assert( - kernel_state.nullifier_tree.eq(self.start.nullifier_tree), - "Mismatch start state for nullifier tree", - ); - assert( - kernel_state.public_data_tree.eq(self.start.public_data_tree), - "Mismatch start state for public data tree", - ); - } - } - fn build_fee_public_data_write(self, tx_fee: Field) -> PublicDataWrite { let fee_payer = self.tube_data.public_inputs.fee_payer; @@ -235,12 +229,12 @@ mod tests { append_tx_effects_for_blob, encode_blob_prefix, TX_EFFECTS_BLOB_HASH_INPUT_FIELDS, }, }; + use crate::abis::tx_effect::TxEffect; use dep::types::{ abis::{ - accumulated_data::CombinedAccumulatedData, append_only_tree_snapshot::AppendOnlyTreeSnapshot, constant_rollup_data::ConstantRollupData, gas::Gas, gas_fees::GasFees, - kernel_circuit_public_inputs::KernelCircuitPublicInputs, + kernel_circuit_public_inputs::PrivateToRollupKernelCircuitPublicInputs, nullifier_leaf_preimage::NullifierLeafPreimage, public_data_write::PublicDataWrite, sponge_blob::SpongeBlob, }, @@ -396,10 +390,8 @@ mod tests { gas_used.compute_fee(gas_fees) } - fn build_pre_existing_tx_effects( - self, - ) -> (CombinedAccumulatedData, [PublicDataWrite; MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX]) { - let mut res = CombinedAccumulatedData::empty(); + fn build_pre_existing_tx_effects(self) -> TxEffect { + let mut res = TxEffect::empty(); res.note_hashes = self.pre_existing_notes; res.nullifiers = self.pre_existing_nullifiers.map(|nullifier: NullifierLeafPreimage| { nullifier.nullifier @@ -409,7 +401,7 @@ mod tests { PublicDataWrite { leaf_slot: leaf_preimage.slot, value: leaf_preimage.value } }, ); - let padded_all_public_data_update_requests = array_concat( + res.public_data_writes = array_concat( all_public_data_update_requests, [ PublicDataWrite::empty(); MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX @@ -417,7 +409,7 @@ mod tests { ], ); - (res, padded_all_public_data_update_requests) + res } fn extract_subtree_sibling_path( @@ -434,7 +426,7 @@ mod tests { fn update_nullifier_tree_with_new_leaves( mut self, nullifier_tree: &mut NonEmptyMerkleTree, - kernel_public_inputs: &mut KernelCircuitPublicInputs, + kernel_public_inputs: &mut PrivateToRollupKernelCircuitPublicInputs, start_nullifier_tree_snapshot: AppendOnlyTreeSnapshot, ) -> ([NullifierLeafPreimage; MAX_NULLIFIERS_PER_TX], [MembershipWitness; MAX_NULLIFIERS_PER_TX], [Field; MAX_NULLIFIERS_PER_TX], [u32; MAX_NULLIFIERS_PER_TX]) { let mut nullifier_predecessor_preimages = @@ -583,15 +575,10 @@ mod tests { public_data_tree: start_public_data_tree_snapshot, }; - let (pre_existing_tx_effects, pre_existing_public_data_update_requests) = - self.build_pre_existing_tx_effects(); + let pre_existing_tx_effects = self.build_pre_existing_tx_effects(); let start_sponge_blob = append_tx_effects_for_blob( pre_existing_tx_effects, - 0, - 0, - pre_existing_public_data_update_requests, - [0; MAX_L2_TO_L1_MSGS_PER_TX], SpongeBlob::new(TX_EFFECTS_BLOB_HASH_INPUT_FIELDS), ); @@ -903,34 +890,13 @@ mod tests { ); } builder.tube_data.append_l2_to_l1_msgs(NUM_MSGS); - // Copied from public data test below: - builder.pre_existing_public_data[0] = - PublicDataTreeLeafPreimage { slot: 20, value: 40, next_slot: 0, next_index: 0 }; builder.tube_data.append_private_logs(NUM_PRIV_EVENT_LOGS); - builder.tube_data.append_unencrypted_log_hashes(NUM_UNENC_LOGS); // Below will only work with NUM_CC_LOGS=1 builder.tube_data.add_contract_class_log_hash(1, 2); let outputs = builder.execute(); let mut reconstructed_tx_effects = [0; TX_EFFECTS_BLOB_HASH_INPUT_FIELDS]; - // Initial field = TX_START_PREFIX | 0 | txlen[0] txlen[1] | 0 | REVERT_CODE_PREFIX | 0 | revert_code - // revert code = 0 - let total_blob_fields_bytes = (TOTAL_BLOB_FIELDS as Field).to_be_bytes::<2>(); - reconstructed_tx_effects[0] = field_from_bytes( - array_concat( - TX_START_PREFIX.to_be_bytes::<8>(), - [ - 0, - total_blob_fields_bytes[0], - total_blob_fields_bytes[1], - 0, - REVERT_CODE_PREFIX, - 0, - 0, - ], - ), - true, - ); + // tx fee reconstructed_tx_effects[1] = field_from_bytes( array_concat([TX_FEE_PREFIX, 0], tx_fee.to_be_bytes::<29>()), @@ -978,16 +944,6 @@ mod tests { } } offset += total_private_logs_len; - // unenc logs - let unencrypted_logs_prefix = encode_blob_prefix(UNENCRYPTED_LOGS_PREFIX, NUM_UNENC_LOGS); - reconstructed_tx_effects[offset] = unencrypted_logs_prefix; - offset += 1; - for i in 0..NUM_UNENC_LOGS { - reconstructed_tx_effects[offset + i] = types::hash::silo_unencrypted_log_hash( - builder.tube_data.unencrypted_logs_hashes.storage()[i], - ); - } - offset += NUM_UNENC_LOGS; // cc logs let contract_class_logs_prefix = encode_blob_prefix(CONTRACT_CLASS_LOGS_PREFIX, NUM_CC_LOGS); @@ -1000,8 +956,16 @@ mod tests { } offset += NUM_CC_LOGS; - // Sanity check - assert(offset == TOTAL_BLOB_FIELDS); + // Initial field = TX_START_PREFIX | 0 | txlen[0] txlen[1] | 0 | REVERT_CODE_PREFIX | 0 | revert_code + // revert code = 0 + let length_bytes = (offset as Field).to_be_bytes::<2>(); + reconstructed_tx_effects[0] = field_from_bytes( + array_concat( + TX_START_PREFIX.to_be_bytes::<8>(), + [0, length_bytes[0], length_bytes[1], 0, REVERT_CODE_PREFIX, 0, 0], + ), + true, + ); let mut expected_sponge = outputs.start_sponge_blob; expected_sponge.absorb(reconstructed_tx_effects, offset); @@ -1068,14 +1032,6 @@ mod tests { builder.fails(); } - #[test(should_fail_with = "kernel global variables do not match the rollup global variables")] - unconstrained fn constants_global_variables_dont_match_kernels() { - let mut builder = PrivateBaseRollupInputsBuilder::new(); - builder.tube_data.global_variables.block_number = 6; - builder.constants.global_variables.block_number = 7; - builder.fails(); - } - #[test(should_fail_with = "kernel max_block_number is smaller than block number")] unconstrained fn constants_dont_satisfy_smaller_max_block_number() { let mut builder = PrivateBaseRollupInputsBuilder::new(); diff --git a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/public_base_rollup.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/public_base_rollup.nr index 4548fe7b63a7..da383ffec882 100644 --- a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/public_base_rollup.nr +++ b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/public_base_rollup.nr @@ -1,5 +1,8 @@ use crate::{ - abis::base_or_merge_rollup_public_inputs::{BASE_ROLLUP_TYPE, BaseOrMergeRollupPublicInputs}, + abis::{ + base_or_merge_rollup_public_inputs::{BASE_ROLLUP_TYPE, BaseOrMergeRollupPublicInputs}, + tx_effect::TxEffect, + }, base::{ components::{ archive::perform_archive_membership_check, constants::validate_combined_constant_data, @@ -12,16 +15,10 @@ use crate::{ }; use dep::types::{ abis::{ - accumulated_data::{self, CombinedAccumulatedData}, - append_only_tree_snapshot::AppendOnlyTreeSnapshot, - avm_circuit_public_inputs::AvmProofData, - combined_constant_data::CombinedConstantData, - constant_rollup_data::ConstantRollupData, - log_hash::ScopedLogHash, - nullifier_leaf_preimage::NullifierLeafPreimage, - public_data_write::PublicDataWrite, - sponge_blob::SpongeBlob, - tube::PublicTubeData, + append_only_tree_snapshot::AppendOnlyTreeSnapshot, avm_circuit_public_inputs::AvmProofData, + combined_constant_data::CombinedConstantData, constant_rollup_data::ConstantRollupData, + log_hash::ScopedLogHash, nullifier_leaf_preimage::NullifierLeafPreimage, + public_data_write::PublicDataWrite, sponge_blob::SpongeBlob, tube::PublicTubeData, }, constants::{ ARCHIVE_HEIGHT, MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, NOTE_HASH_SUBTREE_HEIGHT, @@ -50,9 +47,21 @@ pub struct PublicBaseRollupInputs { } impl PublicBaseRollupInputs { - fn generate_combined_accumulated_data(self, reverted: bool) -> CombinedAccumulatedData { + fn generate_tx_effect( + self, + reverted: bool, + combined_constant_data: CombinedConstantData, + ) -> TxEffect { let from_private = self.tube_data.public_inputs; let from_public = self.avm_proof_data.public_inputs; + let revert_code = if reverted { 1 } else { 0 }; + let siloed_l2_to_l1_msgs = from_public.accumulated_data.l2_to_l1_msgs.map( + |message: ScopedL2ToL1Message| silo_l2_to_l1_message( + message, + combined_constant_data.tx_context.version, + combined_constant_data.tx_context.chain_id, + ), + ); let private_logs = if reverted { from_private.non_revertible_accumulated_data.private_logs @@ -77,16 +86,18 @@ impl PublicBaseRollupInputs { .unencrypted_logs_hashes .fold(0, |len, l: ScopedLogHash| len + l.log_hash.length); - CombinedAccumulatedData { + TxEffect { + revert_code, + transaction_fee: from_public.transaction_fee, note_hashes: from_public.accumulated_data.note_hashes, nullifiers: from_public.accumulated_data.nullifiers, - l2_to_l1_msgs: from_public.accumulated_data.l2_to_l1_msgs, + l2_to_l1_msgs: siloed_l2_to_l1_msgs, + public_data_writes: from_public.accumulated_data.public_data_writes, private_logs, unencrypted_logs_hashes: from_public.accumulated_data.unencrypted_logs_hashes, - contract_class_logs_hashes, unencrypted_log_preimages_length, contract_class_log_preimages_length, - public_data_writes: from_public.accumulated_data.public_data_writes, + contract_class_logs_hashes, } } @@ -108,8 +119,6 @@ impl PublicBaseRollupInputs { // TODO: Validate tube_data.public_inputs vs avm_proof_data.public_inputs let reverted = self.avm_proof_data.public_inputs.reverted; - let combined_accumulated_data = self.generate_combined_accumulated_data(reverted); - let combined_constant_data = CombinedConstantData::combine( self.tube_data.public_inputs.constants, self.avm_proof_data.public_inputs.global_variables, @@ -130,8 +139,9 @@ impl PublicBaseRollupInputs { ); } - let commitments_tree_subroot = - calculate_subtree_root(combined_accumulated_data.note_hashes); + let tx_effect = self.generate_tx_effect(reverted, combined_constant_data); + + let commitments_tree_subroot = calculate_subtree_root(tx_effect.note_hashes); let empty_commitments_subtree_root = calculate_empty_tree_root(NOTE_HASH_SUBTREE_HEIGHT); @@ -145,31 +155,16 @@ impl PublicBaseRollupInputs { // Insert nullifiers: let end_nullifier_tree_snapshot = - self.check_nullifier_tree_non_membership_and_insert_to_tree(combined_accumulated_data); + self.check_nullifier_tree_non_membership_and_insert_to_tree(tx_effect); // Validate public data update requests and update public data tree let end_public_data_tree_snapshot = - self.validate_and_process_public_state(combined_accumulated_data.public_data_writes); + self.validate_and_process_public_state(tx_effect.public_data_writes); // Append the tx effects for blob(s) - let siloed_l2_to_l1_msgs = combined_accumulated_data.l2_to_l1_msgs.map( - |message: ScopedL2ToL1Message| silo_l2_to_l1_message( - message, - combined_constant_data.tx_context.version, - combined_constant_data.tx_context.chain_id, - ), - ); - let out_hash = compute_kernel_out_hash(siloed_l2_to_l1_msgs); - let revert_code = if reverted { 1 } else { 0 }; + let out_hash = compute_kernel_out_hash(tx_effect.l2_to_l1_msgs); - let end_sponge_blob = append_tx_effects_for_blob( - combined_accumulated_data, - revert_code, - self.avm_proof_data.public_inputs.transaction_fee, - combined_accumulated_data.public_data_writes, - siloed_l2_to_l1_msgs, - self.start_sponge_blob, - ); + let end_sponge_blob = append_tx_effects_for_blob(tx_effect, self.start_sponge_blob); // Perform membership checks that the notes provided exist within the historical trees data perform_archive_membership_check( @@ -217,11 +212,11 @@ impl PublicBaseRollupInputs { fn check_nullifier_tree_non_membership_and_insert_to_tree( self, - accumulated_data: CombinedAccumulatedData, + tx_effect: TxEffect, ) -> AppendOnlyTreeSnapshot { nullifier_tree_batch_insert( self.start.nullifier_tree, - accumulated_data.nullifiers, + tx_effect.nullifiers, self.state_diff_hints.sorted_nullifiers, self.state_diff_hints.sorted_nullifier_indexes, self.state_diff_hints.nullifier_subtree_sibling_path, @@ -286,9 +281,10 @@ mod tests { append_tx_effects_for_blob, encode_blob_prefix, TX_EFFECTS_BLOB_HASH_INPUT_FIELDS, }, }; + use crate::abis::tx_effect::TxEffect; use dep::types::{ abis::{ - accumulated_data::CombinedAccumulatedData, + accumulated_data::PrivateToRollupAccumulatedData, append_only_tree_snapshot::AppendOnlyTreeSnapshot, constant_rollup_data::ConstantRollupData, nullifier_leaf_preimage::NullifierLeafPreimage, public_data_write::PublicDataWrite, @@ -423,6 +419,7 @@ mod tests { inputs.constants.global_variables.chain_id = fixtures::CHAIN_ID; inputs.constants.global_variables.version = fixtures::VERSION; + inputs.avm_data.global_variables = inputs.constants.global_variables; inputs.constants.vk_tree_root = inputs.tube_data.vk_tree_root; inputs.pre_existing_blocks[0] = inputs.tube_data.historical_header.hash(); @@ -436,10 +433,8 @@ mod tests { builder } - fn build_pre_existing_tx_effects( - self, - ) -> (CombinedAccumulatedData, [PublicDataWrite; MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX]) { - let mut res = CombinedAccumulatedData::empty(); + fn build_pre_existing_tx_effects(self) -> TxEffect { + let mut res = TxEffect::empty(); res.note_hashes = self.pre_existing_notes; res.nullifiers = self.pre_existing_nullifiers.map(|nullifier: NullifierLeafPreimage| { nullifier.nullifier @@ -449,7 +444,7 @@ mod tests { PublicDataWrite { leaf_slot: leaf_preimage.slot, value: leaf_preimage.value } }, ); - let padded_all_public_data_update_requests = array_concat( + res.public_data_writes = array_concat( all_public_data_update_requests, [ PublicDataWrite::empty(); MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX @@ -457,7 +452,7 @@ mod tests { ], ); - (res, padded_all_public_data_update_requests) + res } fn extract_subtree_sibling_path( @@ -673,15 +668,10 @@ mod tests { public_data_tree: start_public_data_tree_snapshot, }; - let (pre_existing_tx_effects, pre_existing_public_data_update_requests) = - self.build_pre_existing_tx_effects(); + let tx_effect = self.build_pre_existing_tx_effects(); let start_sponge_blob = append_tx_effects_for_blob( - pre_existing_tx_effects, - 0, - 0, - pre_existing_public_data_update_requests, - [0; MAX_L2_TO_L1_MSGS_PER_TX], + tx_effect, SpongeBlob::new(TX_EFFECTS_BLOB_HASH_INPUT_FIELDS), ); @@ -1183,6 +1173,7 @@ mod tests { unconstrained fn constants_dont_satisfy_smaller_max_block_number() { let mut builder = PublicBaseRollupInputsBuilder::new(); builder.constants.global_variables.block_number = 42; + builder.avm_data.global_variables.block_number = 42; builder.tube_data.set_max_block_number(5); builder.fails(); } @@ -1191,6 +1182,7 @@ mod tests { unconstrained fn constants_satisfy_equal_max_block_number() { let mut builder = PublicBaseRollupInputsBuilder::new(); builder.constants.global_variables.block_number = 42; + builder.avm_data.global_variables.block_number = 42; builder.tube_data.set_max_block_number(42); builder.succeeds(); } @@ -1199,6 +1191,7 @@ mod tests { unconstrained fn constants_satisfy_larger_max_block_number() { let mut builder = PublicBaseRollupInputsBuilder::new(); builder.constants.global_variables.block_number = 42; + builder.avm_data.global_variables.block_number = 42; builder.tube_data.set_max_block_number(4294967295); builder.succeeds(); } diff --git a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/components.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/components.nr index 5a6a911c4aba..28057fb9c696 100644 --- a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/components.nr +++ b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/components.nr @@ -4,11 +4,9 @@ use crate::abis::{ previous_rollup_block_data::PreviousRollupBlockData, previous_rollup_data::PreviousRollupData, }; +use super::abis::tx_effect::TxEffect; use dep::types::{ - abis::{ - accumulated_data::CombinedAccumulatedData, log_hash::ScopedLogHash, - public_data_write::PublicDataWrite, sponge_blob::SpongeBlob, - }, + abis::{log_hash::ScopedLogHash, public_data_write::PublicDataWrite, sponge_blob::SpongeBlob}, constants::{ AZTEC_MAX_EPOCH_DURATION, CONTRACT_CLASS_LOGS_PREFIX, L2_L1_MSGS_PREFIX, MAX_CONTRACT_CLASS_LOGS_PER_TX, MAX_L2_TO_L1_MSGS_PER_TX, MAX_NOTE_HASHES_PER_TX, @@ -267,21 +265,12 @@ pub(crate) global TX_EFFECTS_BLOB_HASH_INPUT_FIELDS: u32 = 1 + MAX_UNENCRYPTED_LOGS_PER_TX + MAX_CONTRACT_CLASS_LOGS_PER_TX + 7; -pub fn append_tx_effects_for_blob( - combined: CombinedAccumulatedData, - revert_code: u8, - transaction_fee: Field, - all_public_data_update_requests: [PublicDataWrite; MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX], - l2_to_l1_msgs: [Field; MAX_L2_TO_L1_MSGS_PER_TX], + +pub(crate) fn append_tx_effects_for_blob( + tx_effect: TxEffect, start_sponge_blob: SpongeBlob, ) -> SpongeBlob { - let (mut tx_effects_hash_input, offset) = get_tx_effects_hash_input( - combined, - revert_code, - transaction_fee, - all_public_data_update_requests, - l2_to_l1_msgs, - ); + let (mut tx_effects_hash_input, offset) = get_tx_effects_hash_input(tx_effect); // NB: using start.absorb & returning start caused issues in ghost values appearing in // base_rollup_inputs.start when using a fresh sponge. These only appeared when simulating via wasm. @@ -297,33 +286,21 @@ pub fn append_tx_effects_for_blob( } fn get_tx_effects_hash_input( - combined: CombinedAccumulatedData, - revert_code: u8, - transaction_fee: Field, - all_public_data_update_requests: [PublicDataWrite; MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX], - l2_to_l1_msgs: [Field; MAX_L2_TO_L1_MSGS_PER_TX], + tx_effect: TxEffect, ) -> ([Field; TX_EFFECTS_BLOB_HASH_INPUT_FIELDS], u32) { - let mut tx_effects_hash_input = unsafe { - get_tx_effects_hash_input_helper( - combined, - revert_code, - transaction_fee, - all_public_data_update_requests, - l2_to_l1_msgs, - ) - }; - - let note_hashes = combined.note_hashes; - let nullifiers = combined.nullifiers; + let mut tx_effects_hash_input = unsafe { get_tx_effects_hash_input_helper(tx_effect) }; + + let note_hashes = tx_effect.note_hashes; + let nullifiers = tx_effect.nullifiers; // Public writes are the concatenation of all non-empty user update requests and protocol update requests, then padded with zeroes. // The incoming all_public_data_update_requests may have empty update requests in the middle, so we move those to the end of the array. let public_data_update_requests = - get_all_update_requests_for_tx_effects(all_public_data_update_requests); - let private_logs = combined.private_logs; + get_all_update_requests_for_tx_effects(tx_effect.public_data_writes); + let private_logs = tx_effect.private_logs; let unencrypted_logs = - combined.unencrypted_logs_hashes.map(|log: ScopedLogHash| silo_unencrypted_log_hash(log)); - let contract_class_logs = combined.contract_class_logs_hashes.map(|log: ScopedLogHash| { + tx_effect.unencrypted_logs_hashes.map(|log: ScopedLogHash| silo_unencrypted_log_hash(log)); + let contract_class_logs = tx_effect.contract_class_logs_hashes.map(|log: ScopedLogHash| { silo_unencrypted_log_hash(log) }); @@ -341,7 +318,10 @@ fn get_tx_effects_hash_input( assert_eq( tx_effects_hash_input[offset], field_from_bytes( - array_concat([TX_FEE_PREFIX, 0], transaction_fee.to_be_bytes::<29>()), + array_concat( + [TX_FEE_PREFIX, 0], + tx_effect.transaction_fee.to_be_bytes::<29>(), + ), true, ), ); @@ -381,7 +361,7 @@ fn get_tx_effects_hash_input( } // L2 TO L1 MESSAGES - array_len = array_length(l2_to_l1_msgs); + array_len = array_length(tx_effect.l2_to_l1_msgs); if array_len != 0 { let l2_to_l1_msgs_prefix = encode_blob_prefix(L2_L1_MSGS_PREFIX, array_len); assert_eq(tx_effects_hash_input[offset], l2_to_l1_msgs_prefix); @@ -389,7 +369,7 @@ fn get_tx_effects_hash_input( for j in 0..MAX_L2_TO_L1_MSGS_PER_TX { if j < array_len { - assert_eq(tx_effects_hash_input[offset + j], l2_to_l1_msgs[j]); + assert_eq(tx_effects_hash_input[offset + j], tx_effect.l2_to_l1_msgs[j]); } } offset += array_len; @@ -479,7 +459,15 @@ fn get_tx_effects_hash_input( field_from_bytes( array_concat( prefix_bytes, - [0, length_bytes[0], length_bytes[1], 0, REVERT_CODE_PREFIX, 0, revert_code], + [ + 0, + length_bytes[0], + length_bytes[1], + 0, + REVERT_CODE_PREFIX, + 0, + tx_effect.revert_code, + ], ), true, ), @@ -489,25 +477,21 @@ fn get_tx_effects_hash_input( } unconstrained fn get_tx_effects_hash_input_helper( - combined: CombinedAccumulatedData, - revert_code: u8, - transaction_fee: Field, - all_public_data_update_requests: [PublicDataWrite; MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX], - l2_to_l1_msgs: [Field; MAX_L2_TO_L1_MSGS_PER_TX], + tx_effect: TxEffect, ) -> [Field; TX_EFFECTS_BLOB_HASH_INPUT_FIELDS] { let mut tx_effects_hash_input = [0; TX_EFFECTS_BLOB_HASH_INPUT_FIELDS]; - let note_hashes = combined.note_hashes; - let nullifiers = combined.nullifiers; + let note_hashes = tx_effect.note_hashes; + let nullifiers = tx_effect.nullifiers; // Public writes are the concatenation of all non-empty user update requests and protocol update requests, then padded with zeroes. // The incoming all_public_data_update_requests may have empty update requests in the middle, so we move those to the end of the array. let public_data_update_requests = - get_all_update_requests_for_tx_effects(all_public_data_update_requests); - let private_logs = combined.private_logs; + get_all_update_requests_for_tx_effects(tx_effect.public_data_writes); + let private_logs = tx_effect.private_logs; let unencrypted_logs = - combined.unencrypted_logs_hashes.map(|log: ScopedLogHash| silo_unencrypted_log_hash(log)); - let contract_class_logs = combined.contract_class_logs_hashes.map(|log: ScopedLogHash| { + tx_effect.unencrypted_logs_hashes.map(|log: ScopedLogHash| silo_unencrypted_log_hash(log)); + let contract_class_logs = tx_effect.contract_class_logs_hashes.map(|log: ScopedLogHash| { silo_unencrypted_log_hash(log) }); @@ -524,7 +508,10 @@ unconstrained fn get_tx_effects_hash_input_helper( // TX FEE // Using 29 bytes to encompass all reasonable fee lengths tx_effects_hash_input[offset] = field_from_bytes( - array_concat([TX_FEE_PREFIX, 0], transaction_fee.to_be_bytes::<29>()), + array_concat( + [TX_FEE_PREFIX, 0], + tx_effect.transaction_fee.to_be_bytes::<29>(), + ), true, ); offset += 1; @@ -559,14 +546,14 @@ unconstrained fn get_tx_effects_hash_input_helper( } // L2 TO L1 MESSAGES - array_len = array_length(l2_to_l1_msgs); + array_len = array_length(tx_effect.l2_to_l1_msgs); if array_len != 0 { let l2_to_l1_msgs_prefix = encode_blob_prefix(L2_L1_MSGS_PREFIX, array_len); tx_effects_hash_input[offset] = l2_to_l1_msgs_prefix; offset += 1; for j in 0..MAX_L2_TO_L1_MSGS_PER_TX { - tx_effects_hash_input[offset + j] = l2_to_l1_msgs[j]; + tx_effects_hash_input[offset + j] = tx_effect.l2_to_l1_msgs[j]; } offset += array_len; } @@ -639,7 +626,7 @@ unconstrained fn get_tx_effects_hash_input_helper( tx_effects_hash_input[0] = field_from_bytes( array_concat( prefix_bytes, - [0, length_bytes[0], length_bytes[1], 0, REVERT_CODE_PREFIX, 0, revert_code], + [0, length_bytes[0], length_bytes[1], 0, REVERT_CODE_PREFIX, 0, tx_effect.revert_code], ), true, ); @@ -647,6 +634,7 @@ unconstrained fn get_tx_effects_hash_input_helper( tx_effects_hash_input } +// TODO remove this? The avm should be returning public data writes left aligned. fn get_all_update_requests_for_tx_effects( all_public_data_update_requests: [PublicDataWrite; MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX], ) -> [PublicDataWrite; MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX] { diff --git a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/lib.nr b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/lib.nr index e79a948ebf6c..d7ccbb44a7e6 100644 --- a/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/lib.nr +++ b/noir-projects/noir-protocol-circuits/crates/rollup-lib/src/lib.nr @@ -1,20 +1,20 @@ -mod abis; +pub(crate) mod abis; // Base rollup -mod base; +pub(crate) mod base; // Merge rollup -mod merge; +pub(crate) mod merge; // Block root rollup -mod block_root; +pub(crate) mod block_root; // Block merge rollup -mod block_merge; +pub(crate) mod block_merge; // Root rollup -mod root; +pub(crate) mod root; -mod components; +pub(crate) mod components; -mod tests; +pub(crate) mod tests; diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/mod.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/mod.nr index c61e2014a188..7d026503ab6d 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/mod.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/mod.nr @@ -1,5 +1,5 @@ pub mod avm_accumulated_data; -pub mod combined_accumulated_data; +pub mod private_to_rollup_accumulated_data; pub mod private_accumulated_data; pub mod private_accumulated_data_builder; pub mod private_to_avm_accumulated_data; @@ -7,9 +7,9 @@ pub mod private_to_public_accumulated_data; pub mod private_to_public_accumulated_data_builder; pub use avm_accumulated_data::AvmAccumulatedData; -pub use combined_accumulated_data::CombinedAccumulatedData; pub use private_accumulated_data::PrivateAccumulatedData; pub use private_accumulated_data_builder::PrivateAccumulatedDataBuilder; pub use private_to_avm_accumulated_data::PrivateToAvmAccumulatedData; pub use private_to_public_accumulated_data::PrivateToPublicAccumulatedData; pub use private_to_public_accumulated_data_builder::PrivateToPublicAccumulatedDataBuilder; +pub use private_to_rollup_accumulated_data::PrivateToRollupAccumulatedData; diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/combined_accumulated_data.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/private_to_rollup_accumulated_data.nr similarity index 53% rename from noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/combined_accumulated_data.nr rename to noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/private_to_rollup_accumulated_data.nr index 83921f18c3bd..1d34dab228a7 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/combined_accumulated_data.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/abis/accumulated_data/private_to_rollup_accumulated_data.nr @@ -1,53 +1,44 @@ use crate::{ - abis::{log_hash::ScopedLogHash, private_log::PrivateLog, public_data_write::PublicDataWrite}, + abis::{log_hash::ScopedLogHash, private_log::PrivateLog}, constants::{ - COMBINED_ACCUMULATED_DATA_LENGTH, MAX_CONTRACT_CLASS_LOGS_PER_TX, MAX_L2_TO_L1_MSGS_PER_TX, - MAX_NOTE_HASHES_PER_TX, MAX_NULLIFIERS_PER_TX, MAX_PRIVATE_LOGS_PER_TX, - MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, MAX_UNENCRYPTED_LOGS_PER_TX, + MAX_CONTRACT_CLASS_LOGS_PER_TX, MAX_L2_TO_L1_MSGS_PER_TX, MAX_NOTE_HASHES_PER_TX, + MAX_NULLIFIERS_PER_TX, MAX_PRIVATE_LOGS_PER_TX, PRIVATE_TO_ROLLUP_ACCUMULATED_DATA_LENGTH, }, messaging::l2_to_l1_message::ScopedL2ToL1Message, traits::{Deserialize, Empty, Serialize}, utils::reader::Reader, }; -pub struct CombinedAccumulatedData { +pub struct PrivateToRollupAccumulatedData { pub note_hashes: [Field; MAX_NOTE_HASHES_PER_TX], pub nullifiers: [Field; MAX_NULLIFIERS_PER_TX], pub l2_to_l1_msgs: [ScopedL2ToL1Message; MAX_L2_TO_L1_MSGS_PER_TX], pub private_logs: [PrivateLog; MAX_PRIVATE_LOGS_PER_TX], - pub unencrypted_logs_hashes: [ScopedLogHash; MAX_UNENCRYPTED_LOGS_PER_TX], pub contract_class_logs_hashes: [ScopedLogHash; MAX_CONTRACT_CLASS_LOGS_PER_TX], // Here so that the gas cost of this request can be measured by circuits, without actually needing to feed in the // variable-length data. - pub unencrypted_log_preimages_length: Field, pub contract_class_log_preimages_length: Field, - - pub public_data_writes: [PublicDataWrite; MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX], } -impl Empty for CombinedAccumulatedData { +impl Empty for PrivateToRollupAccumulatedData { fn empty() -> Self { - CombinedAccumulatedData { + PrivateToRollupAccumulatedData { note_hashes: [0; MAX_NOTE_HASHES_PER_TX], nullifiers: [0; MAX_NULLIFIERS_PER_TX], l2_to_l1_msgs: [ScopedL2ToL1Message::empty(); MAX_L2_TO_L1_MSGS_PER_TX], private_logs: [PrivateLog::empty(); MAX_PRIVATE_LOGS_PER_TX], - unencrypted_logs_hashes: [ScopedLogHash::empty(); MAX_UNENCRYPTED_LOGS_PER_TX], contract_class_logs_hashes: [ScopedLogHash::empty(); MAX_CONTRACT_CLASS_LOGS_PER_TX], - unencrypted_log_preimages_length: 0, contract_class_log_preimages_length: 0, - public_data_writes: [ - PublicDataWrite::empty(); MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX - ], } } } -impl Serialize for CombinedAccumulatedData { - fn serialize(self) -> [Field; COMBINED_ACCUMULATED_DATA_LENGTH] { - let mut fields: BoundedVec = BoundedVec::new(); +impl Serialize for PrivateToRollupAccumulatedData { + fn serialize(self) -> [Field; PRIVATE_TO_ROLLUP_ACCUMULATED_DATA_LENGTH] { + let mut fields: BoundedVec = + BoundedVec::new(); fields.extend_from_array(self.note_hashes); fields.extend_from_array(self.nullifiers); @@ -57,30 +48,24 @@ impl Serialize for CombinedAccumulatedData { for i in 0..self.private_logs.len() { fields.extend_from_array(self.private_logs[i].serialize()); } - for i in 0..self.unencrypted_logs_hashes.len() { - fields.extend_from_array(self.unencrypted_logs_hashes[i].serialize()); - } for i in 0..self.contract_class_logs_hashes.len() { fields.extend_from_array(self.contract_class_logs_hashes[i].serialize()); } - fields.push(self.unencrypted_log_preimages_length); fields.push(self.contract_class_log_preimages_length); - for i in 0..MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX { - fields.extend_from_array(self.public_data_writes[i].serialize()); - } - - assert_eq(fields.len(), COMBINED_ACCUMULATED_DATA_LENGTH); + assert_eq(fields.len(), PRIVATE_TO_ROLLUP_ACCUMULATED_DATA_LENGTH); fields.storage() } } -impl Deserialize for CombinedAccumulatedData { - fn deserialize(fields: [Field; COMBINED_ACCUMULATED_DATA_LENGTH]) -> CombinedAccumulatedData { +impl Deserialize for PrivateToRollupAccumulatedData { + fn deserialize( + fields: [Field; PRIVATE_TO_ROLLUP_ACCUMULATED_DATA_LENGTH], + ) -> PrivateToRollupAccumulatedData { let mut reader = Reader::new(fields); - let item = CombinedAccumulatedData { + let item = PrivateToRollupAccumulatedData { note_hashes: reader.read_array(), nullifiers: reader.read_array(), l2_to_l1_msgs: reader.read_struct_array( @@ -91,47 +76,35 @@ impl Deserialize for CombinedAccumulatedData { PrivateLog::deserialize, [PrivateLog::empty(); MAX_PRIVATE_LOGS_PER_TX], ), - unencrypted_logs_hashes: reader.read_struct_array( - ScopedLogHash::deserialize, - [ScopedLogHash::empty(); MAX_UNENCRYPTED_LOGS_PER_TX], - ), contract_class_logs_hashes: reader.read_struct_array( ScopedLogHash::deserialize, [ScopedLogHash::empty(); MAX_CONTRACT_CLASS_LOGS_PER_TX], ), - unencrypted_log_preimages_length: reader.read(), contract_class_log_preimages_length: reader.read(), - public_data_writes: reader.read_struct_array( - PublicDataWrite::deserialize, - [PublicDataWrite::empty(); MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX], - ), }; reader.finish(); item } } -impl Eq for CombinedAccumulatedData { +impl Eq for PrivateToRollupAccumulatedData { fn eq(self, other: Self) -> bool { (self.note_hashes == other.note_hashes) & (self.nullifiers == other.nullifiers) & (self.l2_to_l1_msgs == other.l2_to_l1_msgs) & (self.private_logs == other.private_logs) - & (self.unencrypted_logs_hashes == other.unencrypted_logs_hashes) & (self.contract_class_logs_hashes == other.contract_class_logs_hashes) - & (self.unencrypted_log_preimages_length == other.unencrypted_log_preimages_length) & ( self.contract_class_log_preimages_length == other.contract_class_log_preimages_length ) - & (self.public_data_writes == other.public_data_writes) } } #[test] fn serialization_of_empty() { - let item = CombinedAccumulatedData::empty(); + let item = PrivateToRollupAccumulatedData::empty(); let serialized = item.serialize(); - let deserialized = CombinedAccumulatedData::deserialize(serialized); + let deserialized = PrivateToRollupAccumulatedData::deserialize(serialized); assert(item.eq(deserialized)); } diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/kernel_circuit_public_inputs.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/kernel_circuit_public_inputs.nr deleted file mode 100644 index 115beab20f98..000000000000 --- a/noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/kernel_circuit_public_inputs.nr +++ /dev/null @@ -1,94 +0,0 @@ -use crate::{ - abis::{ - accumulated_data::CombinedAccumulatedData, combined_constant_data::CombinedConstantData, - gas::Gas, validation_requests::RollupValidationRequests, - }, - address::AztecAddress, - constants::KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH, - partial_state_reference::PartialStateReference, - traits::{Deserialize, Empty, Serialize}, - utils::reader::Reader, -}; - -// TODO: Update it to be specifically for the private_kernel_tail once we remove public_kernel_tail, which also outputs this. -pub struct KernelCircuitPublicInputs { - pub rollup_validation_requests: RollupValidationRequests, - pub end: CombinedAccumulatedData, - pub constants: CombinedConstantData, - pub start_state: PartialStateReference, - pub revert_code: u8, - pub gas_used: Gas, - pub fee_payer: AztecAddress, -} - -impl Empty for KernelCircuitPublicInputs { - fn empty() -> Self { - KernelCircuitPublicInputs { - rollup_validation_requests: RollupValidationRequests::empty(), - end: CombinedAccumulatedData::empty(), - constants: CombinedConstantData::empty(), - start_state: PartialStateReference::empty(), - revert_code: 0, - gas_used: Gas::empty(), - fee_payer: AztecAddress::empty(), - } - } -} - -impl Eq for KernelCircuitPublicInputs { - fn eq(self, other: Self) -> bool { - (self.rollup_validation_requests.eq(other.rollup_validation_requests)) - & (self.end.eq(other.end)) - & (self.constants.eq(other.constants)) - & (self.start_state.eq(other.start_state)) - & (self.revert_code == other.revert_code) - & (self.gas_used == other.gas_used) - & (self.fee_payer.eq(other.fee_payer)) - } -} - -impl Serialize for KernelCircuitPublicInputs { - fn serialize(self) -> [Field; KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH] { - let mut fields: BoundedVec = BoundedVec::new(); - - fields.extend_from_array(self.rollup_validation_requests.serialize()); - fields.extend_from_array(self.end.serialize()); - fields.extend_from_array(self.constants.serialize()); - fields.extend_from_array(self.start_state.serialize()); - fields.push(self.revert_code as Field); - fields.extend_from_array(self.gas_used.serialize()); - fields.extend_from_array(self.fee_payer.serialize()); - - assert_eq(fields.len(), KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH); - - fields.storage() - } -} - -impl Deserialize for KernelCircuitPublicInputs { - fn deserialize( - fields: [Field; KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH], - ) -> KernelCircuitPublicInputs { - let mut reader = Reader::new(fields); - let item = Self { - rollup_validation_requests: reader.read_struct(RollupValidationRequests::deserialize), - end: reader.read_struct(CombinedAccumulatedData::deserialize), - constants: reader.read_struct(CombinedConstantData::deserialize), - start_state: reader.read_struct(PartialStateReference::deserialize), - revert_code: reader.read() as u8, - gas_used: reader.read_struct(Gas::deserialize), - fee_payer: reader.read_struct(AztecAddress::deserialize), - }; - - reader.finish(); - item - } -} - -#[test] -fn serialization_of_empty_kernel_circuit_public_inputs() { - let item = KernelCircuitPublicInputs::empty(); - let serialized = item.serialize(); - let deserialized = KernelCircuitPublicInputs::deserialize(serialized); - assert(item.eq(deserialized)); -} diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/mod.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/mod.nr index 4cc319e29cd1..478420ce48c4 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/mod.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/mod.nr @@ -1,11 +1,11 @@ -pub mod kernel_circuit_public_inputs; +pub mod private_to_rollup_kernel_circuit_public_inputs; pub mod private_kernel_circuit_public_inputs; pub mod private_kernel_circuit_public_inputs_builder; pub mod private_to_public_kernel_circuit_public_inputs; -pub use kernel_circuit_public_inputs::KernelCircuitPublicInputs; pub use private_kernel_circuit_public_inputs::{ PrivateKernelCircuitPublicInputs, PrivateKernelCircuitPublicInputsArrayLengths, }; pub use private_kernel_circuit_public_inputs_builder::PrivateKernelCircuitPublicInputsBuilder; pub use private_to_public_kernel_circuit_public_inputs::PrivateToPublicKernelCircuitPublicInputs; +pub use private_to_rollup_kernel_circuit_public_inputs::PrivateToRollupKernelCircuitPublicInputs; diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/private_to_rollup_kernel_circuit_public_inputs.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/private_to_rollup_kernel_circuit_public_inputs.nr new file mode 100644 index 000000000000..9f00f0320e56 --- /dev/null +++ b/noir-projects/noir-protocol-circuits/crates/types/src/abis/kernel_circuit_public_inputs/private_to_rollup_kernel_circuit_public_inputs.nr @@ -0,0 +1,75 @@ +use crate::{ + abis::{ + accumulated_data::PrivateToRollupAccumulatedData, gas::Gas, + tx_constant_data::TxConstantData, validation_requests::RollupValidationRequests, + }, + address::AztecAddress, + constants::PRIVATE_TO_ROLLUP_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH, + traits::{Deserialize, Empty, Serialize}, + utils::reader::Reader, +}; +use std::meta::derive; + +#[derive(Eq)] +pub struct PrivateToRollupKernelCircuitPublicInputs { + pub constants: TxConstantData, + pub rollup_validation_requests: RollupValidationRequests, + pub end: PrivateToRollupAccumulatedData, + pub gas_used: Gas, + pub fee_payer: AztecAddress, +} + +impl Empty for PrivateToRollupKernelCircuitPublicInputs { + fn empty() -> Self { + PrivateToRollupKernelCircuitPublicInputs { + rollup_validation_requests: RollupValidationRequests::empty(), + end: PrivateToRollupAccumulatedData::empty(), + constants: TxConstantData::empty(), + gas_used: Gas::empty(), + fee_payer: AztecAddress::empty(), + } + } +} + +impl Serialize for PrivateToRollupKernelCircuitPublicInputs { + fn serialize(self) -> [Field; PRIVATE_TO_ROLLUP_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH] { + let mut fields: BoundedVec = + BoundedVec::new(); + + fields.extend_from_array(self.constants.serialize()); + fields.extend_from_array(self.rollup_validation_requests.serialize()); + fields.extend_from_array(self.end.serialize()); + fields.extend_from_array(self.gas_used.serialize()); + fields.extend_from_array(self.fee_payer.serialize()); + + assert_eq(fields.len(), PRIVATE_TO_ROLLUP_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH); + + fields.storage() + } +} + +impl Deserialize for PrivateToRollupKernelCircuitPublicInputs { + fn deserialize( + fields: [Field; PRIVATE_TO_ROLLUP_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH], + ) -> PrivateToRollupKernelCircuitPublicInputs { + let mut reader = Reader::new(fields); + let item = Self { + constants: reader.read_struct(TxConstantData::deserialize), + rollup_validation_requests: reader.read_struct(RollupValidationRequests::deserialize), + end: reader.read_struct(PrivateToRollupAccumulatedData::deserialize), + gas_used: reader.read_struct(Gas::deserialize), + fee_payer: reader.read_struct(AztecAddress::deserialize), + }; + + reader.finish(); + item + } +} + +#[test] +fn serialization_of_empty_kernel_circuit_public_inputs() { + let item = PrivateToRollupKernelCircuitPublicInputs::empty(); + let serialized = item.serialize(); + let deserialized = PrivateToRollupKernelCircuitPublicInputs::deserialize(serialized); + assert(item.eq(deserialized)); +} diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/abis/tube.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/tube.nr index a7541275ae01..747c2b3d182c 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/abis/tube.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/abis/tube.nr @@ -1,6 +1,6 @@ use crate::{ abis::kernel_circuit_public_inputs::{ - KernelCircuitPublicInputs, PrivateToPublicKernelCircuitPublicInputs, + PrivateToPublicKernelCircuitPublicInputs, PrivateToRollupKernelCircuitPublicInputs, }, constants::{PROOF_TYPE_ROLLUP_HONK, ROLLUP_HONK_VERIFICATION_KEY_LENGTH_IN_FIELDS}, proof::{traits::Verifiable, tube_proof::TubeProof, vk_data::VkData}, @@ -26,14 +26,14 @@ impl Verifiable for PublicTubeData { } pub struct PrivateTubeData { - pub public_inputs: KernelCircuitPublicInputs, + pub public_inputs: PrivateToRollupKernelCircuitPublicInputs, pub proof: TubeProof, pub vk_data: VkData, } impl Verifiable for PrivateTubeData { fn verify(self) { - let inputs = KernelCircuitPublicInputs::serialize(self.public_inputs); + let inputs = PrivateToRollupKernelCircuitPublicInputs::serialize(self.public_inputs); std::verify_proof_with_type( self.vk_data.vk.key, self.proof.fields, diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr b/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr index 8b9d45514a72..9be98412f5ce 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr @@ -334,15 +334,13 @@ pub global PRIVATE_VALIDATION_REQUESTS_LENGTH: u32 = ROLLUP_VALIDATION_REQUESTS_ + (SCOPED_KEY_VALIDATION_REQUEST_AND_GENERATOR_LENGTH * MAX_KEY_VALIDATION_REQUESTS_PER_TX) + 2; -pub global COMBINED_ACCUMULATED_DATA_LENGTH: u32 = MAX_NOTE_HASHES_PER_TX +pub global PRIVATE_TO_ROLLUP_ACCUMULATED_DATA_LENGTH: u32 = MAX_NOTE_HASHES_PER_TX + MAX_NULLIFIERS_PER_TX + (MAX_L2_TO_L1_MSGS_PER_TX * SCOPED_L2_TO_L1_MESSAGE_LENGTH) + (PRIVATE_LOG_SIZE_IN_FIELDS * MAX_PRIVATE_LOGS_PER_TX) - + (SCOPED_LOG_HASH_LENGTH * MAX_UNENCRYPTED_LOGS_PER_TX) - + 1 /* unencrypted_log_preimages_length */ + (SCOPED_LOG_HASH_LENGTH * MAX_CONTRACT_CLASS_LOGS_PER_TX) - + 1 /* contract_class_log_preimages_length */ - + (MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX * PUBLIC_DATA_WRITE_LENGTH); + + 1 /* contract_class_log_preimages_length */; + pub global TX_CONSTANT_DATA_LENGTH: u32 = BLOCK_HEADER_LENGTH + TX_CONTEXT_LENGTH + 1 /* vk_tree_root */ @@ -390,11 +388,9 @@ pub global PRIVATE_TO_PUBLIC_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH: u32 = TX_CONST + GAS_LENGTH /* gas_used */ + AZTEC_ADDRESS_LENGTH /* fee_payer */; -pub global KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH: u32 = ROLLUP_VALIDATION_REQUESTS_LENGTH - + COMBINED_ACCUMULATED_DATA_LENGTH - + COMBINED_CONSTANT_DATA_LENGTH - + PARTIAL_STATE_REFERENCE_LENGTH - + 1 /* revert_code */ +pub global PRIVATE_TO_ROLLUP_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH: u32 = ROLLUP_VALIDATION_REQUESTS_LENGTH + + PRIVATE_TO_ROLLUP_ACCUMULATED_DATA_LENGTH + + TX_CONSTANT_DATA_LENGTH + GAS_LENGTH /* gas_used */ + AZTEC_ADDRESS_LENGTH; diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/lib.nr b/noir-projects/noir-protocol-circuits/crates/types/src/lib.nr index e4e638b113dd..024d17987ee5 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/lib.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/lib.nr @@ -31,5 +31,5 @@ pub mod meta; pub mod indexed_tagging_secret; pub use abis::kernel_circuit_public_inputs::{ - KernelCircuitPublicInputs, PrivateKernelCircuitPublicInputs, + PrivateKernelCircuitPublicInputs, PrivateToRollupKernelCircuitPublicInputs, }; diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixture_builder.nr b/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixture_builder.nr index 404bd4cbc7e8..329155afadd4 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixture_builder.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/tests/fixture_builder.nr @@ -1,8 +1,9 @@ use crate::{ abis::{ accumulated_data::{ - avm_accumulated_data::AvmAccumulatedData, CombinedAccumulatedData, - PrivateAccumulatedData, PrivateAccumulatedDataBuilder, PrivateToPublicAccumulatedData, + avm_accumulated_data::AvmAccumulatedData, PrivateAccumulatedData, + PrivateAccumulatedDataBuilder, PrivateToPublicAccumulatedData, + PrivateToRollupAccumulatedData, }, append_only_tree_snapshot::AppendOnlyTreeSnapshot, avm_circuit_public_inputs::AvmProofData, @@ -14,8 +15,8 @@ use crate::{ gas_settings::GasSettings, global_variables::GlobalVariables, kernel_circuit_public_inputs::{ - KernelCircuitPublicInputs, PrivateKernelCircuitPublicInputs, - PrivateToPublicKernelCircuitPublicInputs, + PrivateKernelCircuitPublicInputs, PrivateToPublicKernelCircuitPublicInputs, + PrivateToRollupKernelCircuitPublicInputs, }, log::Log, log_hash::{LogHash, ScopedLogHash}, @@ -436,23 +437,18 @@ impl FixtureBuilder { } } - pub fn to_combined_accumulated_data(self) -> CombinedAccumulatedData { - CombinedAccumulatedData { + pub fn to_private_to_rollup_accumulated_data(self) -> PrivateToRollupAccumulatedData { + PrivateToRollupAccumulatedData { note_hashes: self.note_hashes.storage().map(|n: ScopedNoteHash| n.note_hash.value), nullifiers: self.nullifiers.storage().map(|n: ScopedNullifier| n.nullifier.value), l2_to_l1_msgs: self.l2_to_l1_msgs.storage().map(|m: ScopedL2ToL1Message| { m.expose_to_public() }), private_logs: self.private_logs.storage().map(|l: Scoped| l.inner.log), - unencrypted_logs_hashes: self.unencrypted_logs_hashes.storage().map(|l: ScopedLogHash| { - l.expose_to_public() - }), contract_class_logs_hashes: self.contract_class_logs_hashes.storage().map( |l: ScopedLogHash| l.expose_to_public(), ), - unencrypted_log_preimages_length: self.unencrypted_log_preimages_length, contract_class_log_preimages_length: self.contract_class_log_preimages_length, - public_data_writes: self.public_data_writes.storage(), } } @@ -527,17 +523,17 @@ impl FixtureBuilder { RollupValidationRequests { max_block_number: self.max_block_number } } - pub fn to_kernel_circuit_public_inputs(self) -> KernelCircuitPublicInputs { + pub fn to_private_to_rollup_kernel_circuit_public_inputs( + self, + ) -> PrivateToRollupKernelCircuitPublicInputs { let rollup_validation_requests = self.to_rollup_validation_requests(); - let end = self.to_combined_accumulated_data(); - let constants = self.to_constant_data(); + let end = self.to_private_to_rollup_accumulated_data(); + let constants = self.to_tx_constant_data(); - KernelCircuitPublicInputs { + PrivateToRollupKernelCircuitPublicInputs { rollup_validation_requests, end, constants, - start_state: self.start_state, - revert_code: self.revert_code, gas_used: self.gas_used, fee_payer: self.fee_payer, } @@ -545,7 +541,7 @@ impl FixtureBuilder { pub fn to_private_tube_data(self) -> PrivateTubeData { let mut result: PrivateTubeData = std::mem::zeroed(); - result.public_inputs = self.to_kernel_circuit_public_inputs(); + result.public_inputs = self.to_private_to_rollup_kernel_circuit_public_inputs(); result } diff --git a/yarn-project/bb-prover/src/prover/bb_prover.ts b/yarn-project/bb-prover/src/prover/bb_prover.ts index 9eb66ac75767..1f6f37062750 100644 --- a/yarn-project/bb-prover/src/prover/bb_prover.ts +++ b/yarn-project/bb-prover/src/prover/bb_prover.ts @@ -17,12 +17,12 @@ import { EmptyNestedData, Fr, IPA_CLAIM_LENGTH, - type KernelCircuitPublicInputs, NESTED_RECURSIVE_PROOF_LENGTH, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, type ParityPublicInputs, type PrivateKernelEmptyInputData, PrivateKernelEmptyInputs, + type PrivateToRollupKernelCircuitPublicInputs, Proof, RECURSIVE_PROOF_LENGTH, RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, @@ -390,7 +390,10 @@ export class BBNativeRollupProver implements ServerCircuitProver { public async getEmptyPrivateKernelProof( inputs: PrivateKernelEmptyInputData, ): Promise< - PublicInputsAndRecursiveProof + PublicInputsAndRecursiveProof< + PrivateToRollupKernelCircuitPublicInputs, + typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH + > > { const emptyNested = await this.getEmptyNestedProof(); const emptyPrivateKernelProof = await this.getEmptyPrivateKernelProofFromEmptyNested( @@ -426,7 +429,10 @@ export class BBNativeRollupProver implements ServerCircuitProver { private async getEmptyPrivateKernelProofFromEmptyNested( inputs: PrivateKernelEmptyInputs, ): Promise< - PublicInputsAndRecursiveProof + PublicInputsAndRecursiveProof< + PrivateToRollupKernelCircuitPublicInputs, + typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH + > > { const { circuitOutput, proof } = await this.createRecursiveProof( inputs, diff --git a/yarn-project/bb-prover/src/test/test_circuit_prover.ts b/yarn-project/bb-prover/src/test/test_circuit_prover.ts index 70257ec280b6..b1d9f46a3083 100644 --- a/yarn-project/bb-prover/src/test/test_circuit_prover.ts +++ b/yarn-project/bb-prover/src/test/test_circuit_prover.ts @@ -11,12 +11,12 @@ import { type AvmCircuitInputs, type BaseParityInputs, EmptyNestedData, - type KernelCircuitPublicInputs, NESTED_RECURSIVE_PROOF_LENGTH, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, type ParityPublicInputs, type PrivateKernelEmptyInputData, PrivateKernelEmptyInputs, + type PrivateToRollupKernelCircuitPublicInputs, type Proof, RECURSIVE_PROOF_LENGTH, type RootParityInputs, @@ -98,7 +98,10 @@ export class TestCircuitProver implements ServerCircuitProver { public async getEmptyPrivateKernelProof( inputs: PrivateKernelEmptyInputData, ): Promise< - PublicInputsAndRecursiveProof + PublicInputsAndRecursiveProof< + PrivateToRollupKernelCircuitPublicInputs, + typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH + > > { const emptyNested = new EmptyNestedData( makeRecursiveProof(NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH), diff --git a/yarn-project/circuit-types/src/interfaces/proving-job.ts b/yarn-project/circuit-types/src/interfaces/proving-job.ts index 331f914224f6..542ce92c39ec 100644 --- a/yarn-project/circuit-types/src/interfaces/proving-job.ts +++ b/yarn-project/circuit-types/src/interfaces/proving-job.ts @@ -2,11 +2,11 @@ import { AVM_PROOF_LENGTH_IN_FIELDS, AvmCircuitInputs, BaseParityInputs, - KernelCircuitPublicInputs, NESTED_RECURSIVE_PROOF_LENGTH, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, ParityPublicInputs, PrivateKernelEmptyInputData, + PrivateToRollupKernelCircuitPublicInputs, RECURSIVE_PROOF_LENGTH, RecursiveProof, RootParityInputs, @@ -168,7 +168,7 @@ export const ProvingJobResult = z.discriminatedUnion('type', [ z.object({ type: z.literal(ProvingRequestType.PRIVATE_KERNEL_EMPTY), result: schemaForPublicInputsAndRecursiveProof( - KernelCircuitPublicInputs.schema, + PrivateToRollupKernelCircuitPublicInputs.schema, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, ), }), @@ -238,7 +238,7 @@ export const ProvingJobResult = z.discriminatedUnion('type', [ export type ProvingJobResult = z.infer; export type ProvingJobResultsMap = { [ProvingRequestType.PRIVATE_KERNEL_EMPTY]: PublicInputsAndRecursiveProof< - KernelCircuitPublicInputs, + PrivateToRollupKernelCircuitPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH >; [ProvingRequestType.PUBLIC_VM]: ProofAndVerificationKey; diff --git a/yarn-project/circuit-types/src/interfaces/server_circuit_prover.ts b/yarn-project/circuit-types/src/interfaces/server_circuit_prover.ts index 5143bd427082..c1ffc5a9f27f 100644 --- a/yarn-project/circuit-types/src/interfaces/server_circuit_prover.ts +++ b/yarn-project/circuit-types/src/interfaces/server_circuit_prover.ts @@ -2,11 +2,11 @@ import { type AVM_PROOF_LENGTH_IN_FIELDS, type AvmCircuitInputs, type BaseParityInputs, - type KernelCircuitPublicInputs, type NESTED_RECURSIVE_PROOF_LENGTH, type NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, type ParityPublicInputs, type PrivateKernelEmptyInputData, + type PrivateToRollupKernelCircuitPublicInputs, type RECURSIVE_PROOF_LENGTH, type RootParityInputs, type TUBE_PROOF_LENGTH, @@ -145,7 +145,10 @@ export interface ServerCircuitProver { signal?: AbortSignal, epochNumber?: number, ): Promise< - PublicInputsAndRecursiveProof + PublicInputsAndRecursiveProof< + PrivateToRollupKernelCircuitPublicInputs, + typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH + > >; /** diff --git a/yarn-project/circuit-types/src/test/factories.ts b/yarn-project/circuit-types/src/test/factories.ts index 487bd5a86364..21367837a220 100644 --- a/yarn-project/circuit-types/src/test/factories.ts +++ b/yarn-project/circuit-types/src/test/factories.ts @@ -19,7 +19,7 @@ import { TxConstantData, mergeAccumulatedData, } from '@aztec/circuits.js'; -import { makeCombinedAccumulatedData, makePrivateToPublicAccumulatedData } from '@aztec/circuits.js/testing'; +import { makePrivateToPublicAccumulatedData, makePrivateToRollupAccumulatedData } from '@aztec/circuits.js/testing'; import { makeTuple } from '@aztec/foundation/array'; import { type MerkleTreeReadOperations } from '../interfaces/merkle_tree_operations.js'; @@ -73,10 +73,7 @@ export function makeBloatedProcessedTx({ tx.data.gasUsed = Gas.from({ daGas: FIXED_DA_GAS, l2Gas: FIXED_L2_GAS }); if (privateOnly) { - const data = makeCombinedAccumulatedData(seed + 0x1000); - - // Private-only tx has no public data writes. - data.publicDataWrites.forEach((_, i) => (data.publicDataWrites[i] = PublicDataWrite.empty())); + const data = makePrivateToRollupAccumulatedData(seed + 0x1000); const transactionFee = tx.data.gasUsed.computeFee(globalVariables.gasFees); diff --git a/yarn-project/circuit-types/src/tx/processed_tx.ts b/yarn-project/circuit-types/src/tx/processed_tx.ts index b9c4c465333f..3aa13b5af689 100644 --- a/yarn-project/circuit-types/src/tx/processed_tx.ts +++ b/yarn-project/circuit-types/src/tx/processed_tx.ts @@ -4,10 +4,11 @@ import { CombinedConstantData, Fr, Gas, - type GlobalVariables, + GlobalVariables, PrivateKernelTailCircuitPublicInputs, type PublicDataWrite, RevertCode, + TxConstantData, } from '@aztec/circuits.js'; import { siloL2ToL1Message } from '@aztec/circuits.js/hash'; @@ -92,7 +93,7 @@ export function makeEmptyProcessedTx( vkTreeRoot: Fr, protocolContractTreeRoot: Fr, ): ProcessedTx { - const constants = CombinedConstantData.empty(); + const constants = TxConstantData.empty(); constants.historicalHeader = header; constants.txContext.chainId = chainId; constants.txContext.version = version; @@ -107,7 +108,7 @@ export function makeEmptyProcessedTx( data: clientProofOutput, clientIvcProof: ClientIvcProof.empty(), avmProvingRequest: undefined, - constants, + constants: CombinedConstantData.combine(constants, GlobalVariables.empty()), txEffect: TxEffect.empty(), gasUsed: { totalGas: Gas.empty(), @@ -140,7 +141,7 @@ export function makeProcessedTxFromPrivateOnlyTx( .filter(h => !h.isZero()), publicDataWrites, data.end.privateLogs.filter(l => !l.isEmpty()), - data.end.unencryptedLogPreimagesLength, + Fr.ZERO, data.end.contractClassLogPreimagesLength, tx.unencryptedLogs, tx.contractClassLogs, diff --git a/yarn-project/circuits.js/src/constants.gen.ts b/yarn-project/circuits.js/src/constants.gen.ts index 80b30fd6343f..2153492a3990 100644 --- a/yarn-project/circuits.js/src/constants.gen.ts +++ b/yarn-project/circuits.js/src/constants.gen.ts @@ -173,7 +173,7 @@ export const IPA_CLAIM_LENGTH = 10; export const SCOPED_READ_REQUEST_LEN = 3; export const PUBLIC_DATA_READ_LENGTH = 3; export const PRIVATE_VALIDATION_REQUESTS_LENGTH = 772; -export const COMBINED_ACCUMULATED_DATA_LENGTH = 902; +export const PRIVATE_TO_ROLLUP_ACCUMULATED_DATA_LENGTH = 741; export const TX_CONSTANT_DATA_LENGTH = 37; export const COMBINED_CONSTANT_DATA_LENGTH = 46; export const PRIVATE_ACCUMULATED_DATA_LENGTH = 1412; @@ -183,7 +183,7 @@ export const PRIVATE_TO_AVM_ACCUMULATED_DATA_LENGTH = 160; export const NUM_PRIVATE_TO_AVM_ACCUMULATED_DATA_ARRAYS = 3; export const AVM_ACCUMULATED_DATA_LENGTH = 320; export const PRIVATE_TO_PUBLIC_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 1847; -export const KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 960; +export const PRIVATE_TO_ROLLUP_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 783; export const AVM_CIRCUIT_PUBLIC_INPUTS_LENGTH = 1011; export const CONSTANT_ROLLUP_DATA_LENGTH = 13; export const BASE_OR_MERGE_PUBLIC_INPUTS_LENGTH = 52; diff --git a/yarn-project/circuits.js/src/structs/index.ts b/yarn-project/circuits.js/src/structs/index.ts index 68d640ebf135..e4d61d294ac3 100644 --- a/yarn-project/circuits.js/src/structs/index.ts +++ b/yarn-project/circuits.js/src/structs/index.ts @@ -16,7 +16,7 @@ export * from './gas_settings.js'; export * from './global_variables.js'; export * from './block_header.js'; export * from './indexed_tagging_secret.js'; -export * from './kernel/combined_accumulated_data.js'; +export * from './kernel/private_to_rollup_accumulated_data.js'; export * from './kernel/combined_constant_data.js'; export * from './kernel/private_kernel_empty_inputs.js'; export * from './kernel/kernel_circuit_public_inputs.js'; diff --git a/yarn-project/circuits.js/src/structs/kernel/combined_accumulated_data.test.ts b/yarn-project/circuits.js/src/structs/kernel/combined_accumulated_data.test.ts deleted file mode 100644 index 64cbcb0cd1de..000000000000 --- a/yarn-project/circuits.js/src/structs/kernel/combined_accumulated_data.test.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { makeCombinedAccumulatedData } from '../../tests/factories.js'; -import { CombinedAccumulatedData } from './combined_accumulated_data.js'; - -describe('CombinedAccumulatedData', () => { - it('Data after serialization and deserialization is equal to the original', () => { - const original = makeCombinedAccumulatedData(); - const afterSerialization = CombinedAccumulatedData.fromBuffer(original.toBuffer()); - expect(original).toEqual(afterSerialization); - }); -}); diff --git a/yarn-project/circuits.js/src/structs/kernel/kernel_circuit_public_inputs.ts b/yarn-project/circuits.js/src/structs/kernel/kernel_circuit_public_inputs.ts index e5abfe011f18..c0fecd8b9992 100644 --- a/yarn-project/circuits.js/src/structs/kernel/kernel_circuit_public_inputs.ts +++ b/yarn-project/circuits.js/src/structs/kernel/kernel_circuit_public_inputs.ts @@ -4,17 +4,15 @@ import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize'; import { bufferToHex, hexToBuffer } from '@aztec/foundation/string'; import { Gas } from '../gas.js'; -import { PartialStateReference } from '../partial_state_reference.js'; -import { RevertCode } from '../revert_code.js'; import { RollupValidationRequests } from '../rollup_validation_requests.js'; -import { CombinedAccumulatedData } from './combined_accumulated_data.js'; -import { CombinedConstantData } from './combined_constant_data.js'; +import { PrivateToRollupAccumulatedData } from './private_to_rollup_accumulated_data.js'; +import { TxConstantData } from './tx_constant_data.js'; /** * Outputs from the public kernel circuits. * All Public kernels use this shape for outputs. */ -export class KernelCircuitPublicInputs { +export class PrivateToRollupKernelCircuitPublicInputs { constructor( /** * Validation requests accumulated from private and public execution to be completed by the rollup. @@ -23,16 +21,11 @@ export class KernelCircuitPublicInputs { /** * Data accumulated from both public and private circuits. */ - public end: CombinedAccumulatedData, + public end: PrivateToRollupAccumulatedData, /** * Data which is not modified by the circuits. */ - public constants: CombinedConstantData, - public startState: PartialStateReference, - /** - * Flag indicating whether the transaction reverted. - */ - public revertCode: RevertCode, + public constants: TxConstantData, /** * Gas used during this transaction */ @@ -48,42 +41,30 @@ export class KernelCircuitPublicInputs { } toBuffer() { - return serializeToBuffer( - this.rollupValidationRequests, - this.end, - this.constants, - this.startState, - this.revertCode, - this.gasUsed, - this.feePayer, - ); + return serializeToBuffer(this.rollupValidationRequests, this.end, this.constants, this.gasUsed, this.feePayer); } /** * Deserializes from a buffer or reader, corresponding to a write in cpp. * @param buffer - Buffer or reader to read from. - * @returns A new instance of KernelCircuitPublicInputs. + * @returns A new instance of PrivateToRollupKernelCircuitPublicInputs. */ - static fromBuffer(buffer: Buffer | BufferReader): KernelCircuitPublicInputs { + static fromBuffer(buffer: Buffer | BufferReader): PrivateToRollupKernelCircuitPublicInputs { const reader = BufferReader.asReader(buffer); - return new KernelCircuitPublicInputs( + return new PrivateToRollupKernelCircuitPublicInputs( reader.readObject(RollupValidationRequests), - reader.readObject(CombinedAccumulatedData), - reader.readObject(CombinedConstantData), - reader.readObject(PartialStateReference), - reader.readObject(RevertCode), + reader.readObject(PrivateToRollupAccumulatedData), + reader.readObject(TxConstantData), reader.readObject(Gas), reader.readObject(AztecAddress), ); } static empty() { - return new KernelCircuitPublicInputs( + return new PrivateToRollupKernelCircuitPublicInputs( RollupValidationRequests.empty(), - CombinedAccumulatedData.empty(), - CombinedConstantData.empty(), - PartialStateReference.empty(), - RevertCode.OK, + PrivateToRollupAccumulatedData.empty(), + TxConstantData.empty(), Gas.empty(), AztecAddress.ZERO, ); @@ -94,7 +75,7 @@ export class KernelCircuitPublicInputs { } static fromString(str: string) { - return KernelCircuitPublicInputs.fromBuffer(hexToBuffer(str)); + return PrivateToRollupKernelCircuitPublicInputs.fromBuffer(hexToBuffer(str)); } /** Returns a hex representation for JSON serialization. */ @@ -104,6 +85,6 @@ export class KernelCircuitPublicInputs { /** Creates an instance from a hex string. */ static get schema() { - return bufferSchemaFor(KernelCircuitPublicInputs); + return bufferSchemaFor(PrivateToRollupKernelCircuitPublicInputs); } } diff --git a/yarn-project/circuits.js/src/structs/kernel/private_kernel_tail_circuit_public_inputs.ts b/yarn-project/circuits.js/src/structs/kernel/private_kernel_tail_circuit_public_inputs.ts index 869427fa2ec8..14d20e21a11d 100644 --- a/yarn-project/circuits.js/src/structs/kernel/private_kernel_tail_circuit_public_inputs.ts +++ b/yarn-project/circuits.js/src/structs/kernel/private_kernel_tail_circuit_public_inputs.ts @@ -5,16 +5,12 @@ import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize'; import { countAccumulatedItems, mergeAccumulatedData } from '../../utils/index.js'; import { Gas } from '../gas.js'; -import { GlobalVariables } from '../global_variables.js'; -import { PartialStateReference } from '../partial_state_reference.js'; import { PublicCallRequest } from '../public_call_request.js'; -import { RevertCode } from '../revert_code.js'; import { RollupValidationRequests } from '../rollup_validation_requests.js'; -import { CombinedAccumulatedData } from './combined_accumulated_data.js'; -import { CombinedConstantData } from './combined_constant_data.js'; -import { KernelCircuitPublicInputs } from './kernel_circuit_public_inputs.js'; +import { PrivateToRollupKernelCircuitPublicInputs } from './kernel_circuit_public_inputs.js'; import { PrivateToPublicAccumulatedData } from './private_to_public_accumulated_data.js'; import { PrivateToPublicKernelCircuitPublicInputs } from './private_to_public_kernel_circuit_public_inputs.js'; +import { PrivateToRollupAccumulatedData } from './private_to_rollup_accumulated_data.js'; import { TxConstantData } from './tx_constant_data.js'; export class PartialPrivateTailPublicInputsForPublic { @@ -80,11 +76,11 @@ export class PartialPrivateTailPublicInputsForPublic { } export class PartialPrivateTailPublicInputsForRollup { - constructor(public end: CombinedAccumulatedData) {} + constructor(public end: PrivateToRollupAccumulatedData) {} static fromBuffer(buffer: Buffer | BufferReader): PartialPrivateTailPublicInputsForRollup { const reader = BufferReader.asReader(buffer); - return new PartialPrivateTailPublicInputsForRollup(reader.readObject(CombinedAccumulatedData)); + return new PartialPrivateTailPublicInputsForRollup(reader.readObject(PrivateToRollupAccumulatedData)); } getSize() { @@ -96,7 +92,7 @@ export class PartialPrivateTailPublicInputsForRollup { } static empty() { - return new PartialPrivateTailPublicInputsForRollup(CombinedAccumulatedData.empty()); + return new PartialPrivateTailPublicInputsForRollup(PrivateToRollupAccumulatedData.empty()); } } @@ -163,23 +159,20 @@ export class PrivateKernelTailCircuitPublicInputs { ); } - toKernelCircuitPublicInputs() { + toPrivateToRollupKernelCircuitPublicInputs() { if (!this.forRollup) { throw new Error('Private tail public inputs is not for rollup circuit.'); } - const constants = new CombinedConstantData( + const constants = new TxConstantData( this.constants.historicalHeader, this.constants.txContext, this.constants.vkTreeRoot, this.constants.protocolContractTreeRoot, - GlobalVariables.empty(), ); - return new KernelCircuitPublicInputs( + return new PrivateToRollupKernelCircuitPublicInputs( this.rollupValidationRequests, this.forRollup.end, constants, - PartialStateReference.empty(), - RevertCode.OK, this.gasUsed, this.feePayer, ); @@ -292,7 +285,7 @@ export class PrivateKernelTailCircuitPublicInputs { * TODO(#9269): Remove this method as we move away from 1st nullifier as hash. */ static emptyWithNullifier() { - const data = CombinedAccumulatedData.empty(); + const data = PrivateToRollupAccumulatedData.empty(); data.nullifiers[0] = Fr.random(); return new PrivateKernelTailCircuitPublicInputs( TxConstantData.empty(), diff --git a/yarn-project/circuits.js/src/structs/kernel/private_to_rollup_accumulated_data.test.ts b/yarn-project/circuits.js/src/structs/kernel/private_to_rollup_accumulated_data.test.ts new file mode 100644 index 000000000000..4ede3c490651 --- /dev/null +++ b/yarn-project/circuits.js/src/structs/kernel/private_to_rollup_accumulated_data.test.ts @@ -0,0 +1,10 @@ +import { makePrivateToRollupAccumulatedData } from '../../tests/factories.js'; +import { PrivateToRollupAccumulatedData } from './private_to_rollup_accumulated_data.js'; + +describe('PrivateToRollupAccumulatedData', () => { + it('Data after serialization and deserialization is equal to the original', () => { + const original = makePrivateToRollupAccumulatedData(); + const afterSerialization = PrivateToRollupAccumulatedData.fromBuffer(original.toBuffer()); + expect(original).toEqual(afterSerialization); + }); +}); diff --git a/yarn-project/circuits.js/src/structs/kernel/combined_accumulated_data.ts b/yarn-project/circuits.js/src/structs/kernel/private_to_rollup_accumulated_data.ts similarity index 64% rename from yarn-project/circuits.js/src/structs/kernel/combined_accumulated_data.ts rename to yarn-project/circuits.js/src/structs/kernel/private_to_rollup_accumulated_data.ts index 62e1abefdd2d..fc3fcc0b9cb0 100644 --- a/yarn-project/circuits.js/src/structs/kernel/combined_accumulated_data.ts +++ b/yarn-project/circuits.js/src/structs/kernel/private_to_rollup_accumulated_data.ts @@ -13,18 +13,15 @@ import { MAX_NOTE_HASHES_PER_TX, MAX_NULLIFIERS_PER_TX, MAX_PRIVATE_LOGS_PER_TX, - MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, - MAX_UNENCRYPTED_LOGS_PER_TX, } from '../../constants.gen.js'; import { ScopedL2ToL1Message } from '../l2_to_l1_message.js'; import { ScopedLogHash } from '../log_hash.js'; import { PrivateLog } from '../private_log.js'; -import { PublicDataWrite } from '../public_data_write.js'; /** * Data that is accumulated during the execution of the transaction. */ -export class CombinedAccumulatedData { +export class PrivateToRollupAccumulatedData { constructor( /** * The new note hashes made in this transaction. @@ -42,28 +39,15 @@ export class CombinedAccumulatedData { * All the logs created emitted from the private functions in this transaction. */ public privateLogs: Tuple, - /** - * Accumulated unencrypted logs hash from all the previous kernel iterations. - * Note: Truncated to 31 bytes to fit in Fr. - */ - public unencryptedLogsHashes: Tuple, /** * Accumulated contract class logs hash from all the previous kernel iterations. * Note: Truncated to 31 bytes to fit in Fr. */ public contractClassLogsHashes: Tuple, - /** - * Total accumulated length of the unencrypted log preimages emitted in all the previous kernel iterations - */ - public unencryptedLogPreimagesLength: Fr, /** * Total accumulated length of the contract class log preimages emitted in all the previous kernel iterations */ public contractClassLogPreimagesLength: Fr, - /** - * All the public data update requests made in this transaction. - */ - public publicDataWrites: Tuple, ) {} getSize() { @@ -72,34 +56,28 @@ export class CombinedAccumulatedData { arraySerializedSizeOfNonEmpty(this.nullifiers) + arraySerializedSizeOfNonEmpty(this.l2ToL1Msgs) + arraySerializedSizeOfNonEmpty(this.privateLogs) + - arraySerializedSizeOfNonEmpty(this.unencryptedLogsHashes) + arraySerializedSizeOfNonEmpty(this.contractClassLogsHashes) + - this.unencryptedLogPreimagesLength.size + - this.contractClassLogPreimagesLength.size + - arraySerializedSizeOfNonEmpty(this.publicDataWrites) + this.contractClassLogPreimagesLength.size ); } - static getFields(fields: FieldsOf) { + static getFields(fields: FieldsOf) { return [ fields.noteHashes, fields.nullifiers, fields.l2ToL1Msgs, fields.privateLogs, - fields.unencryptedLogsHashes, fields.contractClassLogsHashes, - fields.unencryptedLogPreimagesLength, fields.contractClassLogPreimagesLength, - fields.publicDataWrites, ] as const; } - static from(fields: FieldsOf): CombinedAccumulatedData { - return new CombinedAccumulatedData(...CombinedAccumulatedData.getFields(fields)); + static from(fields: FieldsOf): PrivateToRollupAccumulatedData { + return new PrivateToRollupAccumulatedData(...PrivateToRollupAccumulatedData.getFields(fields)); } static get schema() { - return bufferSchemaFor(CombinedAccumulatedData); + return bufferSchemaFor(PrivateToRollupAccumulatedData); } toJSON() { @@ -107,7 +85,7 @@ export class CombinedAccumulatedData { } toBuffer() { - return serializeToBuffer(...CombinedAccumulatedData.getFields(this)); + return serializeToBuffer(...PrivateToRollupAccumulatedData.getFields(this)); } toString() { @@ -119,18 +97,15 @@ export class CombinedAccumulatedData { * @param buffer - Buffer or reader to read from. * @returns Deserialized object. */ - static fromBuffer(buffer: Buffer | BufferReader): CombinedAccumulatedData { + static fromBuffer(buffer: Buffer | BufferReader): PrivateToRollupAccumulatedData { const reader = BufferReader.asReader(buffer); - return new CombinedAccumulatedData( + return new PrivateToRollupAccumulatedData( reader.readArray(MAX_NOTE_HASHES_PER_TX, Fr), reader.readArray(MAX_NULLIFIERS_PER_TX, Fr), reader.readArray(MAX_L2_TO_L1_MSGS_PER_TX, ScopedL2ToL1Message), reader.readArray(MAX_PRIVATE_LOGS_PER_TX, PrivateLog), - reader.readArray(MAX_UNENCRYPTED_LOGS_PER_TX, ScopedLogHash), reader.readArray(MAX_CONTRACT_CLASS_LOGS_PER_TX, ScopedLogHash), Fr.fromBuffer(reader), - Fr.fromBuffer(reader), - reader.readArray(MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, PublicDataWrite), ); } @@ -140,25 +115,22 @@ export class CombinedAccumulatedData { * @returns Deserialized object. */ static fromString(str: string) { - return CombinedAccumulatedData.fromBuffer(hexToBuffer(str)); + return PrivateToRollupAccumulatedData.fromBuffer(hexToBuffer(str)); } static empty() { - return new CombinedAccumulatedData( + return new PrivateToRollupAccumulatedData( makeTuple(MAX_NOTE_HASHES_PER_TX, Fr.zero), makeTuple(MAX_NULLIFIERS_PER_TX, Fr.zero), makeTuple(MAX_L2_TO_L1_MSGS_PER_TX, ScopedL2ToL1Message.empty), makeTuple(MAX_PRIVATE_LOGS_PER_TX, PrivateLog.empty), - makeTuple(MAX_UNENCRYPTED_LOGS_PER_TX, ScopedLogHash.empty), makeTuple(MAX_CONTRACT_CLASS_LOGS_PER_TX, ScopedLogHash.empty), Fr.zero(), - Fr.zero(), - makeTuple(MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, PublicDataWrite.empty), ); } [inspect.custom]() { - return `CombinedAccumulatedData { + return `PrivateToRollupAccumulatedData { noteHashes: [${this.noteHashes .filter(x => !x.isZero()) .map(x => inspect(x)) @@ -175,20 +147,11 @@ export class CombinedAccumulatedData { .filter(x => !x.isEmpty()) .map(x => inspect(x)) .join(', ')}] - unencryptedLogsHashes: : [${this.unencryptedLogsHashes - .filter(x => !x.isEmpty()) - .map(x => inspect(x)) - .join(', ')}], contractClassLogsHashes: : [${this.contractClassLogsHashes .filter(x => !x.isEmpty()) .map(x => inspect(x)) .join(', ')}], - unencryptedLogPreimagesLength: ${this.unencryptedLogPreimagesLength.toString()}, contractClassLogPreimagesLength: ${this.contractClassLogPreimagesLength.toString()}, - publicDataWrites: [${this.publicDataWrites - .filter(x => !x.isEmpty()) - .map(x => inspect(x)) - .join(', ')}], }`; } } diff --git a/yarn-project/circuits.js/src/structs/rollup/private_tube_data.ts b/yarn-project/circuits.js/src/structs/rollup/private_tube_data.ts index 342b5b388a98..b574dbc49b20 100644 --- a/yarn-project/circuits.js/src/structs/rollup/private_tube_data.ts +++ b/yarn-project/circuits.js/src/structs/rollup/private_tube_data.ts @@ -1,20 +1,20 @@ import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize'; import { NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH } from '../../constants.gen.js'; -import { KernelCircuitPublicInputs } from '../kernel/kernel_circuit_public_inputs.js'; +import { PrivateToRollupKernelCircuitPublicInputs } from '../kernel/kernel_circuit_public_inputs.js'; import { RecursiveProof, makeEmptyRecursiveProof } from '../recursive_proof.js'; import { VkWitnessData } from '../vk_witness_data.js'; export class PrivateTubeData { constructor( - public publicInputs: KernelCircuitPublicInputs, + public publicInputs: PrivateToRollupKernelCircuitPublicInputs, public proof: RecursiveProof, public vkData: VkWitnessData, ) {} static empty() { return new PrivateTubeData( - KernelCircuitPublicInputs.empty(), + PrivateToRollupKernelCircuitPublicInputs.empty(), makeEmptyRecursiveProof(NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH), VkWitnessData.empty(), ); @@ -23,7 +23,7 @@ export class PrivateTubeData { static fromBuffer(buffer: Buffer | BufferReader) { const reader = BufferReader.asReader(buffer); return new PrivateTubeData( - reader.readObject(KernelCircuitPublicInputs), + reader.readObject(PrivateToRollupKernelCircuitPublicInputs), RecursiveProof.fromBuffer(reader, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH), reader.readObject(VkWitnessData), ); diff --git a/yarn-project/circuits.js/src/tests/factories.ts b/yarn-project/circuits.js/src/tests/factories.ts index 2cbedd386271..1f7cde5ddfd1 100644 --- a/yarn-project/circuits.js/src/tests/factories.ts +++ b/yarn-project/circuits.js/src/tests/factories.ts @@ -26,7 +26,6 @@ import { BLOBS_PER_BLOCK, BaseParityInputs, CallContext, - CombinedAccumulatedData, CombinedConstantData, ContractStorageRead, ContractStorageUpdateRequest, @@ -81,6 +80,7 @@ import { PrivateCallRequest, PrivateCircuitPublicInputs, PrivateKernelTailCircuitPublicInputs, + PrivateToRollupAccumulatedData, Proof, PublicCallRequest, PublicCircuitPublicInputs, @@ -91,7 +91,6 @@ import { PublicKeys, RECURSIVE_PROOF_LENGTH, ReadRequest, - RevertCode, RollupTypes, RootParityInput, RootParityInputs, @@ -141,7 +140,7 @@ import { TxConstantData, VkWitnessData, } from '../structs/index.js'; -import { KernelCircuitPublicInputs } from '../structs/kernel/kernel_circuit_public_inputs.js'; +import { PrivateToRollupKernelCircuitPublicInputs } from '../structs/kernel/kernel_circuit_public_inputs.js'; import { AvmProofData } from '../structs/rollup/avm_proof_data.js'; import { BaseOrMergeRollupPublicInputs } from '../structs/rollup/base_or_merge_rollup_public_inputs.js'; import { PrivateBaseRollupHints, PublicBaseRollupHints } from '../structs/rollup/base_rollup_hints.js'; @@ -304,24 +303,16 @@ export function makeCombinedConstantData(seed = 1): CombinedConstantData { * @param seed - The seed to use for generating the accumulated data. * @returns An accumulated data. */ -export function makeCombinedAccumulatedData(seed = 1, full = false): CombinedAccumulatedData { +export function makePrivateToRollupAccumulatedData(seed = 1, full = false): PrivateToRollupAccumulatedData { const tupleGenerator = full ? makeTuple : makeHalfFullTuple; - return new CombinedAccumulatedData( + return new PrivateToRollupAccumulatedData( tupleGenerator(MAX_NOTE_HASHES_PER_TX, fr, seed + 0x120, Fr.zero), tupleGenerator(MAX_NULLIFIERS_PER_TX, fr, seed + 0x200, Fr.zero), tupleGenerator(MAX_L2_TO_L1_MSGS_PER_TX, makeScopedL2ToL1Message, seed + 0x600, ScopedL2ToL1Message.empty), tupleGenerator(MAX_PRIVATE_LOGS_PER_TX, makePrivateLog, seed + 0x700, PrivateLog.empty), - tupleGenerator(MAX_UNENCRYPTED_LOGS_PER_TX, makeScopedLogHash, seed + 0x900, ScopedLogHash.empty), // unencrypted logs tupleGenerator(MAX_CONTRACT_CLASS_LOGS_PER_TX, makeScopedLogHash, seed + 0xa00, ScopedLogHash.empty), // contract class logs - fr(seed + 0xd00), // unencrypted_log_preimages_length fr(seed + 0xe00), // contract_class_log_preimages_length - tupleGenerator( - MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, - makePublicDataWrite, - seed + 0xd00, - PublicDataWrite.empty, - ), ); } @@ -394,7 +385,7 @@ export function makePrivateKernelTailCircuitPublicInputs( ) : undefined; const forRollup = !isForPublic - ? new PartialPrivateTailPublicInputsForRollup(makeCombinedAccumulatedData(seed + 0x100)) + ? new PartialPrivateTailPublicInputsForRollup(makePrivateToRollupAccumulatedData(seed + 0x100)) : undefined; return new PrivateKernelTailCircuitPublicInputs( makeTxConstantData(seed + 0x300), @@ -423,13 +414,14 @@ function makePrivateToPublicKernelCircuitPublicInputs(seed = 1) { * @param seed - The seed to use for generating the kernel circuit public inputs. * @returns Public kernel circuit public inputs. */ -export function makeKernelCircuitPublicInputs(seed = 1, fullAccumulatedData = true): KernelCircuitPublicInputs { - return new KernelCircuitPublicInputs( +export function makePrivateToRollupKernelCircuitPublicInputs( + seed = 1, + fullAccumulatedData = true, +): PrivateToRollupKernelCircuitPublicInputs { + return new PrivateToRollupKernelCircuitPublicInputs( makeRollupValidationRequests(seed), - makeCombinedAccumulatedData(seed, fullAccumulatedData), - makeCombinedConstantData(seed + 0x100), - makePartialStateReference(seed + 0x200), - RevertCode.OK, + makePrivateToRollupAccumulatedData(seed, fullAccumulatedData), + makeTxConstantData(seed + 0x100), makeGas(seed + 0x600), makeAztecAddress(seed + 0x700), ); @@ -1122,9 +1114,9 @@ function makeVkWitnessData(seed = 1) { return new VkWitnessData(VerificationKeyData.makeFakeHonk(), seed, makeTuple(VK_TREE_HEIGHT, fr, seed + 0x100)); } -function makePrivateTubeData(seed = 1, kernelPublicInputs?: KernelCircuitPublicInputs) { +function makePrivateTubeData(seed = 1, kernelPublicInputs?: PrivateToRollupKernelCircuitPublicInputs) { return new PrivateTubeData( - kernelPublicInputs ?? makeKernelCircuitPublicInputs(seed, true), + kernelPublicInputs ?? makePrivateToRollupKernelCircuitPublicInputs(seed, true), makeRecursiveProof(TUBE_PROOF_LENGTH, seed + 0x100), makeVkWitnessData(seed + 0x200), ); diff --git a/yarn-project/noir-protocol-circuits-types/src/conversion/client.ts b/yarn-project/noir-protocol-circuits-types/src/conversion/client.ts index 5ac5dbc4918f..0287b5c2c457 100644 --- a/yarn-project/noir-protocol-circuits-types/src/conversion/client.ts +++ b/yarn-project/noir-protocol-circuits-types/src/conversion/client.ts @@ -61,7 +61,6 @@ import type { Counted as CountedPublicCallRequestNoir, FixedLengthArray, FunctionData as FunctionDataNoir, - KernelCircuitPublicInputs as KernelCircuitPublicInputsNoir, KeyValidationHint as KeyValidationHintNoir, KeyValidationRequestAndGenerator as KeyValidationRequestAndGeneratorNoir, KeyValidationRequest as KeyValidationRequestsNoir, @@ -84,6 +83,7 @@ import type { PrivateLogData as PrivateLogDataNoir, PrivateToPublicAccumulatedData as PrivateToPublicAccumulatedDataNoir, PrivateToPublicKernelCircuitPublicInputs as PrivateToPublicKernelCircuitPublicInputsNoir, + PrivateToRollupKernelCircuitPublicInputs as PrivateToRollupKernelCircuitPublicInputsNoir, PrivateValidationRequests as PrivateValidationRequestsNoir, PublicKeys as PublicKeysNoir, ReadRequest as ReadRequestNoir, @@ -102,7 +102,6 @@ import type { import { mapAztecAddressFromNoir, mapAztecAddressToNoir, - mapCombinedAccumulatedDataFromNoir, mapFieldFromNoir, mapFieldToNoir, mapFunctionSelectorFromNoir, @@ -124,6 +123,7 @@ import { mapPointToNoir, mapPrivateLogFromNoir, mapPrivateLogToNoir, + mapPrivateToRollupAccumulatedDataFromNoir, mapPublicCallRequestFromNoir, mapPublicCallRequestToNoir, mapScopedL2ToL1MessageFromNoir, @@ -683,9 +683,9 @@ export function mapPrivateKernelDataToNoir( } export function mapPrivateKernelTailCircuitPublicInputsForRollupFromNoir( - inputs: KernelCircuitPublicInputsNoir, + inputs: PrivateToRollupKernelCircuitPublicInputsNoir, ): PrivateKernelTailCircuitPublicInputs { - const forRollup = new PartialPrivateTailPublicInputsForRollup(mapCombinedAccumulatedDataFromNoir(inputs.end)); + const forRollup = new PartialPrivateTailPublicInputsForRollup(mapPrivateToRollupAccumulatedDataFromNoir(inputs.end)); return new PrivateKernelTailCircuitPublicInputs( mapTxConstantDataFromNoir(inputs.constants), mapRollupValidationRequestsFromNoir(inputs.rollup_validation_requests), diff --git a/yarn-project/noir-protocol-circuits-types/src/conversion/common.ts b/yarn-project/noir-protocol-circuits-types/src/conversion/common.ts index 8434af0674a2..e4fb401537ea 100644 --- a/yarn-project/noir-protocol-circuits-types/src/conversion/common.ts +++ b/yarn-project/noir-protocol-circuits-types/src/conversion/common.ts @@ -2,7 +2,6 @@ import { AppendOnlyTreeSnapshot, AztecAddress, BlockHeader, - CombinedAccumulatedData, ContentCommitment, EthAddress, Fr, @@ -19,8 +18,6 @@ import { MAX_NOTE_HASHES_PER_TX, MAX_NULLIFIERS_PER_TX, MAX_PRIVATE_LOGS_PER_TX, - MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, - MAX_UNENCRYPTED_LOGS_PER_TX, MaxBlockNumber, type MembershipWitness, NUM_BYTES_PER_SHA256, @@ -29,9 +26,10 @@ import { PartialStateReference, Point, PrivateLog, + PrivateToRollupAccumulatedData, PublicCallRequest, type PublicDataTreeLeafPreimage, - PublicDataWrite, + type PublicDataWrite, ScopedL2ToL1Message, ScopedLogHash, StateReference, @@ -44,7 +42,6 @@ import { type Tuple, mapTuple, toTruncField } from '@aztec/foundation/serialize' import type { AppendOnlyTreeSnapshot as AppendOnlyTreeSnapshotNoir, BlockHeader as BlockHeaderNoir, - CombinedAccumulatedData as CombinedAccumulatedDataNoir, ContentCommitment as ContentCommitmentNoir, Field, FixedLengthArray, @@ -66,6 +63,7 @@ import type { Option as OptionalNumberNoir, PartialStateReference as PartialStateReferenceNoir, Log as PrivateLogNoir, + PrivateToRollupAccumulatedData as PrivateToRollupAccumulatedDataNoir, PublicCallRequest as PublicCallRequestNoir, PublicDataTreeLeafPreimage as PublicDataTreeLeafPreimageNoir, PublicDataWrite as PublicDataWriteNoir, @@ -660,10 +658,6 @@ function mapScopedLogHashFromNoir(scopedLogHash: ScopedLogHashNoir): ScopedLogHa ); } -function mapPublicDataWriteFromNoir(write: PublicDataWriteNoir) { - return new PublicDataWrite(mapFieldFromNoir(write.leaf_slot), mapFieldFromNoir(write.value)); -} - export function mapPublicDataWriteToNoir(write: PublicDataWrite): PublicDataWriteNoir { return { leaf_slot: mapFieldToNoir(write.leafSlot), @@ -673,32 +667,28 @@ export function mapPublicDataWriteToNoir(write: PublicDataWrite): PublicDataWrit /** * Maps combined accumulated data from noir to the parsed type. - * @param combinedAccumulatedData - The noir combined accumulated data. + * @param PrivateToRollupAccumulatedData - The noir combined accumulated data. * @returns The parsed combined accumulated data. */ -export function mapCombinedAccumulatedDataFromNoir(combinedAccumulatedData: CombinedAccumulatedDataNoir) { - return new CombinedAccumulatedData( - mapTupleFromNoir(combinedAccumulatedData.note_hashes, MAX_NOTE_HASHES_PER_TX, mapFieldFromNoir), - mapTupleFromNoir(combinedAccumulatedData.nullifiers, MAX_NULLIFIERS_PER_TX, mapFieldFromNoir), - mapTupleFromNoir(combinedAccumulatedData.l2_to_l1_msgs, MAX_L2_TO_L1_MSGS_PER_TX, mapScopedL2ToL1MessageFromNoir), - mapTupleFromNoir(combinedAccumulatedData.private_logs, MAX_PRIVATE_LOGS_PER_TX, mapPrivateLogFromNoir), +export function mapPrivateToRollupAccumulatedDataFromNoir( + privateToRollupAccumulatedData: PrivateToRollupAccumulatedDataNoir, +) { + return new PrivateToRollupAccumulatedData( + mapTupleFromNoir(privateToRollupAccumulatedData.note_hashes, MAX_NOTE_HASHES_PER_TX, mapFieldFromNoir), + mapTupleFromNoir(privateToRollupAccumulatedData.nullifiers, MAX_NULLIFIERS_PER_TX, mapFieldFromNoir), mapTupleFromNoir( - combinedAccumulatedData.unencrypted_logs_hashes, - MAX_UNENCRYPTED_LOGS_PER_TX, - mapScopedLogHashFromNoir, + privateToRollupAccumulatedData.l2_to_l1_msgs, + MAX_L2_TO_L1_MSGS_PER_TX, + mapScopedL2ToL1MessageFromNoir, ), + mapTupleFromNoir(privateToRollupAccumulatedData.private_logs, MAX_PRIVATE_LOGS_PER_TX, mapPrivateLogFromNoir), + mapTupleFromNoir( - combinedAccumulatedData.contract_class_logs_hashes, + privateToRollupAccumulatedData.contract_class_logs_hashes, MAX_CONTRACT_CLASS_LOGS_PER_TX, mapScopedLogHashFromNoir, ), - mapFieldFromNoir(combinedAccumulatedData.unencrypted_log_preimages_length), - mapFieldFromNoir(combinedAccumulatedData.contract_class_log_preimages_length), - mapTupleFromNoir( - combinedAccumulatedData.public_data_writes, - MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, - mapPublicDataWriteFromNoir, - ), + mapFieldFromNoir(privateToRollupAccumulatedData.contract_class_log_preimages_length), ); } diff --git a/yarn-project/noir-protocol-circuits-types/src/conversion/server.ts b/yarn-project/noir-protocol-circuits-types/src/conversion/server.ts index 5f3a6f9a660f..a53043c60820 100644 --- a/yarn-project/noir-protocol-circuits-types/src/conversion/server.ts +++ b/yarn-project/noir-protocol-circuits-types/src/conversion/server.ts @@ -6,12 +6,9 @@ import { type AvmCircuitPublicInputs, BLOBS_PER_BLOCK, type BaseParityInputs, - type CombinedAccumulatedData, - CombinedConstantData, type EmptyNestedData, Fr, HONK_VERIFICATION_KEY_LENGTH_IN_FIELDS, - KernelCircuitPublicInputs, type MembershipWitness, type NESTED_RECURSIVE_PROOF_LENGTH, type NULLIFIER_TREE_HEIGHT, @@ -22,6 +19,8 @@ import { type PrivateToAvmAccumulatedDataArrayLengths, type PrivateToPublicAccumulatedData, type PrivateToPublicKernelCircuitPublicInputs, + type PrivateToRollupAccumulatedData, + PrivateToRollupKernelCircuitPublicInputs, type PublicDataHint, type RECURSIVE_PROOF_LENGTH, ROLLUP_HONK_VERIFICATION_KEY_LENGTH_IN_FIELDS, @@ -32,7 +31,7 @@ import { type RootParityInputs, type TUBE_PROOF_LENGTH, type TreeSnapshots, - type TxConstantData, + TxConstantData, type VkWitnessData, } from '@aztec/circuits.js'; import { BlobPublicInputs, BlockBlobPublicInputs, Poseidon2Sponge, SpongeBlob } from '@aztec/circuits.js/blobs'; @@ -73,14 +72,11 @@ import type { BlockMergeRollupInputs as BlockMergeRollupInputsNoir, BlockRootOrBlockMergePublicInputs as BlockRootOrBlockMergePublicInputsNoir, BlockRootRollupInputs as BlockRootRollupInputsNoir, - CombinedAccumulatedData as CombinedAccumulatedDataNoir, - CombinedConstantData as CombinedConstantDataNoir, ConstantRollupData as ConstantRollupDataNoir, EmptyBlockRootRollupInputs as EmptyBlockRootRollupInputsNoir, EmptyNestedCircuitPublicInputs as EmptyNestedDataNoir, FeeRecipient as FeeRecipientNoir, FixedLengthArray, - KernelCircuitPublicInputs as KernelCircuitPublicInputsNoir, MergeRollupInputs as MergeRollupInputsNoir, Field as NoirField, ParityPublicInputs as ParityPublicInputsNoir, @@ -95,6 +91,8 @@ import type { PrivateToAvmAccumulatedData as PrivateToAvmAccumulatedDataNoir, PrivateToPublicAccumulatedData as PrivateToPublicAccumulatedDataNoir, PrivateToPublicKernelCircuitPublicInputs as PrivateToPublicKernelCircuitPublicInputsNoir, + PrivateToRollupAccumulatedData as PrivateToRollupAccumulatedDataNoir, + PrivateToRollupKernelCircuitPublicInputs as PrivateToRollupKernelCircuitPublicInputsNoir, PrivateTubeData as PrivateTubeDataNoir, PublicBaseRollupInputs as PublicBaseRollupInputsNoir, PublicBaseStateDiffHints as PublicBaseStateDiffHintsNoir, @@ -115,7 +113,6 @@ import { mapAppendOnlyTreeSnapshotToNoir, mapAztecAddressFromNoir, mapAztecAddressToNoir, - mapCombinedAccumulatedDataFromNoir, mapEthAddressFromNoir, mapEthAddressToNoir, mapFieldFromNoir, @@ -136,6 +133,7 @@ import { mapPartialStateReferenceFromNoir, mapPartialStateReferenceToNoir, mapPrivateLogToNoir, + mapPrivateToRollupAccumulatedDataFromNoir, mapPublicCallRequestToNoir, mapPublicDataTreePreimageToNoir, mapPublicDataWriteToNoir, @@ -471,42 +469,31 @@ export function mapPrivateToPublicAccumulatedDataToNoir( }; } -export function mapCombinedAccumulatedDataToNoir( - combinedAccumulatedData: CombinedAccumulatedData, -): CombinedAccumulatedDataNoir { +export function mapPrivateToRollupAccumulatedDataToNoir( + privateToRollupAccumulatedData: PrivateToRollupAccumulatedData, +): PrivateToRollupAccumulatedDataNoir { return { - note_hashes: mapTuple(combinedAccumulatedData.noteHashes, mapFieldToNoir), - nullifiers: mapTuple(combinedAccumulatedData.nullifiers, mapFieldToNoir), - l2_to_l1_msgs: mapTuple(combinedAccumulatedData.l2ToL1Msgs, mapScopedL2ToL1MessageToNoir), - private_logs: mapTuple(combinedAccumulatedData.privateLogs, mapPrivateLogToNoir), - unencrypted_logs_hashes: mapTuple(combinedAccumulatedData.unencryptedLogsHashes, mapScopedLogHashToNoir), - contract_class_logs_hashes: mapTuple(combinedAccumulatedData.contractClassLogsHashes, mapScopedLogHashToNoir), - unencrypted_log_preimages_length: mapFieldToNoir(combinedAccumulatedData.unencryptedLogPreimagesLength), - contract_class_log_preimages_length: mapFieldToNoir(combinedAccumulatedData.contractClassLogPreimagesLength), - public_data_writes: mapTuple(combinedAccumulatedData.publicDataWrites, mapPublicDataWriteToNoir), + note_hashes: mapTuple(privateToRollupAccumulatedData.noteHashes, mapFieldToNoir), + nullifiers: mapTuple(privateToRollupAccumulatedData.nullifiers, mapFieldToNoir), + l2_to_l1_msgs: mapTuple(privateToRollupAccumulatedData.l2ToL1Msgs, mapScopedL2ToL1MessageToNoir), + private_logs: mapTuple(privateToRollupAccumulatedData.privateLogs, mapPrivateLogToNoir), + contract_class_logs_hashes: mapTuple( + privateToRollupAccumulatedData.contractClassLogsHashes, + mapScopedLogHashToNoir, + ), + contract_class_log_preimages_length: mapFieldToNoir(privateToRollupAccumulatedData.contractClassLogPreimagesLength), }; } -function mapCombinedConstantDataFromNoir(combinedConstantData: CombinedConstantDataNoir): CombinedConstantData { - return new CombinedConstantData( +function mapTxConstantDataFromNoir(combinedConstantData: TxConstantDataNoir): TxConstantData { + return new TxConstantData( mapHeaderFromNoir(combinedConstantData.historical_header), mapTxContextFromNoir(combinedConstantData.tx_context), mapFieldFromNoir(combinedConstantData.vk_tree_root), mapFieldFromNoir(combinedConstantData.protocol_contract_tree_root), - mapGlobalVariablesFromNoir(combinedConstantData.global_variables), ); } -function mapCombinedConstantDataToNoir(combinedConstantData: CombinedConstantData): CombinedConstantDataNoir { - return { - historical_header: mapHeaderToNoir(combinedConstantData.historicalHeader), - tx_context: mapTxContextToNoir(combinedConstantData.txContext), - vk_tree_root: mapFieldToNoir(combinedConstantData.vkTreeRoot), - protocol_contract_tree_root: mapFieldToNoir(combinedConstantData.protocolContractTreeRoot), - global_variables: mapGlobalVariablesToNoir(combinedConstantData.globalVariables), - }; -} - function mapTxConstantDataToNoir(data: TxConstantData): TxConstantDataNoir { return { historical_header: mapHeaderToNoir(data.historicalHeader), @@ -530,13 +517,13 @@ export function mapPrivateToPublicKernelCircuitPublicInputsToNoir( }; } -export function mapKernelCircuitPublicInputsToNoir(inputs: KernelCircuitPublicInputs): KernelCircuitPublicInputsNoir { +export function mapPrivateToRollupKernelCircuitPublicInputsToNoir( + inputs: PrivateToRollupKernelCircuitPublicInputs, +): PrivateToRollupKernelCircuitPublicInputsNoir { return { rollup_validation_requests: mapRollupValidationRequestsToNoir(inputs.rollupValidationRequests), - constants: mapCombinedConstantDataToNoir(inputs.constants), - end: mapCombinedAccumulatedDataToNoir(inputs.end), - start_state: mapPartialStateReferenceToNoir(inputs.startState), - revert_code: mapRevertCodeToNoir(inputs.revertCode), + constants: mapTxConstantDataToNoir(inputs.constants), + end: mapPrivateToRollupAccumulatedDataToNoir(inputs.end), gas_used: mapGasToNoir(inputs.gasUsed), fee_payer: mapAztecAddressToNoir(inputs.feePayer), }; @@ -831,7 +818,7 @@ export function mapRootParityInputsToNoir(inputs: RootParityInputs): RootParityI function mapPrivateTubeDataToNoir(data: PrivateTubeData): PrivateTubeDataNoir { return { - public_inputs: mapKernelCircuitPublicInputsToNoir(data.publicInputs), + public_inputs: mapPrivateToRollupKernelCircuitPublicInputsToNoir(data.publicInputs), proof: mapRecursiveProofToNoir(data.proof), vk_data: mapVkWitnessDataToNoir(data.vkData, ROLLUP_HONK_VERIFICATION_KEY_LENGTH_IN_FIELDS), }; @@ -954,13 +941,13 @@ export function mapRevertCodeToNoir(revertCode: RevertCode): NoirField { return mapFieldToNoir(revertCode.toField()); } -export function mapKernelCircuitPublicInputsFromNoir(inputs: KernelCircuitPublicInputsNoir) { - return new KernelCircuitPublicInputs( +export function mapPrivateToRollupKernelCircuitPublicInputsFromNoir( + inputs: PrivateToRollupKernelCircuitPublicInputsNoir, +) { + return new PrivateToRollupKernelCircuitPublicInputs( mapRollupValidationRequestsFromNoir(inputs.rollup_validation_requests), - mapCombinedAccumulatedDataFromNoir(inputs.end), - mapCombinedConstantDataFromNoir(inputs.constants), - mapPartialStateReferenceFromNoir(inputs.start_state), - mapRevertCodeFromNoir(inputs.revert_code), + mapPrivateToRollupAccumulatedDataFromNoir(inputs.end), + mapTxConstantDataFromNoir(inputs.constants), mapGasFromNoir(inputs.gas_used), mapAztecAddressFromNoir(inputs.fee_payer), ); diff --git a/yarn-project/noir-protocol-circuits-types/src/execution/server.ts b/yarn-project/noir-protocol-circuits-types/src/execution/server.ts index 722172b9a1e7..5d0737652294 100644 --- a/yarn-project/noir-protocol-circuits-types/src/execution/server.ts +++ b/yarn-project/noir-protocol-circuits-types/src/execution/server.ts @@ -1,8 +1,8 @@ import { type BaseParityInputs, - type KernelCircuitPublicInputs, type ParityPublicInputs, type PrivateKernelEmptyInputs, + type PrivateToRollupKernelCircuitPublicInputs, type RootParityInputs, } from '@aztec/circuits.js'; import { @@ -31,10 +31,10 @@ import { mapBlockRootRollupInputsToNoir, mapEmptyBlockRootRollupInputsToNoir, mapEmptyKernelInputsToNoir, - mapKernelCircuitPublicInputsFromNoir, mapMergeRollupInputsToNoir, mapParityPublicInputsFromNoir, mapPrivateBaseRollupInputsToNoir, + mapPrivateToRollupKernelCircuitPublicInputsFromNoir, mapPublicBaseRollupInputsToNoir, mapRootParityInputsToNoir, mapRootRollupInputsToNoir, @@ -187,23 +187,25 @@ export function convertRootRollupInputsToWitnessMap(inputs: RootRollupInputs): W return initialWitnessMap; } -export function convertPrivateKernelEmptyOutputsFromWitnessMap(outputs: WitnessMap): KernelCircuitPublicInputs { +export function convertPrivateKernelEmptyOutputsFromWitnessMap( + outputs: WitnessMap, +): PrivateToRollupKernelCircuitPublicInputs { const decodedInputs: DecodedInputs = abiDecode(ServerCircuitArtifacts.PrivateKernelEmptyArtifact.abi, outputs); const returnType = decodedInputs.return_value as PrivateKernelEmptyReturnType; - return mapKernelCircuitPublicInputsFromNoir(returnType); + return mapPrivateToRollupKernelCircuitPublicInputsFromNoir(returnType); } export function convertSimulatedPrivateKernelEmptyOutputsFromWitnessMap( outputs: WitnessMap, -): KernelCircuitPublicInputs { +): PrivateToRollupKernelCircuitPublicInputs { const decodedInputs: DecodedInputs = abiDecode( SimulatedServerCircuitArtifacts.PrivateKernelEmptyArtifact.abi, outputs, ); const returnType = decodedInputs.return_value as PrivateKernelEmptyReturnType; - return mapKernelCircuitPublicInputsFromNoir(returnType); + return mapPrivateToRollupKernelCircuitPublicInputsFromNoir(returnType); } /** diff --git a/yarn-project/prover-client/src/block_builder/light.test.ts b/yarn-project/prover-client/src/block_builder/light.test.ts index 95180821db11..e92e7d6fa0ef 100644 --- a/yarn-project/prover-client/src/block_builder/light.test.ts +++ b/yarn-project/prover-client/src/block_builder/light.test.ts @@ -280,7 +280,11 @@ describe('LightBlockBuilder', () => { const vkIndex = TUBE_VK_INDEX; const vkPath = getVKSiblingPath(vkIndex); const vkData = new VkWitnessData(TubeVk, vkIndex, vkPath); - const tubeData = new PrivateTubeData(tx.data.toKernelCircuitPublicInputs(), emptyRollupProof, vkData); + const tubeData = new PrivateTubeData( + tx.data.toPrivateToRollupKernelCircuitPublicInputs(), + emptyRollupProof, + vkData, + ); const hints = await buildBaseRollupHints(tx, globalVariables, expectsFork, spongeBlobState); const inputs = new PrivateBaseRollupInputs(tubeData, hints as PrivateBaseRollupHints); const result = await simulator.getPrivateBaseRollupProof(inputs); diff --git a/yarn-project/prover-client/src/orchestrator/tx-proving-state.ts b/yarn-project/prover-client/src/orchestrator/tx-proving-state.ts index 9bdd2eeda4d2..0460b11b3b0f 100644 --- a/yarn-project/prover-client/src/orchestrator/tx-proving-state.ts +++ b/yarn-project/prover-client/src/orchestrator/tx-proving-state.ts @@ -60,7 +60,11 @@ export class TxProvingState { } const vkData = this.getTubeVkData(); - const tubeData = new PrivateTubeData(this.processedTx.data.toKernelCircuitPublicInputs(), this.tube.proof, vkData); + const tubeData = new PrivateTubeData( + this.processedTx.data.toPrivateToRollupKernelCircuitPublicInputs(), + this.tube.proof, + vkData, + ); if (!(this.baseRollupHints instanceof PrivateBaseRollupHints)) { throw new Error('Mismatched base rollup hints, expected private base rollup hints'); diff --git a/yarn-project/prover-client/src/prover-agent/memory-proving-queue.ts b/yarn-project/prover-client/src/prover-agent/memory-proving-queue.ts index f4a3fb8433ad..a27522f7cd11 100644 --- a/yarn-project/prover-client/src/prover-agent/memory-proving-queue.ts +++ b/yarn-project/prover-client/src/prover-agent/memory-proving-queue.ts @@ -12,11 +12,11 @@ import type { AVM_PROOF_LENGTH_IN_FIELDS, AvmCircuitInputs, BaseParityInputs, - KernelCircuitPublicInputs, NESTED_RECURSIVE_PROOF_LENGTH, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, ParityPublicInputs, PrivateKernelEmptyInputData, + PrivateToRollupKernelCircuitPublicInputs, RECURSIVE_PROOF_LENGTH, RootParityInputs, TUBE_PROOF_LENGTH, @@ -276,7 +276,10 @@ export class MemoryProvingQueue implements ServerCircuitProver, ProvingJobSource signal?: AbortSignal, epochNumber?: number, ): Promise< - PublicInputsAndRecursiveProof + PublicInputsAndRecursiveProof< + PrivateToRollupKernelCircuitPublicInputs, + typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH + > > { return this.enqueue(ProvingRequestType.PRIVATE_KERNEL_EMPTY, inputs, signal, epochNumber); } diff --git a/yarn-project/prover-client/src/proving_broker/broker_prover_facade.ts b/yarn-project/prover-client/src/proving_broker/broker_prover_facade.ts index a5a0a4a7b86e..ae28955a2022 100644 --- a/yarn-project/prover-client/src/proving_broker/broker_prover_facade.ts +++ b/yarn-project/prover-client/src/proving_broker/broker_prover_facade.ts @@ -12,11 +12,11 @@ import { type AVM_PROOF_LENGTH_IN_FIELDS, type AvmCircuitInputs, type BaseParityInputs, - type KernelCircuitPublicInputs, type NESTED_RECURSIVE_PROOF_LENGTH, type NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, type ParityPublicInputs, type PrivateKernelEmptyInputData, + type PrivateToRollupKernelCircuitPublicInputs, type RECURSIVE_PROOF_LENGTH, type RootParityInputs, type TUBE_PROOF_LENGTH, @@ -199,7 +199,10 @@ export class BrokerCircuitProverFacade implements ServerCircuitProver { signal?: AbortSignal, epochNumber?: number, ): Promise< - PublicInputsAndRecursiveProof + PublicInputsAndRecursiveProof< + PrivateToRollupKernelCircuitPublicInputs, + typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH + > > { return this.enqueueAndWaitForJob( this.generateId(ProvingRequestType.PRIVATE_KERNEL_EMPTY, inputs, epochNumber), diff --git a/yarn-project/prover-client/src/test/bb_prover_base_rollup.test.ts b/yarn-project/prover-client/src/test/bb_prover_base_rollup.test.ts index dc43748fcddd..cd977e38d3df 100644 --- a/yarn-project/prover-client/src/test/bb_prover_base_rollup.test.ts +++ b/yarn-project/prover-client/src/test/bb_prover_base_rollup.test.ts @@ -47,7 +47,7 @@ describe('prover/bb_prover/base-rollup', () => { protocolContractTreeRoot, ); const tubeProof = await context.prover.getEmptyPrivateKernelProof(privateInputs); - expect(tubeProof.inputs).toEqual(tx.data.toKernelCircuitPublicInputs()); + expect(tubeProof.inputs).toEqual(tx.data.toPrivateToRollupKernelCircuitPublicInputs()); const vkIndex = PRIVATE_KERNEL_EMPTY_INDEX; const vkPath = getVKSiblingPath(vkIndex); diff --git a/yarn-project/prover-client/src/test/mock_prover.ts b/yarn-project/prover-client/src/test/mock_prover.ts index ea791dec2597..de87b6ef58c3 100644 --- a/yarn-project/prover-client/src/test/mock_prover.ts +++ b/yarn-project/prover-client/src/test/mock_prover.ts @@ -15,10 +15,10 @@ import { AVM_VERIFICATION_KEY_LENGTH_IN_FIELDS, type AvmCircuitInputs, type BaseParityInputs, - type KernelCircuitPublicInputs, NESTED_RECURSIVE_PROOF_LENGTH, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, type PrivateKernelEmptyInputData, + type PrivateToRollupKernelCircuitPublicInputs, RECURSIVE_PROOF_LENGTH, type RootParityInputs, TUBE_PROOF_LENGTH, @@ -41,8 +41,8 @@ import { import { makeBaseOrMergeRollupPublicInputs, makeBlockRootOrBlockMergeRollupPublicInputs, - makeKernelCircuitPublicInputs, makeParityPublicInputs, + makePrivateToRollupKernelCircuitPublicInputs, makeRootRollupPublicInputs, } from '@aztec/circuits.js/testing'; import { times } from '@aztec/foundation/collection'; @@ -224,11 +224,14 @@ export class MockProver implements ServerCircuitProver { _signal?: AbortSignal, _epochNumber?: number, ): Promise< - PublicInputsAndRecursiveProof + PublicInputsAndRecursiveProof< + PrivateToRollupKernelCircuitPublicInputs, + typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH + > > { return Promise.resolve( makePublicInputsAndRecursiveProof( - makeKernelCircuitPublicInputs(), + makePrivateToRollupKernelCircuitPublicInputs(), makeRecursiveProof(NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH), VerificationKeyData.makeFakeHonk(), ), From 6f071329715aca47bea402c341d9028e8ca6ae78 Mon Sep 17 00:00:00 2001 From: Alex Gherghisan Date: Wed, 8 Jan 2025 11:12:18 +0000 Subject: [PATCH 09/14] fix: prover node retries gathering needed txs (#11089) This PR introduces retries when the prover node gathers the necessary txs for an epoch proof. This is necessary because on a fresh boot, the prover might not be connected to any peers so it will fail to acquire the necessary data. Fix for #11063 TODO: - [x] expose new config as env vars --- .../aztec-network/templates/prover-node.yaml | 6 ++ spartan/aztec-network/values.yaml | 4 + .../src/e2e_prover/e2e_prover_test.ts | 3 + yarn-project/end-to-end/src/fixtures/utils.ts | 3 + yarn-project/foundation/src/config/env_var.ts | 3 + yarn-project/foundation/src/retry/index.ts | 3 +- yarn-project/prover-node/src/config.ts | 18 +++++ yarn-project/prover-node/src/factory.ts | 3 + .../prover-node/src/prover-node.test.ts | 59 ++++++++++---- yarn-project/prover-node/src/prover-node.ts | 79 ++++++++++++++++--- 10 files changed, 155 insertions(+), 26 deletions(-) diff --git a/spartan/aztec-network/templates/prover-node.yaml b/spartan/aztec-network/templates/prover-node.yaml index f28ea686b17d..0ee0241a1d3f 100644 --- a/spartan/aztec-network/templates/prover-node.yaml +++ b/spartan/aztec-network/templates/prover-node.yaml @@ -145,6 +145,12 @@ spec: value: "{{ .Values.proverNode.proverBroker.dataDirectory }}" - name: PROVER_PUBLISHER_PRIVATE_KEY value: "{{ .Values.proverNode.proverPublisherPrivateKey }}" + - name: PROVER_NODE_TX_GATHERING_TIMEOUT_MS + value: "{{ .Values.proverNode.txGathering.timeoutMs }}" + - name: PROVER_NODE_TX_GATHERING_INTERVAL_MS + value: "{{ .Values.proverNode.txGathering.intervalMs }}" + - name: PROVER_NODE_TX_GATHERING_MAX_PARALLEL_REQUESTS + value: "{{ .Values.proverNode.txGathering.maxParallelRequests }}" - name: OTEL_RESOURCE_ATTRIBUTES value: service.name={{ .Release.Name }},service.namespace={{ .Release.Namespace }},service.version={{ .Chart.AppVersion }},environment={{ .Values.environment | default "production" }} - name: L1_CHAIN_ID diff --git a/spartan/aztec-network/values.yaml b/spartan/aztec-network/values.yaml index efdac924caac..ea363b9c88d4 100644 --- a/spartan/aztec-network/values.yaml +++ b/spartan/aztec-network/values.yaml @@ -151,6 +151,10 @@ proverNode: archiverViemPollingInterval: 1000 pollInterval: 1000 viemPollingInterval: 1000 + txGathering: + timeoutMs: 60000 + intervalMs: 1000 + maxParallelRequests: 100 pxe: logLevel: "debug; info: aztec:simulator, json-rpc" diff --git a/yarn-project/end-to-end/src/e2e_prover/e2e_prover_test.ts b/yarn-project/end-to-end/src/e2e_prover/e2e_prover_test.ts index aac3af2db0ad..dd212a723799 100644 --- a/yarn-project/end-to-end/src/e2e_prover/e2e_prover_test.ts +++ b/yarn-project/end-to-end/src/e2e_prover/e2e_prover_test.ts @@ -275,6 +275,9 @@ export class FullProverTest { quoteProviderBondAmount: 1000n, proverMinimumEscrowAmount: 3000n, proverTargetEscrowAmount: 6000n, + txGatheringTimeoutMs: 60000, + txGatheringIntervalMs: 1000, + txGatheringMaxParallelRequests: 100, }; this.proverNode = await createProverNode(proverConfig, { aztecNodeTxProvider: this.aztecNode, diff --git a/yarn-project/end-to-end/src/fixtures/utils.ts b/yarn-project/end-to-end/src/fixtures/utils.ts index a0713351efee..85ae078728fe 100644 --- a/yarn-project/end-to-end/src/fixtures/utils.ts +++ b/yarn-project/end-to-end/src/fixtures/utils.ts @@ -745,6 +745,9 @@ export async function createAndSyncProverNode( quoteProviderBondAmount: 1000n, proverMinimumEscrowAmount: 1000n, proverTargetEscrowAmount: 2000n, + txGatheringTimeoutMs: 60000, + txGatheringIntervalMs: 1000, + txGatheringMaxParallelRequests: 100, }; // Use testing l1 publisher diff --git a/yarn-project/foundation/src/config/env_var.ts b/yarn-project/foundation/src/config/env_var.ts index d45d8d36f63d..8689a5512d57 100644 --- a/yarn-project/foundation/src/config/env_var.ts +++ b/yarn-project/foundation/src/config/env_var.ts @@ -122,6 +122,9 @@ export type EnvVar = | 'PROVER_NODE_POLLING_INTERVAL_MS' | 'PROVER_NODE_MAX_PENDING_JOBS' | 'PROVER_NODE_MAX_PARALLEL_BLOCKS_PER_EPOCH' + | 'PROVER_NODE_TX_GATHERING_TIMEOUT_MS' + | 'PROVER_NODE_TX_GATHERING_INTERVAL_MS' + | 'PROVER_NODE_TX_GATHERING_MAX_PARALLEL_REQUESTS' | 'PROVER_PUBLISH_RETRY_INTERVAL_MS' | 'PROVER_PUBLISHER_PRIVATE_KEY' | 'PROVER_REAL_PROOFS' diff --git a/yarn-project/foundation/src/retry/index.ts b/yarn-project/foundation/src/retry/index.ts index ce05747f7da3..1fc503743cb4 100644 --- a/yarn-project/foundation/src/retry/index.ts +++ b/yarn-project/foundation/src/retry/index.ts @@ -1,3 +1,4 @@ +import { TimeoutError } from '../error/index.js'; import { createLogger } from '../log/index.js'; import { sleep } from '../sleep/index.js'; import { Timer } from '../timer/index.js'; @@ -93,7 +94,7 @@ export async function retryUntil(fn: () => Promise, name = '', await sleep(interval * 1000); if (timeout && timer.s() > timeout) { - throw new Error(name ? `Timeout awaiting ${name}` : 'Timeout'); + throw new TimeoutError(name ? `Timeout awaiting ${name}` : 'Timeout'); } } } diff --git a/yarn-project/prover-node/src/config.ts b/yarn-project/prover-node/src/config.ts index 7bdde17af5c9..ffd598c8a39d 100644 --- a/yarn-project/prover-node/src/config.ts +++ b/yarn-project/prover-node/src/config.ts @@ -53,6 +53,9 @@ type SpecificProverNodeConfig = { proverNodeMaxPendingJobs: number; proverNodePollingIntervalMs: number; proverNodeMaxParallelBlocksPerEpoch: number; + txGatheringTimeoutMs: number; + txGatheringIntervalMs: number; + txGatheringMaxParallelRequests: number; }; export type QuoteProviderConfig = { @@ -77,6 +80,21 @@ const specificProverNodeConfigMappings: ConfigMappingsType = { diff --git a/yarn-project/prover-node/src/factory.ts b/yarn-project/prover-node/src/factory.ts index f7f777626fb5..84bf1b39ad43 100644 --- a/yarn-project/prover-node/src/factory.ts +++ b/yarn-project/prover-node/src/factory.ts @@ -71,6 +71,9 @@ export async function createProverNode( maxPendingJobs: config.proverNodeMaxPendingJobs, pollingIntervalMs: config.proverNodePollingIntervalMs, maxParallelBlocksPerEpoch: config.proverNodeMaxParallelBlocksPerEpoch, + txGatheringMaxParallelRequests: config.txGatheringMaxParallelRequests, + txGatheringIntervalMs: config.txGatheringIntervalMs, + txGatheringTimeoutMs: config.txGatheringTimeoutMs, }; const claimsMonitor = new ClaimsMonitor(publisher, telemetry, proverNodeConfig); diff --git a/yarn-project/prover-node/src/prover-node.test.ts b/yarn-project/prover-node/src/prover-node.test.ts index 56581e5e23d4..0e5068ecdedf 100644 --- a/yarn-project/prover-node/src/prover-node.test.ts +++ b/yarn-project/prover-node/src/prover-node.test.ts @@ -1,22 +1,20 @@ import { - type Body, type EpochProofClaim, EpochProofQuote, EpochProofQuotePayload, type EpochProverManager, type L1ToL2MessageSource, - type L2Block, + L2Block, type L2BlockSource, type MerkleTreeWriteOperations, P2PClientType, type ProverCoordination, type Tx, - type TxEffect, - TxHash, + type TxHash, WorldStateRunningState, type WorldStateSynchronizer, } from '@aztec/circuit-types'; -import { type ContractDataSource, EthAddress, Fr } from '@aztec/circuits.js'; +import { type ContractDataSource, EthAddress } from '@aztec/circuits.js'; import { type EpochCache } from '@aztec/epoch-cache'; import { times } from '@aztec/foundation/collection'; import { Signature } from '@aztec/foundation/eth-signature'; @@ -66,7 +64,7 @@ describe('prover-node', () => { let claim: MockProxy; // Blocks returned by the archiver - let blocks: MockProxy[]; + let blocks: L2Block[]; // Address of the publisher let address: EthAddress; @@ -120,7 +118,14 @@ describe('prover-node', () => { bondManager = mock(); telemetryClient = new NoopTelemetryClient(); - config = { maxPendingJobs: 3, pollingIntervalMs: 10, maxParallelBlocksPerEpoch: 32 }; + config = { + maxPendingJobs: 3, + pollingIntervalMs: 10, + maxParallelBlocksPerEpoch: 32, + txGatheringMaxParallelRequests: 10, + txGatheringIntervalMs: 100, + txGatheringTimeoutMs: 1000, + }; // World state returns a new mock db every time it is asked to fork worldState.fork.mockImplementation(() => Promise.resolve(mock())); @@ -141,13 +146,7 @@ describe('prover-node', () => { quoteSigner.sign.mockImplementation(payload => Promise.resolve(new EpochProofQuote(payload, Signature.empty()))); // We create 3 fake blocks with 1 tx effect each - blocks = times(3, i => - mock({ - number: i + 20, - hash: () => new Fr(i), - body: mock({ txEffects: [mock({ txHash: TxHash.random() } as TxEffect)] }), - }), - ); + blocks = times(3, i => L2Block.random(i + 20, 1)); // Archiver returns a bunch of fake blocks l2BlockSource.getBlocksForEpoch.mockResolvedValue(blocks); @@ -296,6 +295,38 @@ describe('prover-node', () => { expect(jobs.length).toEqual(1); }); + it('retries acquiring txs if they are not immediately available', async () => { + l2BlockSource.getL2EpochNumber.mockResolvedValue(11n); + publisher.getProofClaim.mockResolvedValue(claim); + const mockGetTxByHash = mockCoordination.getTxByHash.getMockImplementation(); + mockCoordination.getTxByHash.mockResolvedValue(undefined); + + await proverNode.start(); + await sleep(100); + + // initially no job will be started because the txs aren't available + expect(jobs).toHaveLength(0); + expect(mockCoordination.getTxByHash).toHaveBeenCalled(); + + mockCoordination.getTxByHash.mockImplementation(mockGetTxByHash); + await sleep(100); + + // now it should have all the txs necessary to start proving + expect(jobs[0].epochNumber).toEqual(10n); + expect(jobs.length).toEqual(1); + }); + + it('does not start proving if txs are not all available', async () => { + l2BlockSource.getL2EpochNumber.mockResolvedValue(11n); + publisher.getProofClaim.mockResolvedValue(claim); + + mockCoordination.getTxByHash.mockResolvedValue(undefined); + + await proverNode.start(); + await sleep(2000); + expect(jobs).toHaveLength(0); + }); + it('does not start proving if there is a claim for proven epoch during initial sync', async () => { l2BlockSource.getProvenL2EpochNumber.mockResolvedValue(10); publisher.getProofClaim.mockResolvedValue(claim); diff --git a/yarn-project/prover-node/src/prover-node.ts b/yarn-project/prover-node/src/prover-node.ts index 10a65b3594f0..4f341ae58d78 100644 --- a/yarn-project/prover-node/src/prover-node.ts +++ b/yarn-project/prover-node/src/prover-node.ts @@ -11,12 +11,16 @@ import { type ProverNodeApi, type Service, type Tx, + type TxHash, type WorldStateSynchronizer, tryStop, } from '@aztec/circuit-types'; import { type ContractDataSource } from '@aztec/circuits.js'; +import { asyncPool } from '@aztec/foundation/async-pool'; import { compact } from '@aztec/foundation/collection'; +import { TimeoutError } from '@aztec/foundation/error'; import { createLogger } from '@aztec/foundation/log'; +import { retryUntil } from '@aztec/foundation/retry'; import { DateProvider } from '@aztec/foundation/timer'; import { type Maybe } from '@aztec/foundation/types'; import { type P2P } from '@aztec/p2p'; @@ -36,6 +40,9 @@ export type ProverNodeOptions = { pollingIntervalMs: number; maxPendingJobs: number; maxParallelBlocksPerEpoch: number; + txGatheringTimeoutMs: number; + txGatheringIntervalMs: number; + txGatheringMaxParallelRequests: number; }; /** @@ -76,6 +83,9 @@ export class ProverNode implements ClaimsMonitorHandler, EpochMonitorHandler, Pr pollingIntervalMs: 1_000, maxPendingJobs: 100, maxParallelBlocksPerEpoch: 32, + txGatheringTimeoutMs: 60_000, + txGatheringIntervalMs: 1_000, + txGatheringMaxParallelRequests: 100, ...compact(options), }; @@ -302,21 +312,68 @@ export class ProverNode implements ClaimsMonitorHandler, EpochMonitorHandler, Pr } private async gatherTxs(epochNumber: bigint, blocks: L2Block[]) { - const txs = await Promise.all( - blocks.flatMap(block => - block.body.txEffects - .map(tx => tx.txHash) - .map(txHash => this.coordination.getTxByHash(txHash).then(tx => [block.number, txHash, tx] as const)), - ), + let txsToFind: TxHash[] = []; + const txHashToBlock = new Map(); + const results = new Map(); + + for (const block of blocks) { + for (const tx of block.body.txEffects) { + txsToFind.push(tx.txHash); + txHashToBlock.set(tx.txHash.toString(), block.number); + } + } + + const totalTxsRequired = txsToFind.length; + this.log.info( + `Gathering a total of ${totalTxsRequired} txs for epoch=${epochNumber} made up of ${blocks.length} blocks`, + { epochNumber }, ); - const notFound = txs.filter(([_blockNum, _txHash, tx]) => !tx); - if (notFound.length) { - const notFoundList = notFound.map(([blockNum, txHash]) => `${txHash.toString()} (block ${blockNum})`).join(', '); - throw new Error(`Txs not found for epoch ${epochNumber}: ${notFoundList}`); + let iteration = 0; + try { + await retryUntil( + async () => { + const batch = [...txsToFind]; + txsToFind = []; + const batchResults = await asyncPool(this.options.txGatheringMaxParallelRequests, batch, async txHash => { + const tx = await this.coordination.getTxByHash(txHash); + return [txHash, tx] as const; + }); + let found = 0; + for (const [txHash, maybeTx] of batchResults) { + if (maybeTx) { + found++; + results.set(txHash.toString(), maybeTx); + } else { + txsToFind.push(txHash); + } + } + + this.log.verbose( + `Gathered ${found}/${batch.length} txs in iteration ${iteration} for epoch ${epochNumber}. In total ${results.size}/${totalTxsRequired} have been retrieved.`, + { epochNumber }, + ); + iteration++; + + // stop when we found all transactions + return txsToFind.length === 0; + }, + 'Gather txs', + this.options.txGatheringTimeoutMs / 1_000, + this.options.txGatheringIntervalMs / 1_000, + ); + } catch (err) { + if (err && err instanceof TimeoutError) { + const notFoundList = txsToFind + .map(txHash => `${txHash.toString()} (block ${txHashToBlock.get(txHash.toString())})`) + .join(', '); + throw new Error(`Txs not found for epoch ${epochNumber}: ${notFoundList}`); + } else { + throw err; + } } - return txs.map(([_blockNumber, _txHash, tx]) => tx!); + return Array.from(results.values()); } /** Extracted for testing purposes. */ From 17d6802428d6ad63877dd5d56afedfa9f0d5a3be Mon Sep 17 00:00:00 2001 From: Miranda Wood Date: Wed, 8 Jan 2025 11:50:16 +0000 Subject: [PATCH 10/14] chore: remove abi refs from publisher (#10766) Removes unecessary import of abis to `l1-publisher`, now that we add errors to the `RollupAbi` (thanks to #10697). This means we can remove my ugly code to try and catch blob and leonidas errors from a header check. --- Note: I found that the use of `getContractError` is still needed in `tryGetErrorFromRevertedTx`. Viem doesn't play nice when simulating blob txs and either doesn't allow blob sidecars (hence the `checkBlobSlot` override) or doesn't throw an error to catch. I found a middle ground where `prepareTransactionRequest` would throw with the error we wanted in the case of a blob issue (e.g. incorrect blob proof), but this error still only has the selector thrown and not the custom name e.g. `Execution reverted with reason: custom error 0x5ca17bef: 0113d536ef349476f9a5112623449dd1cf574b8213bc6fe33c1edd63bf832890.` To get the name, I used viem's `getContractError` which works fine: `The contract function "propose" reverted. Error: Rollup__InvalidBlobProof(bytes32 blobHash) (0x0113d536ef349476f9a5112623449dd1cf574b8213bc6fe33c1edd63bf832890)` --- Another note: I also snuck in adding the issue number for #10754 in some comments (sorry) --- noir-projects/Earthfile | 3 ++ .../noir-protocol-circuits/bootstrap.sh | 2 +- .../src/publisher/l1-publisher.ts | 43 +++---------------- 3 files changed, 9 insertions(+), 39 deletions(-) diff --git a/noir-projects/Earthfile b/noir-projects/Earthfile index d0d9242c57b4..97366ab3c864 100644 --- a/noir-projects/Earthfile +++ b/noir-projects/Earthfile @@ -7,6 +7,7 @@ test: test-protocol-circuits: FROM ../+bootstrap ENV PATH="/usr/src/noir/noir-repo/target/release:${PATH}" + # TODO(#10754): Remove --skip-brillig-constraints-check RUN cd /usr/src/noir-projects/noir-protocol-circuits && nargo test --silence-warnings --skip-brillig-constraints-check test-aztec-nr: @@ -52,6 +53,8 @@ gates-report: # Install bb ENV BB_BIN /usr/src/barretenberg/cpp/build/bin/bb + + # TODO(#10754): Remove --skip-brillig-constraints-check RUN cd noir-protocol-circuits && yarn && node ./scripts/generate_variants.js tiny && nargo compile --silence-warnings --skip-brillig-constraints-check COPY ./gates_report.sh ./gates_report.sh diff --git a/noir-projects/noir-protocol-circuits/bootstrap.sh b/noir-projects/noir-protocol-circuits/bootstrap.sh index 4298aea8f2ef..2eed18cfa3b2 100755 --- a/noir-projects/noir-protocol-circuits/bootstrap.sh +++ b/noir-projects/noir-protocol-circuits/bootstrap.sh @@ -66,7 +66,7 @@ function compile { if ! cache_download circuit-$hash.tar.gz 1>&2; then SECONDS=0 rm -f $json_path - # TODO: --skip-brillig-constraints-check added temporarily for blobs build time. + # TODO(#10754): Remove --skip-brillig-constraints-check local compile_cmd="$NARGO compile --package $name --skip-brillig-constraints-check" echo_stderr "$compile_cmd" dump_fail "$compile_cmd" diff --git a/yarn-project/sequencer-client/src/publisher/l1-publisher.ts b/yarn-project/sequencer-client/src/publisher/l1-publisher.ts index 727e57f51e70..e1c8d631f4ed 100644 --- a/yarn-project/sequencer-client/src/publisher/l1-publisher.ts +++ b/yarn-project/sequencer-client/src/publisher/l1-publisher.ts @@ -27,7 +27,7 @@ import { type Logger, createLogger } from '@aztec/foundation/log'; import { type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; import { InterruptibleSleep } from '@aztec/foundation/sleep'; import { Timer } from '@aztec/foundation/timer'; -import { EmpireBaseAbi, ExtRollupLibAbi, LeonidasLibAbi, RollupAbi, SlasherAbi } from '@aztec/l1-artifacts'; +import { EmpireBaseAbi, RollupAbi, SlasherAbi } from '@aztec/l1-artifacts'; import { type TelemetryClient } from '@aztec/telemetry-client'; import pick from 'lodash.pick'; @@ -35,7 +35,7 @@ import { type BaseError, type Chain, type Client, - ContractFunctionExecutionError, + type ContractFunctionExecutionError, ContractFunctionRevertedError, type GetContractReturnType, type Hex, @@ -421,38 +421,6 @@ export class L1Publisher { if (error instanceof ContractFunctionRevertedError) { const err = error as ContractFunctionRevertedError; this.log.debug(`Validation failed: ${err.message}`, err.data); - } else if (error instanceof ContractFunctionExecutionError) { - let err = error as ContractFunctionRevertedError; - if (!tryGetCustomErrorName(err)) { - // If we get here, it's because the custom error no longer exists in Rollup.sol, - // but in another lib. The below reconstructs the error message. - try { - await this.publicClient.estimateGas({ - data: encodeFunctionData({ - abi: this.rollupContract.abi, - functionName: 'validateHeader', - args, - }), - account: this.account, - to: this.rollupContract.address, - }); - } catch (estGasErr: unknown) { - const possibleAbis = [ExtRollupLibAbi, LeonidasLibAbi]; - possibleAbis.forEach(abi => { - const possibleErr = getContractError(estGasErr as BaseError, { - args: [], - abi: abi, - functionName: 'validateHeader', - address: this.rollupContract.address, - sender: this.account.address, - }); - err = tryGetCustomErrorName(possibleErr) ? possibleErr : err; - }); - } - throw err; - } - } else { - this.log.debug(`Unexpected error during validation: ${error}`); } throw error; } @@ -771,8 +739,7 @@ export class L1Publisher { }, ], }); - // If the above passes, we have a blob error. We cannot simulate blob txs, and failed txs no longer throw errors, - // and viem provides no way to get the revert reason from a given tx. + // If the above passes, we have a blob error. We cannot simulate blob txs, and failed txs no longer throw errors. // Strangely, the only way to throw the revert reason as an error and provide blobs is prepareTransactionRequest. // See: https://github.com/wevm/viem/issues/2075 // This throws a EstimateGasExecutionError with the custom error information: @@ -784,13 +751,13 @@ export class L1Publisher { }); return undefined; } catch (simulationErr: any) { - // If we don't have a ContractFunctionExecutionError, we have a blob related error => use ExtRollupLibAbi to get the error msg. + // If we don't have a ContractFunctionExecutionError, we have a blob related error => use getContractError to get the error msg. const contractErr = simulationErr.name === 'ContractFunctionExecutionError' ? simulationErr : getContractError(simulationErr as BaseError, { args: [], - abi: ExtRollupLibAbi, + abi: RollupAbi, functionName: args.functionName, address: args.address, sender: this.account.address, From a2c4e985679bc36ca075f2dbe0cdaf7ea9e6093d Mon Sep 17 00:00:00 2001 From: Alex Gherghisan Date: Wed, 8 Jan 2025 13:34:34 +0000 Subject: [PATCH 11/14] refactor: pass fn signatures (#10849) Implements the suggestion here https://github.com/AztecProtocol/aztec-packages/pull/10753#discussion_r1887686630 --- yarn-project/archiver/src/archiver/archiver.ts | 8 ++++---- .../archiver/src/archiver/archiver_store.ts | 2 +- .../archiver/kv_archiver_store/kv_archiver_store.ts | 13 +++++++++---- .../memory_archiver_store/memory_archiver_store.ts | 13 +++++++++---- yarn-project/archiver/src/factory.ts | 13 +++++-------- yarn-project/aztec-node/src/aztec-node/server.ts | 4 ++-- .../circuit-types/src/interfaces/archiver.test.ts | 10 ++++------ .../circuit-types/src/interfaces/archiver.ts | 5 +---- .../circuit-types/src/interfaces/aztec-node.test.ts | 10 ++++------ .../circuit-types/src/interfaces/aztec-node.ts | 7 ++----- .../src/contract/interfaces/contract_data_source.ts | 2 +- yarn-project/pxe/src/pxe_service/pxe_service.ts | 13 +++++-------- yarn-project/simulator/src/public/fixtures/index.ts | 2 +- yarn-project/txe/src/node/txe_node.ts | 2 +- .../txe/src/util/txe_public_contract_data_source.ts | 2 +- 15 files changed, 50 insertions(+), 56 deletions(-) diff --git a/yarn-project/archiver/src/archiver/archiver.ts b/yarn-project/archiver/src/archiver/archiver.ts index 049e87733226..7bbab882dbfc 100644 --- a/yarn-project/archiver/src/archiver/archiver.ts +++ b/yarn-project/archiver/src/archiver/archiver.ts @@ -775,8 +775,8 @@ export class Archiver implements ArchiveSource, Traceable { return; } - registerContractFunctionNames(address: AztecAddress, names: Record): Promise { - return this.store.registerContractFunctionName(address, names); + registerContractFunctionSignatures(address: AztecAddress, signatures: string[]): Promise { + return this.store.registerContractFunctionSignatures(address, signatures); } getContractFunctionName(address: AztecAddress, selector: FunctionSelector): Promise { @@ -1083,8 +1083,8 @@ class ArchiverStoreHelper getContractClassIds(): Promise { return this.store.getContractClassIds(); } - registerContractFunctionName(address: AztecAddress, names: Record): Promise { - return this.store.registerContractFunctionName(address, names); + registerContractFunctionSignatures(address: AztecAddress, signatures: string[]): Promise { + return this.store.registerContractFunctionSignatures(address, signatures); } getContractFunctionName(address: AztecAddress, selector: FunctionSelector): Promise { return this.store.getContractFunctionName(address, selector); diff --git a/yarn-project/archiver/src/archiver/archiver_store.ts b/yarn-project/archiver/src/archiver/archiver_store.ts index d2056cba0856..a68798c2d341 100644 --- a/yarn-project/archiver/src/archiver/archiver_store.ts +++ b/yarn-project/archiver/src/archiver/archiver_store.ts @@ -264,7 +264,7 @@ export interface ArchiverDataStore { // TODO: These function names are in memory only as they are for development/debugging. They require the full contract // artifact supplied to the node out of band. This should be reviewed and potentially removed as part of // the node api cleanup process. - registerContractFunctionName(address: AztecAddress, names: Record): Promise; + registerContractFunctionSignatures(address: AztecAddress, signatures: string[]): Promise; getContractFunctionName(address: AztecAddress, selector: FunctionSelector): Promise; /** diff --git a/yarn-project/archiver/src/archiver/kv_archiver_store/kv_archiver_store.ts b/yarn-project/archiver/src/archiver/kv_archiver_store/kv_archiver_store.ts index ac12a3ba1852..85b670c5483e 100644 --- a/yarn-project/archiver/src/archiver/kv_archiver_store/kv_archiver_store.ts +++ b/yarn-project/archiver/src/archiver/kv_archiver_store/kv_archiver_store.ts @@ -17,7 +17,7 @@ import { type PrivateLog, type UnconstrainedFunctionWithMembershipProof, } from '@aztec/circuits.js'; -import { type FunctionSelector } from '@aztec/foundation/abi'; +import { FunctionSelector } from '@aztec/foundation/abi'; import { type AztecAddress } from '@aztec/foundation/aztec-address'; import { createLogger } from '@aztec/foundation/log'; import { type AztecKVStore } from '@aztec/kv-store'; @@ -62,9 +62,14 @@ export class KVArchiverDataStore implements ArchiverDataStore { return Promise.resolve(this.functionNames.get(selector.toString())); } - registerContractFunctionName(_address: AztecAddress, names: Record): Promise { - for (const [selector, name] of Object.entries(names)) { - this.functionNames.set(selector, name); + registerContractFunctionSignatures(_address: AztecAddress, signatures: string[]): Promise { + for (const sig of signatures) { + try { + const selector = FunctionSelector.fromSignature(sig); + this.functionNames.set(selector.toString(), sig.slice(0, sig.indexOf('('))); + } catch { + this.#log.warn(`Failed to parse signature: ${sig}. Ignoring`); + } } return Promise.resolve(); diff --git a/yarn-project/archiver/src/archiver/memory_archiver_store/memory_archiver_store.ts b/yarn-project/archiver/src/archiver/memory_archiver_store/memory_archiver_store.ts index fab9073e4584..5706083aab5f 100644 --- a/yarn-project/archiver/src/archiver/memory_archiver_store/memory_archiver_store.ts +++ b/yarn-project/archiver/src/archiver/memory_archiver_store/memory_archiver_store.ts @@ -28,7 +28,7 @@ import { type PrivateLog, type UnconstrainedFunctionWithMembershipProof, } from '@aztec/circuits.js'; -import { type FunctionSelector } from '@aztec/foundation/abi'; +import { FunctionSelector } from '@aztec/foundation/abi'; import { type AztecAddress } from '@aztec/foundation/aztec-address'; import { createLogger } from '@aztec/foundation/log'; @@ -734,9 +734,14 @@ export class MemoryArchiverStore implements ArchiverDataStore { return Promise.resolve(this.functionNames.get(selector.toString())); } - public registerContractFunctionName(_address: AztecAddress, names: Record): Promise { - for (const [selector, name] of Object.entries(names)) { - this.functionNames.set(selector, name); + public registerContractFunctionSignatures(_address: AztecAddress, signatures: string[]): Promise { + for (const sig of signatures) { + try { + const selector = FunctionSelector.fromSignature(sig); + this.functionNames.set(selector.toString(), sig.slice(0, sig.indexOf('('))); + } catch { + this.#log.warn(`Failed to parse signature: ${sig}. Ignoring`); + } } return Promise.resolve(); diff --git a/yarn-project/archiver/src/factory.ts b/yarn-project/archiver/src/factory.ts index 018cbec57f98..fee2c5325ada 100644 --- a/yarn-project/archiver/src/factory.ts +++ b/yarn-project/archiver/src/factory.ts @@ -4,7 +4,7 @@ import { computePublicBytecodeCommitment, getContractClassFromArtifact, } from '@aztec/circuits.js'; -import { FunctionSelector, FunctionType } from '@aztec/foundation/abi'; +import { FunctionType, decodeFunctionSignature } from '@aztec/foundation/abi'; import { createLogger } from '@aztec/foundation/log'; import { type Maybe } from '@aztec/foundation/types'; import { type DataStoreConfig } from '@aztec/kv-store/config'; @@ -47,14 +47,11 @@ async function registerProtocolContracts(store: KVArchiverDataStore) { unconstrainedFunctions: [], }; - const functionNames: Record = {}; - for (const fn of contract.artifact.functions) { - if (fn.functionType === FunctionType.PUBLIC) { - functionNames[FunctionSelector.fromNameAndParameters(fn.name, fn.parameters).toString()] = fn.name; - } - } + const publicFunctionSignatures = contract.artifact.functions + .filter(fn => fn.functionType === FunctionType.PUBLIC) + .map(fn => decodeFunctionSignature(fn.name, fn.parameters)); - await store.registerContractFunctionName(contract.address, functionNames); + await store.registerContractFunctionSignatures(contract.address, publicFunctionSignatures); const bytecodeCommitment = computePublicBytecodeCommitment(contractClassPublic.packedBytecode); await store.addContractClasses([contractClassPublic], [bytecodeCommitment], blockNumber); await store.addContractInstances([contract.instance], blockNumber); diff --git a/yarn-project/aztec-node/src/aztec-node/server.ts b/yarn-project/aztec-node/src/aztec-node/server.ts index 4b882875a945..9d73ab601ef5 100644 --- a/yarn-project/aztec-node/src/aztec-node/server.ts +++ b/yarn-project/aztec-node/src/aztec-node/server.ts @@ -923,8 +923,8 @@ export class AztecNodeService implements AztecNode, Traceable { return this.contractDataSource.addContractClass(contractClass); } - public registerContractFunctionNames(_address: AztecAddress, names: Record): Promise { - return this.contractDataSource.registerContractFunctionNames(_address, names); + public registerContractFunctionSignatures(_address: AztecAddress, signatures: string[]): Promise { + return this.contractDataSource.registerContractFunctionSignatures(_address, signatures); } public flushTxs(): Promise { diff --git a/yarn-project/circuit-types/src/interfaces/archiver.test.ts b/yarn-project/circuit-types/src/interfaces/archiver.test.ts index 05ad80021174..f526d9944fe0 100644 --- a/yarn-project/circuit-types/src/interfaces/archiver.test.ts +++ b/yarn-project/circuit-types/src/interfaces/archiver.test.ts @@ -222,10 +222,8 @@ describe('ArchiverApiSchema', () => { expect(result).toBe(1n); }); - it('registerContractFunctionNames', async () => { - await context.client.registerContractFunctionNames(AztecAddress.random(), { - [FunctionSelector.random().toString()]: 'test_fn', - }); + it('registerContractFunctionSignatures', async () => { + await context.client.registerContractFunctionSignatures(AztecAddress.random(), ['test()']); }); it('getContract', async () => { @@ -374,9 +372,9 @@ class MockArchiver implements ArchiverApi { expect(address).toBeInstanceOf(AztecAddress); return Promise.resolve(this.artifact); } - registerContractFunctionNames(address: AztecAddress, names: Record): Promise { + registerContractFunctionSignatures(address: AztecAddress, signatures: string[]): Promise { expect(address).toBeInstanceOf(AztecAddress); - expect(names).toEqual(expect.any(Object)); + expect(Array.isArray(signatures)).toBe(true); return Promise.resolve(); } getL1ToL2Messages(blockNumber: bigint): Promise { diff --git a/yarn-project/circuit-types/src/interfaces/archiver.ts b/yarn-project/circuit-types/src/interfaces/archiver.ts index 302df9b5732e..fe67917ee686 100644 --- a/yarn-project/circuit-types/src/interfaces/archiver.ts +++ b/yarn-project/circuit-types/src/interfaces/archiver.ts @@ -68,10 +68,7 @@ export const ArchiverApiSchema: ApiSchemaFor = { getBytecodeCommitment: z.function().args(schemas.Fr).returns(schemas.Fr), getContract: z.function().args(schemas.AztecAddress).returns(ContractInstanceWithAddressSchema.optional()), getContractClassIds: z.function().args().returns(z.array(schemas.Fr)), - registerContractFunctionNames: z - .function() - .args(schemas.AztecAddress, z.record(z.string(), z.string())) - .returns(z.void()), + registerContractFunctionSignatures: z.function().args(schemas.AztecAddress, z.array(z.string())).returns(z.void()), getL1ToL2Messages: z.function().args(schemas.BigInt).returns(z.array(schemas.Fr)), getL1ToL2MessageIndex: z.function().args(schemas.Fr).returns(schemas.BigInt.optional()), // TODO(#10007): Remove this method diff --git a/yarn-project/circuit-types/src/interfaces/aztec-node.test.ts b/yarn-project/circuit-types/src/interfaces/aztec-node.test.ts index a771e4a6dcc2..55726855a041 100644 --- a/yarn-project/circuit-types/src/interfaces/aztec-node.test.ts +++ b/yarn-project/circuit-types/src/interfaces/aztec-node.test.ts @@ -19,7 +19,7 @@ import { getContractClassFromArtifact, } from '@aztec/circuits.js'; import { type L1ContractAddresses, L1ContractsNames } from '@aztec/ethereum'; -import { type ContractArtifact, FunctionSelector } from '@aztec/foundation/abi'; +import { type ContractArtifact } from '@aztec/foundation/abi'; import { memoize } from '@aztec/foundation/decorators'; import { type JsonRpcTestContext, createJsonRpcTestSetup } from '@aztec/foundation/json-rpc/test'; import { fileURLToPath } from '@aztec/foundation/url'; @@ -224,10 +224,8 @@ describe('AztecNodeApiSchema', () => { expect(response).toEqual(Object.fromEntries(ProtocolContractsNames.map(name => [name, expect.any(AztecAddress)]))); }); - it('registerContractFunctionNames', async () => { - await context.client.registerContractFunctionNames(AztecAddress.random(), { - [FunctionSelector.random().toString()]: 'test_fn', - }); + it('registerContractFunctionSignatures', async () => { + await context.client.registerContractFunctionSignatures(AztecAddress.random(), ['test()']); }); it('getPrivateLogs', async () => { @@ -512,7 +510,7 @@ class MockAztecNode implements AztecNode { ) as ProtocolContractAddresses, ); } - registerContractFunctionNames(_address: AztecAddress, _names: Record): Promise { + registerContractFunctionSignatures(_address: AztecAddress, _signatures: string[]): Promise { return Promise.resolve(); } getPrivateLogs(_from: number, _limit: number): Promise { diff --git a/yarn-project/circuit-types/src/interfaces/aztec-node.ts b/yarn-project/circuit-types/src/interfaces/aztec-node.ts index 9a1de505eb68..9b877575949c 100644 --- a/yarn-project/circuit-types/src/interfaces/aztec-node.ts +++ b/yarn-project/circuit-types/src/interfaces/aztec-node.ts @@ -293,7 +293,7 @@ export interface AztecNode * @param aztecAddress * @param artifact */ - registerContractFunctionNames(address: AztecAddress, names: Record): Promise; + registerContractFunctionSignatures(address: AztecAddress, functionSignatures: string[]): Promise; /** * Retrieves all private logs from up to `limit` blocks, starting from the block number `from`. @@ -540,10 +540,7 @@ export const AztecNodeApiSchema: ApiSchemaFor = { getProtocolContractAddresses: z.function().returns(ProtocolContractAddressesSchema), - registerContractFunctionNames: z - .function() - .args(schemas.AztecAddress, z.record(z.string(), z.string())) - .returns(z.void()), + registerContractFunctionSignatures: z.function().args(schemas.AztecAddress, z.array(z.string())).returns(z.void()), getPrivateLogs: z.function().args(z.number(), z.number()).returns(z.array(PrivateLog.schema)), diff --git a/yarn-project/circuits.js/src/contract/interfaces/contract_data_source.ts b/yarn-project/circuits.js/src/contract/interfaces/contract_data_source.ts index 388a828b9cb2..433e7ddd9589 100644 --- a/yarn-project/circuits.js/src/contract/interfaces/contract_data_source.ts +++ b/yarn-project/circuits.js/src/contract/interfaces/contract_data_source.ts @@ -48,5 +48,5 @@ export interface ContractDataSource { /** Returns a function's name */ getContractFunctionName(address: AztecAddress, selector: FunctionSelector): Promise; /** Registers a function names. Useful for debugging. */ - registerContractFunctionNames(address: AztecAddress, names: Record): Promise; + registerContractFunctionSignatures(address: AztecAddress, signatures: string[]): Promise; } diff --git a/yarn-project/pxe/src/pxe_service/pxe_service.ts b/yarn-project/pxe/src/pxe_service/pxe_service.ts index b57ea54df95b..0697fbc72e0e 100644 --- a/yarn-project/pxe/src/pxe_service/pxe_service.ts +++ b/yarn-project/pxe/src/pxe_service/pxe_service.ts @@ -54,6 +54,7 @@ import { EventSelector, FunctionSelector, FunctionType, + decodeFunctionSignature, encodeArguments, } from '@aztec/foundation/abi'; import { type AztecAddress } from '@aztec/foundation/aztec-address'; @@ -237,14 +238,10 @@ export class PXEService implements PXE { await this.db.addContractArtifact(contractClassId, artifact); - const functionNames: Record = {}; - for (const fn of artifact.functions) { - if (fn.functionType === FunctionType.PUBLIC) { - functionNames[FunctionSelector.fromNameAndParameters(fn.name, fn.parameters).toString()] = fn.name; - } - } - - await this.node.registerContractFunctionNames(instance.address, functionNames); + const publicFunctionSignatures = artifact.functions + .filter(fn => fn.functionType === FunctionType.PUBLIC) + .map(fn => decodeFunctionSignature(fn.name, fn.parameters)); + await this.node.registerContractFunctionSignatures(instance.address, publicFunctionSignatures); // TODO(#10007): Node should get public contract class from the registration event, not from PXE registration await this.node.addContractClass({ ...contractClass, privateFunctions: [], unconstrainedFunctions: [] }); diff --git a/yarn-project/simulator/src/public/fixtures/index.ts b/yarn-project/simulator/src/public/fixtures/index.ts index e14b6f8c3608..17cca0600ce9 100644 --- a/yarn-project/simulator/src/public/fixtures/index.ts +++ b/yarn-project/simulator/src/public/fixtures/index.ts @@ -324,7 +324,7 @@ export class MockedAvmTestContractDataSource implements ContractDataSource { return Promise.resolve(this.fnName); } - registerContractFunctionNames(_address: AztecAddress, _names: Record): Promise { + registerContractFunctionSignatures(_address: AztecAddress, _signatures: string[]): Promise { return Promise.resolve(); } } diff --git a/yarn-project/txe/src/node/txe_node.ts b/yarn-project/txe/src/node/txe_node.ts index 8197627ce15e..f9d63c2fb3cd 100644 --- a/yarn-project/txe/src/node/txe_node.ts +++ b/yarn-project/txe/src/node/txe_node.ts @@ -451,7 +451,7 @@ export class TXENode implements AztecNode { * @param aztecAddress * @param artifact */ - registerContractFunctionNames(_address: AztecAddress, _names: Record): Promise { + registerContractFunctionSignatures(_address: AztecAddress, _signatures: string[]): Promise { throw new Error('TXE Node method addContractArtifact not implemented'); } diff --git a/yarn-project/txe/src/util/txe_public_contract_data_source.ts b/yarn-project/txe/src/util/txe_public_contract_data_source.ts index 7d15b9d8d487..7d36fd880e7d 100644 --- a/yarn-project/txe/src/util/txe_public_contract_data_source.ts +++ b/yarn-project/txe/src/util/txe_public_contract_data_source.ts @@ -85,7 +85,7 @@ export class TXEPublicContractDataSource implements ContractDataSource { return Promise.resolve(func?.name); } - registerContractFunctionNames(_address: AztecAddress, _names: Record): Promise { + registerContractFunctionSignatures(_address: AztecAddress, _signatures: []): Promise { return Promise.resolve(); } From 8105d37660d56da4c48c765351f6d4ed13a76f24 Mon Sep 17 00:00:00 2001 From: Aztec Bot <49558828+AztecBot@users.noreply.github.com> Date: Wed, 8 Jan 2025 09:05:48 -0500 Subject: [PATCH 12/14] chore(master): Release 0.69.1 (#11028) :robot: I have created a release *beep* *boop* ---
aztec-package: 0.69.1 ## [0.69.1](https://github.com/AztecProtocol/aztec-packages/compare/aztec-package-v0.69.0...aztec-package-v0.69.1) (2025-01-08) ### Features * Optionally handle rpc errors with 200 + err body ([#11083](https://github.com/AztecProtocol/aztec-packages/issues/11083)) ([b42756b](https://github.com/AztecProtocol/aztec-packages/commit/b42756bc10175fea9eb60544759e9dbe41ae5e76)) ### Miscellaneous * Representing `TxHash` as `Fr` ([#10954](https://github.com/AztecProtocol/aztec-packages/issues/10954)) ([84e67ac](https://github.com/AztecProtocol/aztec-packages/commit/84e67ac5ea1e9271b1703ca956c5cc3fdc03e78a))
barretenberg.js: 0.69.1 ## [0.69.1](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg.js-v0.69.0...barretenberg.js-v0.69.1) (2025-01-08) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions
aztec-packages: 0.69.1 ## [0.69.1](https://github.com/AztecProtocol/aztec-packages/compare/aztec-packages-v0.69.0...aztec-packages-v0.69.1) (2025-01-08) ### Features * Acir formal proofs ([#10973](https://github.com/AztecProtocol/aztec-packages/issues/10973)) ([1cb7cd7](https://github.com/AztecProtocol/aztec-packages/commit/1cb7cd78d089fd1e2706d9d5993b6115bcdd6a84)) * **blobs:** Blob sink ([#10079](https://github.com/AztecProtocol/aztec-packages/issues/10079)) ([94b6c86](https://github.com/AztecProtocol/aztec-packages/commit/94b6c8641d4dd5b2788bc91c735e82a48504400a)) * Derive transcript structure between non-zk and zk flavors and between Ultra and UltraKeccak ([#11086](https://github.com/AztecProtocol/aztec-packages/issues/11086)) ([48286c6](https://github.com/AztecProtocol/aztec-packages/commit/48286c671a61dbe18e5f8e0c44e71ab6c3fd109a)) * Fix commitments and openings of masking polynomials used in zk sumcheck ([#10773](https://github.com/AztecProtocol/aztec-packages/issues/10773)) ([fc48dcc](https://github.com/AztecProtocol/aztec-packages/commit/fc48dcca537fa790ed6866ad4e184cb89c2617a2)) * Improve blob simulation speed ([#11075](https://github.com/AztecProtocol/aztec-packages/issues/11075)) ([fe845e2](https://github.com/AztecProtocol/aztec-packages/commit/fe845e2975d2cf61a343803b62ddb4ac5a20757b)) * Improve witness generation for cycle_group::batch_mul ([#9563](https://github.com/AztecProtocol/aztec-packages/issues/9563)) ([7da7f2b](https://github.com/AztecProtocol/aztec-packages/commit/7da7f2bb6c26a7c55a5869d21c3a5f546880a001)) * More efficient `compute_l2_to_l1_hash` ([#11036](https://github.com/AztecProtocol/aztec-packages/issues/11036)) ([60d43fd](https://github.com/AztecProtocol/aztec-packages/commit/60d43fd689c5c7a1d290c95c7eda520bd976dc49)) * Optionally handle rpc errors with 200 + err body ([#11083](https://github.com/AztecProtocol/aztec-packages/issues/11083)) ([b42756b](https://github.com/AztecProtocol/aztec-packages/commit/b42756bc10175fea9eb60544759e9dbe41ae5e76)) * Prover node checks txs availability before sending quote ([#10965](https://github.com/AztecProtocol/aztec-packages/issues/10965)) ([b9e7109](https://github.com/AztecProtocol/aztec-packages/commit/b9e71094969071e25533d91879c745776ca76351)), closes [#10803](https://github.com/AztecProtocol/aztec-packages/issues/10803) * Slasher ([#10693](https://github.com/AztecProtocol/aztec-packages/issues/10693)) ([9dad251](https://github.com/AztecProtocol/aztec-packages/commit/9dad251999ad5e5362787c459360955a3004eb37)) * Use unconstrained helper in `append_tx_effects_for_blob` ([#11037](https://github.com/AztecProtocol/aztec-packages/issues/11037)) ([5355a5e](https://github.com/AztecProtocol/aztec-packages/commit/5355a5ebd1af8565ad28d17c30a55b062994ec19)) * Validate block proposal txs iteratively ([#10921](https://github.com/AztecProtocol/aztec-packages/issues/10921)) ([c92129e](https://github.com/AztecProtocol/aztec-packages/commit/c92129e5e1877162f67e0715b6bdc9169957f23a)), closes [#10869](https://github.com/AztecProtocol/aztec-packages/issues/10869) ### Bug Fixes * Add bytecode instances in reverse ([#11064](https://github.com/AztecProtocol/aztec-packages/issues/11064)) ([036496c](https://github.com/AztecProtocol/aztec-packages/commit/036496ce7496132b7376c9a6708a9a6ed460771d)) * Can't use `self.field` in trait default implementations ([#11004](https://github.com/AztecProtocol/aztec-packages/issues/11004)) ([f31278f](https://github.com/AztecProtocol/aztec-packages/commit/f31278f79efa513cd6cf43564cafcb56de27495f)) * Check class registration nullifier in node before returning class ([#11074](https://github.com/AztecProtocol/aztec-packages/issues/11074)) ([649b590](https://github.com/AztecProtocol/aztec-packages/commit/649b59076b6f5a56d382180ace86aed14ebe4dd9)) * **ci:** Update docs hash ([#11082](https://github.com/AztecProtocol/aztec-packages/issues/11082)) ([b0a8397](https://github.com/AztecProtocol/aztec-packages/commit/b0a8397fb9663a3116a088b94b02ecf38ab07304)) * Optional check for architecture in bootstrap image-aztec ([#11085](https://github.com/AztecProtocol/aztec-packages/issues/11085)) ([fed44a5](https://github.com/AztecProtocol/aztec-packages/commit/fed44a50cce099469be98da24ae7c04fb7a22057)), closes [#10957](https://github.com/AztecProtocol/aztec-packages/issues/10957) * Prover node retries gathering needed txs ([#11089](https://github.com/AztecProtocol/aztec-packages/issues/11089)) ([6f07132](https://github.com/AztecProtocol/aztec-packages/commit/6f071329715aca47bea402c341d9028e8ca6ae78)) * Reset pc to 0 for next enqueued call in avm witgen ([#11043](https://github.com/AztecProtocol/aztec-packages/issues/11043)) ([44e4816](https://github.com/AztecProtocol/aztec-packages/commit/44e481650e99de0bcae6e5299413e12cb15227b9)) * Update requests per call should be less than per tx ([#11072](https://github.com/AztecProtocol/aztec-packages/issues/11072)) ([da5e95f](https://github.com/AztecProtocol/aztec-packages/commit/da5e95ffab1694bad22817edd9abdf8e48c992ca)) * Update schema naming ([#11038](https://github.com/AztecProtocol/aztec-packages/issues/11038)) ([547e556](https://github.com/AztecProtocol/aztec-packages/commit/547e55680f1383acd7b7673afb508e36ba09a5ae)) ### Miscellaneous * **avm:** Handle specific MSM errors ([#11068](https://github.com/AztecProtocol/aztec-packages/issues/11068)) ([a5097a9](https://github.com/AztecProtocol/aztec-packages/commit/a5097a994e7ecc0be2b6c7d7b320bd7bad5a27a0)), closes [#10854](https://github.com/AztecProtocol/aztec-packages/issues/10854) * **avm:** More column information in permutations ([#11070](https://github.com/AztecProtocol/aztec-packages/issues/11070)) ([8829f24](https://github.com/AztecProtocol/aztec-packages/commit/8829f2421238945f042338bac0c9e7342517248b)) * Avoid getport race conditions when starting anvil ([#11077](https://github.com/AztecProtocol/aztec-packages/issues/11077)) ([b73f7f9](https://github.com/AztecProtocol/aztec-packages/commit/b73f7f9442f9a51e82925dea3c32bc64173d81e5)) * Bump `noir-gates-diff` ([#11056](https://github.com/AztecProtocol/aztec-packages/issues/11056)) ([e076000](https://github.com/AztecProtocol/aztec-packages/commit/e0760002cc45bf894e0f97f21622a4f7295b2f33)) * Bump `noir-gates-diff` commit ([#11042](https://github.com/AztecProtocol/aztec-packages/issues/11042)) ([c820a0e](https://github.com/AztecProtocol/aztec-packages/commit/c820a0e15d29ba4fff15c12a0faa45e70f8fbab8)) * Bump devnet prover agents ([#11046](https://github.com/AztecProtocol/aztec-packages/issues/11046)) ([55de1ce](https://github.com/AztecProtocol/aztec-packages/commit/55de1ce03d5b91e6778942591cf6d5bc56955f2c)) * Bump rc-1 prover agents ([#11033](https://github.com/AztecProtocol/aztec-packages/issues/11033)) ([fb58c16](https://github.com/AztecProtocol/aztec-packages/commit/fb58c166f0c1e1ec60de567fc55df80b07f76894)) * **ci:** Fix CI to create baseline gate reports ([#11055](https://github.com/AztecProtocol/aztec-packages/issues/11055)) ([e2f6905](https://github.com/AztecProtocol/aztec-packages/commit/e2f69054292e8cde213327eb9750005d3f58ed01)) * Clean up proof lengths and IPA ([#11020](https://github.com/AztecProtocol/aztec-packages/issues/11020)) ([800c834](https://github.com/AztecProtocol/aztec-packages/commit/800c83475c2b23ac6cf501c998f7c57b3803ad8f)) * Disable noir contracts tests until stabilized ([#11047](https://github.com/AztecProtocol/aztec-packages/issues/11047)) ([a76b52e](https://github.com/AztecProtocol/aztec-packages/commit/a76b52e9ec5a24dd852e450537735f2f3a449d63)) * Fix customTags is not iterable in e2e-prover-full ([#11057](https://github.com/AztecProtocol/aztec-packages/issues/11057)) ([f35094f](https://github.com/AztecProtocol/aztec-packages/commit/f35094fd74f28d5bb41084f7b89f961a5f4d0af0)) * Fix invalid random log id ([#11076](https://github.com/AztecProtocol/aztec-packages/issues/11076)) ([b1b67b0](https://github.com/AztecProtocol/aztec-packages/commit/b1b67b092f9dbd5155dc62a12b2f8cb4d5b9e6b5)) * Fix write_recursion_inputs flow in bootstrap ([#11080](https://github.com/AztecProtocol/aztec-packages/issues/11080)) ([cd5a615](https://github.com/AztecProtocol/aztec-packages/commit/cd5a615f154446878cb8681d70b9e55c14511690)) * Hide note_hashes log ([#11059](https://github.com/AztecProtocol/aztec-packages/issues/11059)) ([d9a14d2](https://github.com/AztecProtocol/aztec-packages/commit/d9a14d2ad06a560fa0cf91ad74d52dee0f7c4c08)) * Let IndexedTreeLeafPreimage have LeafPreimage as a parent trait ([#10913](https://github.com/AztecProtocol/aztec-packages/issues/10913)) ([496a55a](https://github.com/AztecProtocol/aztec-packages/commit/496a55a245cba943fb1d5fbcc37ad0f035498a91)) * Load in the big dashboard during metrics install ([#11007](https://github.com/AztecProtocol/aztec-packages/issues/11007)) ([f6f2c12](https://github.com/AztecProtocol/aztec-packages/commit/f6f2c1258d63b155059e70532c7e0c5aecfa6782)) * New test that you can register, deploy, and call a public function all in one tx ([#11045](https://github.com/AztecProtocol/aztec-packages/issues/11045)) ([5e3183c](https://github.com/AztecProtocol/aztec-packages/commit/5e3183c9ab4e6668c7c0ac634246c29f14147c11)) * Pass fn signatures ([#10849](https://github.com/AztecProtocol/aztec-packages/issues/10849)) ([a2c4e98](https://github.com/AztecProtocol/aztec-packages/commit/a2c4e985679bc36ca075f2dbe0cdaf7ea9e6093d)) * Patch jest to not use JSON serialization in message passing ci3 ([#10964](https://github.com/AztecProtocol/aztec-packages/issues/10964)) ([d08f540](https://github.com/AztecProtocol/aztec-packages/commit/d08f540eea0f4763b41e2a741a3ba65cfdf37f4e)) * Refactor tail public inputs ([#11031](https://github.com/AztecProtocol/aztec-packages/issues/11031)) ([4ed1530](https://github.com/AztecProtocol/aztec-packages/commit/4ed1530e90ee7bb7a3835fd5f7fd80539b642855)) * Remove abi refs from publisher ([#10766](https://github.com/AztecProtocol/aztec-packages/issues/10766)) ([17d6802](https://github.com/AztecProtocol/aztec-packages/commit/17d6802428d6ad63877dd5d56afedfa9f0d5a3be)) * Remove some instances of `--silence-warnings` ([#11071](https://github.com/AztecProtocol/aztec-packages/issues/11071)) ([ecbd59e](https://github.com/AztecProtocol/aztec-packages/commit/ecbd59e58006533c8885a8b2fadbd9507489300c)) * Renaming getIncomingNotes ([#10743](https://github.com/AztecProtocol/aztec-packages/issues/10743)) ([ffa7407](https://github.com/AztecProtocol/aztec-packages/commit/ffa740707dca56a77fb59f2944a3e9a2dcb8d507)) * Replace relative paths to noir-protocol-circuits ([7194a7e](https://github.com/AztecProtocol/aztec-packages/commit/7194a7e3ec37b0d706be286a73b353ad7b2094f9)) * Replace relative paths to noir-protocol-circuits ([b00bd13](https://github.com/AztecProtocol/aztec-packages/commit/b00bd13f1d4fd92930c30466ab94a0746a4ed40b)) * Replace relative paths to noir-protocol-circuits ([c4fcbc0](https://github.com/AztecProtocol/aztec-packages/commit/c4fcbc003cfba3ae86edf4d030074c277fac89d5)) * Replace relative paths to noir-protocol-circuits ([694343d](https://github.com/AztecProtocol/aztec-packages/commit/694343df2cee4285a004399962c4219e0d739a82)) * Representing `TxHash` as `Fr` ([#10954](https://github.com/AztecProtocol/aztec-packages/issues/10954)) ([84e67ac](https://github.com/AztecProtocol/aztec-packages/commit/84e67ac5ea1e9271b1703ca956c5cc3fdc03e78a)) * Restore `prove_then_verify` test on `verify_rollup_honk_proof` ([#11018](https://github.com/AztecProtocol/aztec-packages/issues/11018)) ([79e289d](https://github.com/AztecProtocol/aztec-packages/commit/79e289d4c77c36e847851ec2a910ed0bc122d307)) * Unify honk verifier contracts ([#11067](https://github.com/AztecProtocol/aztec-packages/issues/11067)) ([9968849](https://github.com/AztecProtocol/aztec-packages/commit/9968849f1e3680ad26edb174d81693f0ced0edd4)) * Update noir-bignum to v0.5.0 ([#11066](https://github.com/AztecProtocol/aztec-packages/issues/11066)) ([bf10a5c](https://github.com/AztecProtocol/aztec-packages/commit/bf10a5c80b6564203a3cfe3039eee321dab625fc)) * Updated aztec-spartan.sh and the README ([#11088](https://github.com/AztecProtocol/aztec-packages/issues/11088)) ([56128a6](https://github.com/AztecProtocol/aztec-packages/commit/56128a6383489ce84d50de442ba17477b1e2d56c))
barretenberg: 0.69.1 ## [0.69.1](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg-v0.69.0...barretenberg-v0.69.1) (2025-01-08) ### Features * Acir formal proofs ([#10973](https://github.com/AztecProtocol/aztec-packages/issues/10973)) ([1cb7cd7](https://github.com/AztecProtocol/aztec-packages/commit/1cb7cd78d089fd1e2706d9d5993b6115bcdd6a84)) * Derive transcript structure between non-zk and zk flavors and between Ultra and UltraKeccak ([#11086](https://github.com/AztecProtocol/aztec-packages/issues/11086)) ([48286c6](https://github.com/AztecProtocol/aztec-packages/commit/48286c671a61dbe18e5f8e0c44e71ab6c3fd109a)) * Fix commitments and openings of masking polynomials used in zk sumcheck ([#10773](https://github.com/AztecProtocol/aztec-packages/issues/10773)) ([fc48dcc](https://github.com/AztecProtocol/aztec-packages/commit/fc48dcca537fa790ed6866ad4e184cb89c2617a2)) * Improve witness generation for cycle_group::batch_mul ([#9563](https://github.com/AztecProtocol/aztec-packages/issues/9563)) ([7da7f2b](https://github.com/AztecProtocol/aztec-packages/commit/7da7f2bb6c26a7c55a5869d21c3a5f546880a001)) ### Bug Fixes * Add bytecode instances in reverse ([#11064](https://github.com/AztecProtocol/aztec-packages/issues/11064)) ([036496c](https://github.com/AztecProtocol/aztec-packages/commit/036496ce7496132b7376c9a6708a9a6ed460771d)) * Reset pc to 0 for next enqueued call in avm witgen ([#11043](https://github.com/AztecProtocol/aztec-packages/issues/11043)) ([44e4816](https://github.com/AztecProtocol/aztec-packages/commit/44e481650e99de0bcae6e5299413e12cb15227b9)) * Update requests per call should be less than per tx ([#11072](https://github.com/AztecProtocol/aztec-packages/issues/11072)) ([da5e95f](https://github.com/AztecProtocol/aztec-packages/commit/da5e95ffab1694bad22817edd9abdf8e48c992ca)) ### Miscellaneous * **avm:** Handle specific MSM errors ([#11068](https://github.com/AztecProtocol/aztec-packages/issues/11068)) ([a5097a9](https://github.com/AztecProtocol/aztec-packages/commit/a5097a994e7ecc0be2b6c7d7b320bd7bad5a27a0)), closes [#10854](https://github.com/AztecProtocol/aztec-packages/issues/10854) * **avm:** More column information in permutations ([#11070](https://github.com/AztecProtocol/aztec-packages/issues/11070)) ([8829f24](https://github.com/AztecProtocol/aztec-packages/commit/8829f2421238945f042338bac0c9e7342517248b)) * Clean up proof lengths and IPA ([#11020](https://github.com/AztecProtocol/aztec-packages/issues/11020)) ([800c834](https://github.com/AztecProtocol/aztec-packages/commit/800c83475c2b23ac6cf501c998f7c57b3803ad8f)) * Fix write_recursion_inputs flow in bootstrap ([#11080](https://github.com/AztecProtocol/aztec-packages/issues/11080)) ([cd5a615](https://github.com/AztecProtocol/aztec-packages/commit/cd5a615f154446878cb8681d70b9e55c14511690)) * Restore `prove_then_verify` test on `verify_rollup_honk_proof` ([#11018](https://github.com/AztecProtocol/aztec-packages/issues/11018)) ([79e289d](https://github.com/AztecProtocol/aztec-packages/commit/79e289d4c77c36e847851ec2a910ed0bc122d307)) * Unify honk verifier contracts ([#11067](https://github.com/AztecProtocol/aztec-packages/issues/11067)) ([9968849](https://github.com/AztecProtocol/aztec-packages/commit/9968849f1e3680ad26edb174d81693f0ced0edd4))
--- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .release-please-manifest.json | 8 ++-- CHANGELOG.md | 67 +++++++++++++++++++++++++++++++++ barretenberg/CHANGELOG.md | 27 +++++++++++++ barretenberg/cpp/CMakeLists.txt | 2 +- barretenberg/ts/CHANGELOG.md | 7 ++++ barretenberg/ts/package.json | 2 +- yarn-project/aztec/CHANGELOG.md | 12 ++++++ yarn-project/aztec/package.json | 2 +- 8 files changed, 120 insertions(+), 7 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2bf333f137e7..01cabacb75a8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,7 +1,7 @@ { - ".": "0.69.0", + ".": "0.69.1", "yarn-project/cli": "0.35.1", - "yarn-project/aztec": "0.69.0", - "barretenberg": "0.69.0", - "barretenberg/ts": "0.69.0" + "yarn-project/aztec": "0.69.1", + "barretenberg": "0.69.1", + "barretenberg/ts": "0.69.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 34f403ba568f..b4bc4fb2117d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,72 @@ # Changelog +## [0.69.1](https://github.com/AztecProtocol/aztec-packages/compare/aztec-packages-v0.69.0...aztec-packages-v0.69.1) (2025-01-08) + + +### Features + +* Acir formal proofs ([#10973](https://github.com/AztecProtocol/aztec-packages/issues/10973)) ([1cb7cd7](https://github.com/AztecProtocol/aztec-packages/commit/1cb7cd78d089fd1e2706d9d5993b6115bcdd6a84)) +* **blobs:** Blob sink ([#10079](https://github.com/AztecProtocol/aztec-packages/issues/10079)) ([94b6c86](https://github.com/AztecProtocol/aztec-packages/commit/94b6c8641d4dd5b2788bc91c735e82a48504400a)) +* Derive transcript structure between non-zk and zk flavors and between Ultra and UltraKeccak ([#11086](https://github.com/AztecProtocol/aztec-packages/issues/11086)) ([48286c6](https://github.com/AztecProtocol/aztec-packages/commit/48286c671a61dbe18e5f8e0c44e71ab6c3fd109a)) +* Fix commitments and openings of masking polynomials used in zk sumcheck ([#10773](https://github.com/AztecProtocol/aztec-packages/issues/10773)) ([fc48dcc](https://github.com/AztecProtocol/aztec-packages/commit/fc48dcca537fa790ed6866ad4e184cb89c2617a2)) +* Improve blob simulation speed ([#11075](https://github.com/AztecProtocol/aztec-packages/issues/11075)) ([fe845e2](https://github.com/AztecProtocol/aztec-packages/commit/fe845e2975d2cf61a343803b62ddb4ac5a20757b)) +* Improve witness generation for cycle_group::batch_mul ([#9563](https://github.com/AztecProtocol/aztec-packages/issues/9563)) ([7da7f2b](https://github.com/AztecProtocol/aztec-packages/commit/7da7f2bb6c26a7c55a5869d21c3a5f546880a001)) +* More efficient `compute_l2_to_l1_hash` ([#11036](https://github.com/AztecProtocol/aztec-packages/issues/11036)) ([60d43fd](https://github.com/AztecProtocol/aztec-packages/commit/60d43fd689c5c7a1d290c95c7eda520bd976dc49)) +* Optionally handle rpc errors with 200 + err body ([#11083](https://github.com/AztecProtocol/aztec-packages/issues/11083)) ([b42756b](https://github.com/AztecProtocol/aztec-packages/commit/b42756bc10175fea9eb60544759e9dbe41ae5e76)) +* Prover node checks txs availability before sending quote ([#10965](https://github.com/AztecProtocol/aztec-packages/issues/10965)) ([b9e7109](https://github.com/AztecProtocol/aztec-packages/commit/b9e71094969071e25533d91879c745776ca76351)), closes [#10803](https://github.com/AztecProtocol/aztec-packages/issues/10803) +* Slasher ([#10693](https://github.com/AztecProtocol/aztec-packages/issues/10693)) ([9dad251](https://github.com/AztecProtocol/aztec-packages/commit/9dad251999ad5e5362787c459360955a3004eb37)) +* Use unconstrained helper in `append_tx_effects_for_blob` ([#11037](https://github.com/AztecProtocol/aztec-packages/issues/11037)) ([5355a5e](https://github.com/AztecProtocol/aztec-packages/commit/5355a5ebd1af8565ad28d17c30a55b062994ec19)) +* Validate block proposal txs iteratively ([#10921](https://github.com/AztecProtocol/aztec-packages/issues/10921)) ([c92129e](https://github.com/AztecProtocol/aztec-packages/commit/c92129e5e1877162f67e0715b6bdc9169957f23a)), closes [#10869](https://github.com/AztecProtocol/aztec-packages/issues/10869) + + +### Bug Fixes + +* Add bytecode instances in reverse ([#11064](https://github.com/AztecProtocol/aztec-packages/issues/11064)) ([036496c](https://github.com/AztecProtocol/aztec-packages/commit/036496ce7496132b7376c9a6708a9a6ed460771d)) +* Can't use `self.field` in trait default implementations ([#11004](https://github.com/AztecProtocol/aztec-packages/issues/11004)) ([f31278f](https://github.com/AztecProtocol/aztec-packages/commit/f31278f79efa513cd6cf43564cafcb56de27495f)) +* Check class registration nullifier in node before returning class ([#11074](https://github.com/AztecProtocol/aztec-packages/issues/11074)) ([649b590](https://github.com/AztecProtocol/aztec-packages/commit/649b59076b6f5a56d382180ace86aed14ebe4dd9)) +* **ci:** Update docs hash ([#11082](https://github.com/AztecProtocol/aztec-packages/issues/11082)) ([b0a8397](https://github.com/AztecProtocol/aztec-packages/commit/b0a8397fb9663a3116a088b94b02ecf38ab07304)) +* Optional check for architecture in bootstrap image-aztec ([#11085](https://github.com/AztecProtocol/aztec-packages/issues/11085)) ([fed44a5](https://github.com/AztecProtocol/aztec-packages/commit/fed44a50cce099469be98da24ae7c04fb7a22057)), closes [#10957](https://github.com/AztecProtocol/aztec-packages/issues/10957) +* Prover node retries gathering needed txs ([#11089](https://github.com/AztecProtocol/aztec-packages/issues/11089)) ([6f07132](https://github.com/AztecProtocol/aztec-packages/commit/6f071329715aca47bea402c341d9028e8ca6ae78)) +* Reset pc to 0 for next enqueued call in avm witgen ([#11043](https://github.com/AztecProtocol/aztec-packages/issues/11043)) ([44e4816](https://github.com/AztecProtocol/aztec-packages/commit/44e481650e99de0bcae6e5299413e12cb15227b9)) +* Update requests per call should be less than per tx ([#11072](https://github.com/AztecProtocol/aztec-packages/issues/11072)) ([da5e95f](https://github.com/AztecProtocol/aztec-packages/commit/da5e95ffab1694bad22817edd9abdf8e48c992ca)) +* Update schema naming ([#11038](https://github.com/AztecProtocol/aztec-packages/issues/11038)) ([547e556](https://github.com/AztecProtocol/aztec-packages/commit/547e55680f1383acd7b7673afb508e36ba09a5ae)) + + +### Miscellaneous + +* **avm:** Handle specific MSM errors ([#11068](https://github.com/AztecProtocol/aztec-packages/issues/11068)) ([a5097a9](https://github.com/AztecProtocol/aztec-packages/commit/a5097a994e7ecc0be2b6c7d7b320bd7bad5a27a0)), closes [#10854](https://github.com/AztecProtocol/aztec-packages/issues/10854) +* **avm:** More column information in permutations ([#11070](https://github.com/AztecProtocol/aztec-packages/issues/11070)) ([8829f24](https://github.com/AztecProtocol/aztec-packages/commit/8829f2421238945f042338bac0c9e7342517248b)) +* Avoid getport race conditions when starting anvil ([#11077](https://github.com/AztecProtocol/aztec-packages/issues/11077)) ([b73f7f9](https://github.com/AztecProtocol/aztec-packages/commit/b73f7f9442f9a51e82925dea3c32bc64173d81e5)) +* Bump `noir-gates-diff` ([#11056](https://github.com/AztecProtocol/aztec-packages/issues/11056)) ([e076000](https://github.com/AztecProtocol/aztec-packages/commit/e0760002cc45bf894e0f97f21622a4f7295b2f33)) +* Bump `noir-gates-diff` commit ([#11042](https://github.com/AztecProtocol/aztec-packages/issues/11042)) ([c820a0e](https://github.com/AztecProtocol/aztec-packages/commit/c820a0e15d29ba4fff15c12a0faa45e70f8fbab8)) +* Bump devnet prover agents ([#11046](https://github.com/AztecProtocol/aztec-packages/issues/11046)) ([55de1ce](https://github.com/AztecProtocol/aztec-packages/commit/55de1ce03d5b91e6778942591cf6d5bc56955f2c)) +* Bump rc-1 prover agents ([#11033](https://github.com/AztecProtocol/aztec-packages/issues/11033)) ([fb58c16](https://github.com/AztecProtocol/aztec-packages/commit/fb58c166f0c1e1ec60de567fc55df80b07f76894)) +* **ci:** Fix CI to create baseline gate reports ([#11055](https://github.com/AztecProtocol/aztec-packages/issues/11055)) ([e2f6905](https://github.com/AztecProtocol/aztec-packages/commit/e2f69054292e8cde213327eb9750005d3f58ed01)) +* Clean up proof lengths and IPA ([#11020](https://github.com/AztecProtocol/aztec-packages/issues/11020)) ([800c834](https://github.com/AztecProtocol/aztec-packages/commit/800c83475c2b23ac6cf501c998f7c57b3803ad8f)) +* Disable noir contracts tests until stabilized ([#11047](https://github.com/AztecProtocol/aztec-packages/issues/11047)) ([a76b52e](https://github.com/AztecProtocol/aztec-packages/commit/a76b52e9ec5a24dd852e450537735f2f3a449d63)) +* Fix customTags is not iterable in e2e-prover-full ([#11057](https://github.com/AztecProtocol/aztec-packages/issues/11057)) ([f35094f](https://github.com/AztecProtocol/aztec-packages/commit/f35094fd74f28d5bb41084f7b89f961a5f4d0af0)) +* Fix invalid random log id ([#11076](https://github.com/AztecProtocol/aztec-packages/issues/11076)) ([b1b67b0](https://github.com/AztecProtocol/aztec-packages/commit/b1b67b092f9dbd5155dc62a12b2f8cb4d5b9e6b5)) +* Fix write_recursion_inputs flow in bootstrap ([#11080](https://github.com/AztecProtocol/aztec-packages/issues/11080)) ([cd5a615](https://github.com/AztecProtocol/aztec-packages/commit/cd5a615f154446878cb8681d70b9e55c14511690)) +* Hide note_hashes log ([#11059](https://github.com/AztecProtocol/aztec-packages/issues/11059)) ([d9a14d2](https://github.com/AztecProtocol/aztec-packages/commit/d9a14d2ad06a560fa0cf91ad74d52dee0f7c4c08)) +* Let IndexedTreeLeafPreimage have LeafPreimage as a parent trait ([#10913](https://github.com/AztecProtocol/aztec-packages/issues/10913)) ([496a55a](https://github.com/AztecProtocol/aztec-packages/commit/496a55a245cba943fb1d5fbcc37ad0f035498a91)) +* Load in the big dashboard during metrics install ([#11007](https://github.com/AztecProtocol/aztec-packages/issues/11007)) ([f6f2c12](https://github.com/AztecProtocol/aztec-packages/commit/f6f2c1258d63b155059e70532c7e0c5aecfa6782)) +* New test that you can register, deploy, and call a public function all in one tx ([#11045](https://github.com/AztecProtocol/aztec-packages/issues/11045)) ([5e3183c](https://github.com/AztecProtocol/aztec-packages/commit/5e3183c9ab4e6668c7c0ac634246c29f14147c11)) +* Pass fn signatures ([#10849](https://github.com/AztecProtocol/aztec-packages/issues/10849)) ([a2c4e98](https://github.com/AztecProtocol/aztec-packages/commit/a2c4e985679bc36ca075f2dbe0cdaf7ea9e6093d)) +* Patch jest to not use JSON serialization in message passing ci3 ([#10964](https://github.com/AztecProtocol/aztec-packages/issues/10964)) ([d08f540](https://github.com/AztecProtocol/aztec-packages/commit/d08f540eea0f4763b41e2a741a3ba65cfdf37f4e)) +* Refactor tail public inputs ([#11031](https://github.com/AztecProtocol/aztec-packages/issues/11031)) ([4ed1530](https://github.com/AztecProtocol/aztec-packages/commit/4ed1530e90ee7bb7a3835fd5f7fd80539b642855)) +* Remove abi refs from publisher ([#10766](https://github.com/AztecProtocol/aztec-packages/issues/10766)) ([17d6802](https://github.com/AztecProtocol/aztec-packages/commit/17d6802428d6ad63877dd5d56afedfa9f0d5a3be)) +* Remove some instances of `--silence-warnings` ([#11071](https://github.com/AztecProtocol/aztec-packages/issues/11071)) ([ecbd59e](https://github.com/AztecProtocol/aztec-packages/commit/ecbd59e58006533c8885a8b2fadbd9507489300c)) +* Renaming getIncomingNotes ([#10743](https://github.com/AztecProtocol/aztec-packages/issues/10743)) ([ffa7407](https://github.com/AztecProtocol/aztec-packages/commit/ffa740707dca56a77fb59f2944a3e9a2dcb8d507)) +* Replace relative paths to noir-protocol-circuits ([7194a7e](https://github.com/AztecProtocol/aztec-packages/commit/7194a7e3ec37b0d706be286a73b353ad7b2094f9)) +* Replace relative paths to noir-protocol-circuits ([b00bd13](https://github.com/AztecProtocol/aztec-packages/commit/b00bd13f1d4fd92930c30466ab94a0746a4ed40b)) +* Replace relative paths to noir-protocol-circuits ([c4fcbc0](https://github.com/AztecProtocol/aztec-packages/commit/c4fcbc003cfba3ae86edf4d030074c277fac89d5)) +* Replace relative paths to noir-protocol-circuits ([694343d](https://github.com/AztecProtocol/aztec-packages/commit/694343df2cee4285a004399962c4219e0d739a82)) +* Representing `TxHash` as `Fr` ([#10954](https://github.com/AztecProtocol/aztec-packages/issues/10954)) ([84e67ac](https://github.com/AztecProtocol/aztec-packages/commit/84e67ac5ea1e9271b1703ca956c5cc3fdc03e78a)) +* Restore `prove_then_verify` test on `verify_rollup_honk_proof` ([#11018](https://github.com/AztecProtocol/aztec-packages/issues/11018)) ([79e289d](https://github.com/AztecProtocol/aztec-packages/commit/79e289d4c77c36e847851ec2a910ed0bc122d307)) +* Unify honk verifier contracts ([#11067](https://github.com/AztecProtocol/aztec-packages/issues/11067)) ([9968849](https://github.com/AztecProtocol/aztec-packages/commit/9968849f1e3680ad26edb174d81693f0ced0edd4)) +* Update noir-bignum to v0.5.0 ([#11066](https://github.com/AztecProtocol/aztec-packages/issues/11066)) ([bf10a5c](https://github.com/AztecProtocol/aztec-packages/commit/bf10a5c80b6564203a3cfe3039eee321dab625fc)) +* Updated aztec-spartan.sh and the README ([#11088](https://github.com/AztecProtocol/aztec-packages/issues/11088)) ([56128a6](https://github.com/AztecProtocol/aztec-packages/commit/56128a6383489ce84d50de442ba17477b1e2d56c)) + ## [0.69.0](https://github.com/AztecProtocol/aztec-packages/compare/aztec-packages-v0.68.2...aztec-packages-v0.69.0) (2025-01-03) diff --git a/barretenberg/CHANGELOG.md b/barretenberg/CHANGELOG.md index 935ec694eab7..b8700378ddc1 100644 --- a/barretenberg/CHANGELOG.md +++ b/barretenberg/CHANGELOG.md @@ -1,5 +1,32 @@ # Changelog +## [0.69.1](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg-v0.69.0...barretenberg-v0.69.1) (2025-01-08) + + +### Features + +* Acir formal proofs ([#10973](https://github.com/AztecProtocol/aztec-packages/issues/10973)) ([1cb7cd7](https://github.com/AztecProtocol/aztec-packages/commit/1cb7cd78d089fd1e2706d9d5993b6115bcdd6a84)) +* Derive transcript structure between non-zk and zk flavors and between Ultra and UltraKeccak ([#11086](https://github.com/AztecProtocol/aztec-packages/issues/11086)) ([48286c6](https://github.com/AztecProtocol/aztec-packages/commit/48286c671a61dbe18e5f8e0c44e71ab6c3fd109a)) +* Fix commitments and openings of masking polynomials used in zk sumcheck ([#10773](https://github.com/AztecProtocol/aztec-packages/issues/10773)) ([fc48dcc](https://github.com/AztecProtocol/aztec-packages/commit/fc48dcca537fa790ed6866ad4e184cb89c2617a2)) +* Improve witness generation for cycle_group::batch_mul ([#9563](https://github.com/AztecProtocol/aztec-packages/issues/9563)) ([7da7f2b](https://github.com/AztecProtocol/aztec-packages/commit/7da7f2bb6c26a7c55a5869d21c3a5f546880a001)) + + +### Bug Fixes + +* Add bytecode instances in reverse ([#11064](https://github.com/AztecProtocol/aztec-packages/issues/11064)) ([036496c](https://github.com/AztecProtocol/aztec-packages/commit/036496ce7496132b7376c9a6708a9a6ed460771d)) +* Reset pc to 0 for next enqueued call in avm witgen ([#11043](https://github.com/AztecProtocol/aztec-packages/issues/11043)) ([44e4816](https://github.com/AztecProtocol/aztec-packages/commit/44e481650e99de0bcae6e5299413e12cb15227b9)) +* Update requests per call should be less than per tx ([#11072](https://github.com/AztecProtocol/aztec-packages/issues/11072)) ([da5e95f](https://github.com/AztecProtocol/aztec-packages/commit/da5e95ffab1694bad22817edd9abdf8e48c992ca)) + + +### Miscellaneous + +* **avm:** Handle specific MSM errors ([#11068](https://github.com/AztecProtocol/aztec-packages/issues/11068)) ([a5097a9](https://github.com/AztecProtocol/aztec-packages/commit/a5097a994e7ecc0be2b6c7d7b320bd7bad5a27a0)), closes [#10854](https://github.com/AztecProtocol/aztec-packages/issues/10854) +* **avm:** More column information in permutations ([#11070](https://github.com/AztecProtocol/aztec-packages/issues/11070)) ([8829f24](https://github.com/AztecProtocol/aztec-packages/commit/8829f2421238945f042338bac0c9e7342517248b)) +* Clean up proof lengths and IPA ([#11020](https://github.com/AztecProtocol/aztec-packages/issues/11020)) ([800c834](https://github.com/AztecProtocol/aztec-packages/commit/800c83475c2b23ac6cf501c998f7c57b3803ad8f)) +* Fix write_recursion_inputs flow in bootstrap ([#11080](https://github.com/AztecProtocol/aztec-packages/issues/11080)) ([cd5a615](https://github.com/AztecProtocol/aztec-packages/commit/cd5a615f154446878cb8681d70b9e55c14511690)) +* Restore `prove_then_verify` test on `verify_rollup_honk_proof` ([#11018](https://github.com/AztecProtocol/aztec-packages/issues/11018)) ([79e289d](https://github.com/AztecProtocol/aztec-packages/commit/79e289d4c77c36e847851ec2a910ed0bc122d307)) +* Unify honk verifier contracts ([#11067](https://github.com/AztecProtocol/aztec-packages/issues/11067)) ([9968849](https://github.com/AztecProtocol/aztec-packages/commit/9968849f1e3680ad26edb174d81693f0ced0edd4)) + ## [0.69.0](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg-v0.68.2...barretenberg-v0.69.0) (2025-01-03) diff --git a/barretenberg/cpp/CMakeLists.txt b/barretenberg/cpp/CMakeLists.txt index 0956c08a44bd..3714ce82cabe 100644 --- a/barretenberg/cpp/CMakeLists.txt +++ b/barretenberg/cpp/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.24 FATAL_ERROR) project( Barretenberg DESCRIPTION "BN254 elliptic curve library, and PLONK SNARK prover" - VERSION 0.69.0 # x-release-please-version + VERSION 0.69.1 # x-release-please-version LANGUAGES CXX C ) # Insert version into `bb` config file diff --git a/barretenberg/ts/CHANGELOG.md b/barretenberg/ts/CHANGELOG.md index 2e80b2f1e380..a5a540c556f5 100644 --- a/barretenberg/ts/CHANGELOG.md +++ b/barretenberg/ts/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.69.1](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg.js-v0.69.0...barretenberg.js-v0.69.1) (2025-01-08) + + +### Miscellaneous + +* **barretenberg.js:** Synchronize aztec-packages versions + ## [0.69.0](https://github.com/AztecProtocol/aztec-packages/compare/barretenberg.js-v0.68.2...barretenberg.js-v0.69.0) (2025-01-03) diff --git a/barretenberg/ts/package.json b/barretenberg/ts/package.json index 0995f7b5f20f..6b5af5ba546b 100644 --- a/barretenberg/ts/package.json +++ b/barretenberg/ts/package.json @@ -1,7 +1,7 @@ { "name": "@aztec/bb.js", "packageManager": "yarn@4.5.2", - "version": "0.69.0", + "version": "0.69.1", "homepage": "https://github.com/AztecProtocol/aztec-packages/tree/master/barretenberg/ts", "license": "MIT", "type": "module", diff --git a/yarn-project/aztec/CHANGELOG.md b/yarn-project/aztec/CHANGELOG.md index bf36a15cd5d0..9307dff74e81 100644 --- a/yarn-project/aztec/CHANGELOG.md +++ b/yarn-project/aztec/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [0.69.1](https://github.com/AztecProtocol/aztec-packages/compare/aztec-package-v0.69.0...aztec-package-v0.69.1) (2025-01-08) + + +### Features + +* Optionally handle rpc errors with 200 + err body ([#11083](https://github.com/AztecProtocol/aztec-packages/issues/11083)) ([b42756b](https://github.com/AztecProtocol/aztec-packages/commit/b42756bc10175fea9eb60544759e9dbe41ae5e76)) + + +### Miscellaneous + +* Representing `TxHash` as `Fr` ([#10954](https://github.com/AztecProtocol/aztec-packages/issues/10954)) ([84e67ac](https://github.com/AztecProtocol/aztec-packages/commit/84e67ac5ea1e9271b1703ca956c5cc3fdc03e78a)) + ## [0.69.0](https://github.com/AztecProtocol/aztec-packages/compare/aztec-package-v0.68.2...aztec-package-v0.69.0) (2025-01-03) diff --git a/yarn-project/aztec/package.json b/yarn-project/aztec/package.json index 559d5343028d..c348e3dcbb17 100644 --- a/yarn-project/aztec/package.json +++ b/yarn-project/aztec/package.json @@ -1,6 +1,6 @@ { "name": "@aztec/aztec", - "version": "0.69.0", + "version": "0.69.1", "type": "module", "exports": { ".": "./dest/index.js" From def7cd7762f45b19c9c94bf7aa42a9c50c46c8fa Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Wed, 8 Jan 2025 12:21:42 -0300 Subject: [PATCH 13/14] feat: Build blocks using txs with higher fee first (#11093) Updates the tx pool to store pending tx hashes sorted by fee. We use the sum of the l2 and da priority fees for this. Fixes #11084 --- yarn-project/circuit-types/src/tx/tx.ts | 5 + .../src/mem_pools/tx_pool/aztec_kv_tx_pool.ts | 101 ++++++++++-------- .../src/mem_pools/tx_pool/memory_tx_pool.ts | 6 +- .../p2p/src/mem_pools/tx_pool/priority.ts | 13 +++ .../p2p/src/mem_pools/tx_pool/tx_pool.ts | 2 +- .../mem_pools/tx_pool/tx_pool_test_suite.ts | 22 +++- 6 files changed, 102 insertions(+), 47 deletions(-) create mode 100644 yarn-project/p2p/src/mem_pools/tx_pool/priority.ts diff --git a/yarn-project/circuit-types/src/tx/tx.ts b/yarn-project/circuit-types/src/tx/tx.ts index 00b8a8593e53..969a069e4f71 100644 --- a/yarn-project/circuit-types/src/tx/tx.ts +++ b/yarn-project/circuit-types/src/tx/tx.ts @@ -1,6 +1,7 @@ import { ClientIvcProof, Fr, + type GasSettings, PrivateKernelTailCircuitPublicInputs, PrivateLog, type PrivateToPublicAccumulatedData, @@ -88,6 +89,10 @@ export class Tx extends Gossipable { return this.publicTeardownFunctionCall.isEmpty() ? undefined : this.publicTeardownFunctionCall; } + getGasSettings(): GasSettings { + return this.data.constants.txContext.gasSettings; + } + /** * Deserializes the Tx object from a Buffer. * @param buffer - Buffer or BufferReader object to deserialize. diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/aztec_kv_tx_pool.ts b/yarn-project/p2p/src/mem_pools/tx_pool/aztec_kv_tx_pool.ts index 70c858f08fbd..3247c88355c6 100644 --- a/yarn-project/p2p/src/mem_pools/tx_pool/aztec_kv_tx_pool.ts +++ b/yarn-project/p2p/src/mem_pools/tx_pool/aztec_kv_tx_pool.ts @@ -1,10 +1,11 @@ import { Tx, TxHash } from '@aztec/circuit-types'; import { type TxAddedToPoolStats } from '@aztec/circuit-types/stats'; import { type Logger, createLogger } from '@aztec/foundation/log'; -import { type AztecKVStore, type AztecMap, type AztecSet } from '@aztec/kv-store'; +import { type AztecKVStore, type AztecMap, type AztecMultiMap } from '@aztec/kv-store'; import { type TelemetryClient } from '@aztec/telemetry-client'; import { PoolInstrumentation, PoolName } from '../instrumentation.js'; +import { getPendingTxPriority } from './priority.js'; import { type TxPool } from './tx_pool.js'; /** @@ -16,10 +17,11 @@ export class AztecKVTxPool implements TxPool { /** Our tx pool, stored as a Map, with K: tx hash and V: the transaction. */ #txs: AztecMap; - /** Index for pending txs. */ - #pendingTxs: AztecSet; - /** Index for mined txs. */ - #minedTxs: AztecMap; + /** Index from tx hash to the block number in which they were mined, filtered by mined txs. */ + #minedTxHashToBlock: AztecMap; + + /** Index from tx priority (stored as hex) to its tx hash, filtered by pending txs. */ + #pendingTxPriorityToHash: AztecMultiMap; #log: Logger; @@ -32,8 +34,8 @@ export class AztecKVTxPool implements TxPool { */ constructor(store: AztecKVStore, telemetry: TelemetryClient, log = createLogger('p2p:tx_pool')) { this.#txs = store.openMap('txs'); - this.#minedTxs = store.openMap('minedTxs'); - this.#pendingTxs = store.openSet('pendingTxs'); + this.#minedTxHashToBlock = store.openMap('txHashToBlockMined'); + this.#pendingTxPriorityToHash = store.openMultiMap('pendingTxFeeToHash'); this.#store = store; this.#log = log; @@ -41,18 +43,25 @@ export class AztecKVTxPool implements TxPool { } public markAsMined(txHashes: TxHash[], blockNumber: number): Promise { + if (txHashes.length === 0) { + return Promise.resolve(); + } + + let deletedPending = 0; return this.#store.transaction(() => { - let deleted = 0; for (const hash of txHashes) { const key = hash.toString(); - void this.#minedTxs.set(key, blockNumber); - if (this.#pendingTxs.has(key)) { - deleted++; - void this.#pendingTxs.delete(key); + void this.#minedTxHashToBlock.set(key, blockNumber); + + const tx = this.getTxByHash(hash); + if (tx) { + deletedPending++; + const fee = getPendingTxPriority(tx); + void this.#pendingTxPriorityToHash.deleteValue(fee, key); } } - this.#metrics.recordRemovedObjects(deleted, 'pending'); this.#metrics.recordAddedObjects(txHashes.length, 'mined'); + this.#metrics.recordRemovedObjects(deletedPending, 'pending'); }); } @@ -61,33 +70,30 @@ export class AztecKVTxPool implements TxPool { return Promise.resolve(); } + let markedAsPending = 0; return this.#store.transaction(() => { - let deleted = 0; - let added = 0; for (const hash of txHashes) { const key = hash.toString(); - if (this.#minedTxs.has(key)) { - deleted++; - void this.#minedTxs.delete(key); - } + void this.#minedTxHashToBlock.delete(key); - if (this.#txs.has(key)) { - added++; - void this.#pendingTxs.add(key); + const tx = this.getTxByHash(hash); + if (tx) { + void this.#pendingTxPriorityToHash.set(getPendingTxPriority(tx), key); + markedAsPending++; } } - this.#metrics.recordRemovedObjects(deleted, 'mined'); - this.#metrics.recordAddedObjects(added, 'pending'); + this.#metrics.recordAddedObjects(markedAsPending, 'pending'); + this.#metrics.recordRemovedObjects(markedAsPending, 'mined'); }); } public getPendingTxHashes(): TxHash[] { - return Array.from(this.#pendingTxs.entries()).map(x => TxHash.fromString(x)); + return Array.from(this.#pendingTxPriorityToHash.values({ reverse: true })).map(x => TxHash.fromString(x)); } public getMinedTxHashes(): [TxHash, number][] { - return Array.from(this.#minedTxs.entries()).map(([txHash, blockNumber]) => [ + return Array.from(this.#minedTxHashToBlock.entries()).map(([txHash, blockNumber]) => [ TxHash.fromString(txHash), blockNumber, ]); @@ -95,10 +101,10 @@ export class AztecKVTxPool implements TxPool { public getTxStatus(txHash: TxHash): 'pending' | 'mined' | undefined { const key = txHash.toString(); - if (this.#pendingTxs.has(key)) { - return 'pending'; - } else if (this.#minedTxs.has(key)) { + if (this.#minedTxHashToBlock.has(key)) { return 'mined'; + } else if (this.#txs.has(key)) { + return 'pending'; } else { return undefined; } @@ -120,11 +126,10 @@ export class AztecKVTxPool implements TxPool { * @returns Empty promise. */ public addTxs(txs: Tx[]): Promise { - const txHashes = txs.map(tx => tx.getTxHash()); return this.#store.transaction(() => { let pendingCount = 0; - for (const [i, tx] of txs.entries()) { - const txHash = txHashes[i]; + for (const tx of txs) { + const txHash = tx.getTxHash(); this.#log.verbose(`Adding tx ${txHash.toString()} to pool`, { eventName: 'tx-added-to-pool', ...tx.getStats(), @@ -132,10 +137,11 @@ export class AztecKVTxPool implements TxPool { const key = txHash.toString(); void this.#txs.set(key, tx.toBuffer()); - if (!this.#minedTxs.has(key)) { + + if (!this.#minedTxHashToBlock.has(key)) { pendingCount++; // REFACTOR: Use an lmdb conditional write to avoid race conditions with this write tx - void this.#pendingTxs.add(key); + void this.#pendingTxPriorityToHash.set(getPendingTxPriority(tx), key); this.#metrics.recordSize(tx); } } @@ -150,20 +156,27 @@ export class AztecKVTxPool implements TxPool { * @returns The number of transactions that was deleted from the pool. */ public deleteTxs(txHashes: TxHash[]): Promise { + let pendingDeleted = 0; + let minedDeleted = 0; + return this.#store.transaction(() => { - let pendingDeleted = 0; - let minedDeleted = 0; for (const hash of txHashes) { const key = hash.toString(); - void this.#txs.delete(key); - if (this.#pendingTxs.has(key)) { - pendingDeleted++; - void this.#pendingTxs.delete(key); - } + const tx = this.getTxByHash(hash); + + if (tx) { + const fee = getPendingTxPriority(tx); + void this.#pendingTxPriorityToHash.deleteValue(fee, key); + + const isMined = this.#minedTxHashToBlock.has(key); + if (isMined) { + minedDeleted++; + } else { + pendingDeleted++; + } - if (this.#minedTxs.has(key)) { - minedDeleted++; - void this.#minedTxs.delete(key); + void this.#txs.delete(key); + void this.#minedTxHashToBlock.delete(key); } } diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/memory_tx_pool.ts b/yarn-project/p2p/src/mem_pools/tx_pool/memory_tx_pool.ts index c727ad070981..485dd86b1b01 100644 --- a/yarn-project/p2p/src/mem_pools/tx_pool/memory_tx_pool.ts +++ b/yarn-project/p2p/src/mem_pools/tx_pool/memory_tx_pool.ts @@ -4,6 +4,7 @@ import { createLogger } from '@aztec/foundation/log'; import { type TelemetryClient } from '@aztec/telemetry-client'; import { PoolInstrumentation, PoolName } from '../instrumentation.js'; +import { getPendingTxPriority } from './priority.js'; import { type TxPool } from './tx_pool.js'; /** @@ -68,7 +69,10 @@ export class InMemoryTxPool implements TxPool { } public getPendingTxHashes(): TxHash[] { - return Array.from(this.pendingTxs).map(x => TxHash.fromBigInt(x)); + return this.getAllTxs() + .sort((tx1, tx2) => -getPendingTxPriority(tx1).localeCompare(getPendingTxPriority(tx2))) + .map(tx => tx.getTxHash()) + .filter(txHash => this.pendingTxs.has(txHash.toBigInt())); } public getMinedTxHashes(): [TxHash, number][] { diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/priority.ts b/yarn-project/p2p/src/mem_pools/tx_pool/priority.ts new file mode 100644 index 000000000000..dfbdfc45f171 --- /dev/null +++ b/yarn-project/p2p/src/mem_pools/tx_pool/priority.ts @@ -0,0 +1,13 @@ +import { type Tx } from '@aztec/circuit-types'; +import { Buffer32 } from '@aztec/foundation/buffer'; + +/** + * Returns a string representing the priority of a tx. + * Txs with a higher priority value are returned first when retrieving pending tx hashes. + * We currently use the sum of the priority fees for the tx for this value, represented as hex. + */ +export function getPendingTxPriority(tx: Tx): string { + const priorityFees = tx.getGasSettings().maxPriorityFeesPerGas; + const totalFees = priorityFees.feePerDaGas.toBigInt() + priorityFees.feePerL2Gas.toBigInt(); + return Buffer32.fromBigInt(totalFees).toString(); +} diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/tx_pool.ts b/yarn-project/p2p/src/mem_pools/tx_pool/tx_pool.ts index 01511951f8a4..173565c8293c 100644 --- a/yarn-project/p2p/src/mem_pools/tx_pool/tx_pool.ts +++ b/yarn-project/p2p/src/mem_pools/tx_pool/tx_pool.ts @@ -49,7 +49,7 @@ export interface TxPool { getAllTxHashes(): TxHash[]; /** - * Gets the hashes of pending transactions currently in the tx pool. + * Gets the hashes of pending transactions currently in the tx pool sorted by priority (see getPendingTxPriority). * @returns An array of pending transaction hashes found in the tx pool. */ getPendingTxHashes(): TxHash[]; diff --git a/yarn-project/p2p/src/mem_pools/tx_pool/tx_pool_test_suite.ts b/yarn-project/p2p/src/mem_pools/tx_pool/tx_pool_test_suite.ts index 35af12fbd68b..f3c92e688b84 100644 --- a/yarn-project/p2p/src/mem_pools/tx_pool/tx_pool_test_suite.ts +++ b/yarn-project/p2p/src/mem_pools/tx_pool/tx_pool_test_suite.ts @@ -1,4 +1,6 @@ -import { mockTx } from '@aztec/circuit-types'; +import { type Tx, mockTx } from '@aztec/circuit-types'; +import { GasFees } from '@aztec/circuits.js'; +import { unfreeze } from '@aztec/foundation/types'; import { type TxPool } from './tx_pool.js'; @@ -101,4 +103,22 @@ export function describeTxPool(getTxPool: () => TxPool) { expect(poolTxHashes).toHaveLength(3); expect(poolTxHashes).toEqual(expect.arrayContaining([tx1.getTxHash(), tx2.getTxHash(), tx3.getTxHash()])); }); + + it('Returns pending tx hashes sorted by priority', async () => { + const withPriorityFee = (tx: Tx, fee: number) => { + unfreeze(tx.data.constants.txContext.gasSettings).maxPriorityFeesPerGas = new GasFees(fee, fee); + return tx; + }; + + const tx1 = withPriorityFee(mockTx(0), 1000); + const tx2 = withPriorityFee(mockTx(1), 100); + const tx3 = withPriorityFee(mockTx(2), 200); + const tx4 = withPriorityFee(mockTx(3), 3000); + + await pool.addTxs([tx1, tx2, tx3, tx4]); + + const poolTxHashes = pool.getPendingTxHashes(); + expect(poolTxHashes).toHaveLength(4); + expect(poolTxHashes).toEqual([tx4, tx1, tx3, tx2].map(tx => tx.getTxHash())); + }); } From b5d51ebe8c1c9b0f4104f8f04995018bea2b701a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bene=C5=A1?= Date: Wed, 8 Jan 2025 09:30:07 -0600 Subject: [PATCH 14/14] feat: PXE db contract store (#10867) --- cspell.json | 3 + .../aztec-nr/aztec/src/note/note_interface.nr | 2 +- .../aztec-nr/aztec/src/oracle/mod.nr | 1 + .../aztec-nr/aztec/src/oracle/pxe_db.nr | 83 +++++++++++++++++++ .../contracts/test_contract/src/main.nr | 18 ++-- .../end-to-end/src/e2e_pxe_db.test.ts | 50 +++++++++++ .../pxe/src/database/kv_pxe_database.ts | 30 +++++++ yarn-project/pxe/src/database/pxe_database.ts | 18 ++++ .../src/database/pxe_database_test_suite.ts | 61 ++++++++++++++ .../pxe/src/simulator_oracle/index.ts | 22 +++++ yarn-project/simulator/src/acvm/acvm.ts | 21 ++++- .../simulator/src/acvm/oracle/oracle.ts | 34 ++++++++ .../simulator/src/acvm/oracle/typed_oracle.ts | 8 ++ .../simulator/src/client/db_oracle.ts | 20 ++++- .../simulator/src/client/view_data_oracle.ts | 20 +++++ yarn-project/txe/src/oracle/txe_oracle.ts | 39 ++++++++- .../txe/src/txe_service/txe_service.ts | 31 +++++++ 17 files changed, 450 insertions(+), 11 deletions(-) create mode 100644 noir-projects/aztec-nr/aztec/src/oracle/pxe_db.nr create mode 100644 yarn-project/end-to-end/src/e2e_pxe_db.test.ts diff --git a/cspell.json b/cspell.json index 9acd495666a6..69fe7cf7dce1 100644 --- a/cspell.json +++ b/cspell.json @@ -77,6 +77,7 @@ "demonomorphizes", "demonomorphizing", "deregistration", + "desynchronization", "devex", "devnet", "devs", @@ -176,6 +177,7 @@ "noirc", "noirup", "nullifer", + "Nullifiable", "offchain", "onchain", "opentelemetry", @@ -276,6 +278,7 @@ "unexclude", "unexcluded", "unfinalised", + "unnullify", "unprefixed", "unshift", "unshifted", diff --git a/noir-projects/aztec-nr/aztec/src/note/note_interface.nr b/noir-projects/aztec-nr/aztec/src/note/note_interface.nr index 9e96ac4edb84..d3f15cced885 100644 --- a/noir-projects/aztec-nr/aztec/src/note/note_interface.nr +++ b/noir-projects/aztec-nr/aztec/src/note/note_interface.nr @@ -1,6 +1,6 @@ use crate::context::PrivateContext; use crate::note::note_header::NoteHeader; -use dep::protocol_types::traits::{Empty, Serialize}; +use dep::protocol_types::traits::Empty; pub trait NoteProperties { fn properties() -> T; diff --git a/noir-projects/aztec-nr/aztec/src/oracle/mod.nr b/noir-projects/aztec-nr/aztec/src/oracle/mod.nr index 7fbf9f64b8b0..8e9d8e1399ec 100644 --- a/noir-projects/aztec-nr/aztec/src/oracle/mod.nr +++ b/noir-projects/aztec-nr/aztec/src/oracle/mod.nr @@ -19,6 +19,7 @@ pub mod block_header; pub mod notes; pub mod storage; pub mod logs; +pub mod pxe_db; pub mod returns; // debug_log oracle is used by both noir-protocol-circuits and this crate and for this reason we just re-export it diff --git a/noir-projects/aztec-nr/aztec/src/oracle/pxe_db.nr b/noir-projects/aztec-nr/aztec/src/oracle/pxe_db.nr new file mode 100644 index 000000000000..0bcf6fe5a9e4 --- /dev/null +++ b/noir-projects/aztec-nr/aztec/src/oracle/pxe_db.nr @@ -0,0 +1,83 @@ +use protocol_types::{address::AztecAddress, traits::{Deserialize, Serialize}}; + +#[oracle(store)] +unconstrained fn store_oracle( + contract_address: AztecAddress, + key: Field, + values: [Field; N], +) {} + +/// Store a value of type T that implements Serialize in local PXE database. The data is scoped to the current +/// contract. If the data under the key already exists, it is overwritten. +pub unconstrained fn store(contract_address: AztecAddress, key: Field, value: T) +where + T: Serialize, +{ + let serialized = value.serialize(); + store_oracle(contract_address, key, serialized); +} + +/// Load data from local PXE database. We pass in `t_size` as a parameter to have the information of how many fields +/// we need to pad if the key does not exist (note that the actual response size is `t_size + 1` as the Option prefixes +/// the response with a boolean indicating if the data exists). +/// +/// Note that we need to return an Option<[Field; N]> as we cannot return an Option directly. This is because then +/// the shape of T would affect the expected oracle response (e.g. if we were returning a struct of 3 u32 values +/// then the expected response shape would be 3 single items. If instead we had a struct containing +/// `u32, [Field;10], u32`, then the expected shape would be single, array, single.). +#[oracle(load)] +unconstrained fn load_oracle( + contract_address: AztecAddress, + key: Field, + t_size: u32, +) -> Option<[Field; N]> {} + +/// Load a value of type T that implements Deserialize from local PXE database. The data is scoped to the current +/// contract. If the key does not exist, Option::none() is returned. +pub unconstrained fn load(contract_address: AztecAddress, key: Field) -> Option +where + T: Deserialize, +{ + let serialized_option = load_oracle::(contract_address, key, N); + serialized_option.map(|arr| Deserialize::deserialize(arr)) +} + +mod test { + use crate::{ + oracle::{pxe_db::{load, store}, random::random}, + test::{helpers::test_environment::TestEnvironment, mocks::mock_struct::MockStruct}, + }; + + #[test] + unconstrained fn stores_loads_and_overwrites_data() { + let env = TestEnvironment::new(); + + let contract_address = env.contract_address(); + let key = random(); + let value = MockStruct::new(5, 6); + store(contract_address, key, value); + + let loaded_value: MockStruct = load(contract_address, key).unwrap(); + + assert(loaded_value == value, "Stored and loaded values should be equal"); + + // Now we test that the value gets overwritten correctly. + let new_value = MockStruct::new(7, 8); + store(contract_address, key, new_value); + + let loaded_value: MockStruct = load(contract_address, key).unwrap(); + + assert(loaded_value == new_value, "Stored and loaded values should be equal"); + } + + #[test] + unconstrained fn load_non_existent_key() { + let env = TestEnvironment::new(); + + let contract_address = env.contract_address(); + let key = random(); + let loaded_value: Option = load(contract_address, key); + + assert(loaded_value == Option::none(), "Value should not exist"); + } +} diff --git a/noir-projects/noir-contracts/contracts/test_contract/src/main.nr b/noir-projects/noir-contracts/contracts/test_contract/src/main.nr index ed3918d1f68b..e3394847bf22 100644 --- a/noir-projects/noir-contracts/contracts/test_contract/src/main.nr +++ b/noir-projects/noir-contracts/contracts/test_contract/src/main.nr @@ -32,7 +32,8 @@ contract Test { note_getter::{get_notes, view_notes}, note_getter_options::NoteStatus, }, - oracle::random::random, + oracle::pxe_db, + test::mocks::mock_struct::MockStruct, utils::comparison::Comparator, }; use dep::token_portal_content_hash_lib::{ @@ -458,16 +459,21 @@ contract Test { constant.value } + unconstrained fn store_in_pxe_db(key: Field, arbitrary_struct: MockStruct) { + pxe_db::store(context.this_address(), key, arbitrary_struct); + } + + unconstrained fn load_from_pxe_db(key: Field) -> pub [Field; 2] { + let maybe_arbitrary_struct: Option = pxe_db::load(context.this_address(), key); + let arbitrary_struct = maybe_arbitrary_struct.unwrap_or(MockStruct::new(0, 0)); + arbitrary_struct.serialize() + } + #[private] fn test_nullifier_key_freshness(address: AztecAddress, public_nullifying_key: Point) { assert_eq(get_public_keys(address).npk_m.inner, public_nullifying_key); } - // Purely exists for testing - unconstrained fn get_random(kinda_seed: Field) -> pub Field { - kinda_seed * random() - } - pub struct DummyNote { amount: Field, secret_hash: Field, diff --git a/yarn-project/end-to-end/src/e2e_pxe_db.test.ts b/yarn-project/end-to-end/src/e2e_pxe_db.test.ts new file mode 100644 index 000000000000..8c8430085c74 --- /dev/null +++ b/yarn-project/end-to-end/src/e2e_pxe_db.test.ts @@ -0,0 +1,50 @@ +import { Fr, type Wallet } from '@aztec/aztec.js'; +import { TestContract } from '@aztec/noir-contracts.js/Test'; + +import { jest } from '@jest/globals'; + +import { setup } from './fixtures/utils.js'; + +const TIMEOUT = 120_000; + +// TODO(#10724): Nuke this once the linked issue is implemented (then the code will be well-tested). There is also +// a TXE test in `pxe_db.nr` but I decided to keep this ugly test around as it tests the PXE oracle callback handler +// (which is not tested by the TXE test). Dont't forget to remove `store_in_pxe_db` and `load_from_pxe_db` from +// the test contract when removing this test. +describe('PXE db', () => { + jest.setTimeout(TIMEOUT); + + let teardown: () => Promise; + + let testContract: TestContract; + + beforeAll(async () => { + let wallet: Wallet; + ({ teardown, wallet } = await setup(1)); + testContract = await TestContract.deploy(wallet).send().deployed(); + }); + + afterAll(() => teardown()); + + it('stores and loads data', async () => { + // In this test we feed arbitrary struct to a test contract, the test contract stores it in the PXE db and then + // we load it back. + const arbitraryStruct = { + a: Fr.random(), + b: Fr.random(), + }; + + const key = 6n; + await testContract.methods.store_in_pxe_db(key, arbitraryStruct).simulate(); + + // Now we try to load the data back from the PXE db. + const expectedReturnValue = [arbitraryStruct.a, arbitraryStruct.b].map(v => v.toBigInt()); + expect(await testContract.methods.load_from_pxe_db(key).simulate()).toEqual(expectedReturnValue); + }); + + it('handles non-existent data', async () => { + // In this test we try to load a key from the PXE db that does not exist. We should get an array of zeros. + const key = 7n; + expect(await testContract.methods.load_from_pxe_db(key).simulate()).toEqual([0n, 0n]); + }); +}); diff --git a/yarn-project/pxe/src/database/kv_pxe_database.ts b/yarn-project/pxe/src/database/kv_pxe_database.ts index ccff64cb2291..4c73644ca975 100644 --- a/yarn-project/pxe/src/database/kv_pxe_database.ts +++ b/yarn-project/pxe/src/database/kv_pxe_database.ts @@ -12,6 +12,7 @@ import { type ContractArtifact, FunctionSelector, FunctionType } from '@aztec/fo import { toBufferBE } from '@aztec/foundation/bigint-buffer'; import { Fr } from '@aztec/foundation/fields'; import { toArray } from '@aztec/foundation/iterable'; +import { type LogFn, createDebugOnlyLogger } from '@aztec/foundation/log'; import { type AztecAsyncArray, type AztecAsyncKVStore, @@ -63,6 +64,11 @@ export class KVPxeDatabase implements PxeDatabase { #taggingSecretIndexesForSenders: AztecAsyncMap; #taggingSecretIndexesForRecipients: AztecAsyncMap; + // Arbitrary data stored by contracts. Key is computed as `${contractAddress}:${key}` + #contractStore: AztecAsyncMap; + + debug: LogFn; + protected constructor(private db: AztecAsyncKVStore) { this.#db = db; @@ -100,6 +106,10 @@ export class KVPxeDatabase implements PxeDatabase { this.#taggingSecretIndexesForSenders = db.openMap('tagging_secret_indexes_for_senders'); this.#taggingSecretIndexesForRecipients = db.openMap('tagging_secret_indexes_for_recipients'); + + this.#contractStore = db.openMap('contract_store'); + + this.debug = createDebugOnlyLogger('aztec:kv-pxe-database'); } public static async create(db: AztecAsyncKVStore): Promise { @@ -611,4 +621,24 @@ export class KVPxeDatabase implements PxeDatabase { await Promise.all(senders.map(sender => this.#taggingSecretIndexesForSenders.delete(sender))); }); } + + async store(contract: AztecAddress, key: Fr, values: Fr[]): Promise { + const dataKey = `${contract.toString()}:${key.toString()}`; + const dataBuffer = Buffer.concat(values.map(value => value.toBuffer())); + await this.#contractStore.set(dataKey, dataBuffer); + } + + async load(contract: AztecAddress, key: Fr): Promise { + const dataKey = `${contract.toString()}:${key.toString()}`; + const dataBuffer = await this.#contractStore.getAsync(dataKey); + if (!dataBuffer) { + this.debug(`Data not found for contract ${contract.toString()} and key ${key.toString()}`); + return null; + } + const values: Fr[] = []; + for (let i = 0; i < dataBuffer.length; i += Fr.SIZE_IN_BYTES) { + values.push(Fr.fromBuffer(dataBuffer.subarray(i, i + Fr.SIZE_IN_BYTES))); + } + return values; + } } diff --git a/yarn-project/pxe/src/database/pxe_database.ts b/yarn-project/pxe/src/database/pxe_database.ts index 8a8b2f8cd61a..cc8496aaadfc 100644 --- a/yarn-project/pxe/src/database/pxe_database.ts +++ b/yarn-project/pxe/src/database/pxe_database.ts @@ -213,4 +213,22 @@ export interface PxeDatabase extends ContractArtifactDatabase, ContractInstanceD * is also required to deal with chain reorgs. */ resetNoteSyncData(): Promise; + + /** + * Used by contracts during execution to store arbitrary data in the local PXE database. The data is siloed/scoped + * to a specific `contract`. + * @param contract - An address of a contract that is requesting to store the data. + * @param key - A field element representing the key to store the data under. + * @param values - An array of field elements representing the data to store. + */ + store(contract: AztecAddress, key: Fr, values: Fr[]): Promise; + + /** + * Used by contracts during execution to load arbitrary data from the local PXE database. The data is siloed/scoped + * to a specific `contract`. + * @param contract - An address of a contract that is requesting to load the data. + * @param key - A field element representing the key under which to load the data.. + * @returns An array of field elements representing the stored data or `null` if no data is stored under the key. + */ + load(contract: AztecAddress, key: Fr): Promise; } diff --git a/yarn-project/pxe/src/database/pxe_database_test_suite.ts b/yarn-project/pxe/src/database/pxe_database_test_suite.ts index 78c7cf2f110d..1a1a586c78d2 100644 --- a/yarn-project/pxe/src/database/pxe_database_test_suite.ts +++ b/yarn-project/pxe/src/database/pxe_database_test_suite.ts @@ -405,5 +405,66 @@ export function describePxeDatabase(getDatabase: () => PxeDatabase) { await expect(database.getContractInstance(address)).resolves.toEqual(instance); }); }); + + describe('contract store', () => { + let contract: AztecAddress; + + beforeEach(() => { + // Setup mock contract address + contract = AztecAddress.random(); + }); + + it('stores and loads a single value', async () => { + const key = new Fr(1); + const values = [new Fr(42)]; + + await database.store(contract, key, values); + const result = await database.load(contract, key); + expect(result).toEqual(values); + }); + + it('stores and loads multiple values', async () => { + const key = new Fr(1); + const values = [new Fr(42), new Fr(43), new Fr(44)]; + + await database.store(contract, key, values); + const result = await database.load(contract, key); + expect(result).toEqual(values); + }); + + it('overwrites existing values', async () => { + const key = new Fr(1); + const initialValues = [new Fr(42)]; + const newValues = [new Fr(100)]; + + await database.store(contract, key, initialValues); + await database.store(contract, key, newValues); + + const result = await database.load(contract, key); + expect(result).toEqual(newValues); + }); + + it('stores values for different contracts independently', async () => { + const anotherContract = AztecAddress.random(); + const key = new Fr(1); + const values1 = [new Fr(42)]; + const values2 = [new Fr(100)]; + + await database.store(contract, key, values1); + await database.store(anotherContract, key, values2); + + const result1 = await database.load(contract, key); + const result2 = await database.load(anotherContract, key); + + expect(result1).toEqual(values1); + expect(result2).toEqual(values2); + }); + + it('returns null for non-existent keys', async () => { + const key = Fr.random(); + const result = await database.load(contract, key); + expect(result).toBeNull(); + }); + }); }); } diff --git a/yarn-project/pxe/src/simulator_oracle/index.ts b/yarn-project/pxe/src/simulator_oracle/index.ts index 137b4137d955..61c578ec8bac 100644 --- a/yarn-project/pxe/src/simulator_oracle/index.ts +++ b/yarn-project/pxe/src/simulator_oracle/index.ts @@ -666,4 +666,26 @@ export class SimulatorOracle implements DBOracle { }); } } + + /** + * Used by contracts during execution to store arbitrary data in the local PXE database. The data is siloed/scoped + * to a specific `contract`. + * @param contract - An address of a contract that is requesting to store the data. + * @param key - A field element representing the key to store the data under. + * @param values - An array of field elements representing the data to store. + */ + store(contract: AztecAddress, key: Fr, values: Fr[]): Promise { + return this.db.store(contract, key, values); + } + + /** + * Used by contracts during execution to load arbitrary data from the local PXE database. The data is siloed/scoped + * to a specific `contract`. + * @param contract - An address of a contract that is requesting to load the data. + * @param key - A field element representing the key under which to load the data.. + * @returns An array of field elements representing the stored data or `null` if no data is stored under the key. + */ + load(contract: AztecAddress, key: Fr): Promise { + return this.db.load(contract, key); + } } diff --git a/yarn-project/simulator/src/acvm/acvm.ts b/yarn-project/simulator/src/acvm/acvm.ts index 600c4c7a8e54..7e0c18395cd7 100644 --- a/yarn-project/simulator/src/acvm/acvm.ts +++ b/yarn-project/simulator/src/acvm/acvm.ts @@ -18,7 +18,15 @@ import { type ORACLE_NAMES } from './oracle/index.js'; */ type ACIRCallback = Record< ORACLE_NAMES, - (...args: ForeignCallInput[]) => void | Promise | ForeignCallOutput | Promise + ( + ...args: ForeignCallInput[] + ) => + | void + | Promise + | ForeignCallOutput + | ForeignCallOutput[] + | Promise + | Promise >; /** @@ -56,7 +64,16 @@ export async function acvm( } const result = await oracleFunction.call(callback, ...args); - return typeof result === 'undefined' ? [] : [result]; + + if (typeof result === 'undefined') { + return []; + } else if (result instanceof Array && !result.every(item => typeof item === 'string')) { + // We are dealing with a nested array which means that we do not need it wrap it in another array as to have + // the nested array structure it is already "wrapped". + return result; + } else { + return [result] as ForeignCallOutput[]; + } } catch (err) { let typedError: Error; if (err instanceof Error) { diff --git a/yarn-project/simulator/src/acvm/oracle/oracle.ts b/yarn-project/simulator/src/acvm/oracle/oracle.ts index 254b91fb3abb..9aa79e9a2880 100644 --- a/yarn-project/simulator/src/acvm/oracle/oracle.ts +++ b/yarn-project/simulator/src/acvm/oracle/oracle.ts @@ -2,12 +2,15 @@ import { MerkleTreeId, UnencryptedL2Log } from '@aztec/circuit-types'; import { FunctionSelector, NoteSelector } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr } from '@aztec/foundation/fields'; +import { createLogger } from '@aztec/foundation/log'; import { type ACVMField } from '../acvm_types.js'; import { frToBoolean, frToNumber, fromACVMField } from '../deserialize.js'; import { toACVMField } from '../serialize.js'; import { type TypedOracle } from './typed_oracle.js'; +const logger = createLogger('simulator:acvm:oracle'); + /** * A data source that has all the apis required by Aztec.nr. */ @@ -393,4 +396,35 @@ export class Oracle { async syncNotes() { await this.typedOracle.syncNotes(); } + + async store([contract]: ACVMField[], [key]: ACVMField[], values: ACVMField[]) { + const processedContract = AztecAddress.fromField(fromACVMField(contract)); + const processedKey = fromACVMField(key); + const processedValues = values.map(fromACVMField); + logger.debug(`Storing data for key ${processedKey} in contract ${processedContract}. Data: [${processedValues}]`); + await this.typedOracle.store(processedContract, processedKey, processedValues); + } + + /** + * Load data from pxe db. + * @param contract - The contract address. + * @param key - The key to load. + * @param tSize - The size of the serialized object to return. + * @returns The data found flag and the serialized object concatenated in one array. + */ + async load([contract]: ACVMField[], [key]: ACVMField[], [tSize]: ACVMField[]): Promise<(ACVMField | ACVMField[])[]> { + const processedContract = AztecAddress.fromField(fromACVMField(contract)); + const processedKey = fromACVMField(key); + const values = await this.typedOracle.load(processedContract, processedKey); + if (values === null) { + // No data was found so we set the data-found flag to 0 and we pad with zeros get the correct return size. + const processedTSize = frToNumber(fromACVMField(tSize)); + logger.debug(`No data found for key ${processedKey} in contract ${processedContract}`); + return [toACVMField(0), Array(processedTSize).fill(toACVMField(0))]; + } else { + // Data was found so we set the data-found flag to 1 and return it along with the data. + logger.debug(`Returning data for key ${processedKey} in contract ${processedContract}. Data: [${values}]`); + return [toACVMField(1), values.map(toACVMField)]; + } + } } diff --git a/yarn-project/simulator/src/acvm/oracle/typed_oracle.ts b/yarn-project/simulator/src/acvm/oracle/typed_oracle.ts index d5c461bd3c2b..21085bd6ab85 100644 --- a/yarn-project/simulator/src/acvm/oracle/typed_oracle.ts +++ b/yarn-project/simulator/src/acvm/oracle/typed_oracle.ts @@ -248,4 +248,12 @@ export abstract class TypedOracle { syncNotes(): Promise { throw new OracleMethodNotAvailableError('syncNotes'); } + + store(_contract: AztecAddress, _key: Fr, _values: Fr[]): Promise { + throw new OracleMethodNotAvailableError('store'); + } + + load(_contract: AztecAddress, _key: Fr): Promise { + throw new OracleMethodNotAvailableError('load'); + } } diff --git a/yarn-project/simulator/src/client/db_oracle.ts b/yarn-project/simulator/src/client/db_oracle.ts index d53022e49e28..65cd0108f38b 100644 --- a/yarn-project/simulator/src/client/db_oracle.ts +++ b/yarn-project/simulator/src/client/db_oracle.ts @@ -224,7 +224,7 @@ export interface DBOracle extends CommitmentsDB { ): Promise; /** - * Synchronizes the logs tagged with the recipient's address and all the senders in the addressbook. + * Synchronizes the logs tagged with the recipient's address and all the senders in the address book. * Returns the unsynched logs and updates the indexes of the secrets used to tag them until there are no more logs to sync. * @param contractAddress - The address of the contract that the logs are tagged for * @param recipient - The address of the recipient @@ -247,4 +247,22 @@ export interface DBOracle extends CommitmentsDB { * Removes all of a contract's notes that have been nullified from the note database. */ removeNullifiedNotes(contractAddress: AztecAddress): Promise; + + /** + * Used by contracts during execution to store arbitrary data in the local PXE database. The data is siloed/scoped + * to a specific `contract`. + * @param contract - An address of a contract that is requesting to store the data. + * @param key - A field element representing the key to store the data under. + * @param values - An array of field elements representing the data to store. + */ + store(contract: AztecAddress, key: Fr, values: Fr[]): Promise; + + /** + * Used by contracts during execution to load arbitrary data from the local PXE database. The data is siloed/scoped + * to a specific `contract`. + * @param contract - An address of a contract that is requesting to load the data. + * @param key - A field element representing the key under which to load the data.. + * @returns An array of field elements representing the stored data or `null` if no data is stored under the key. + */ + load(contract: AztecAddress, key: Fr): Promise; } diff --git a/yarn-project/simulator/src/client/view_data_oracle.ts b/yarn-project/simulator/src/client/view_data_oracle.ts index 8f561371b4dd..869ee86984e0 100644 --- a/yarn-project/simulator/src/client/view_data_oracle.ts +++ b/yarn-project/simulator/src/client/view_data_oracle.ts @@ -325,4 +325,24 @@ export class ViewDataOracle extends TypedOracle { await this.db.removeNullifiedNotes(this.contractAddress); } + + public override store(contract: AztecAddress, key: Fr, values: Fr[]): Promise { + if (!contract.equals(this.contractAddress)) { + // TODO(#10727): instead of this check check that this.contractAddress is allowed to process notes for contract + throw new Error( + `Contract address ${contract} does not match the oracle's contract address ${this.contractAddress}`, + ); + } + return this.db.store(this.contractAddress, key, values); + } + + public override load(contract: AztecAddress, key: Fr): Promise { + if (!contract.equals(this.contractAddress)) { + // TODO(#10727): instead of this check check that this.contractAddress is allowed to process notes for contract + throw new Error( + `Contract address ${contract} does not match the oracle's contract address ${this.contractAddress}`, + ); + } + return this.db.load(this.contractAddress, key); + } } diff --git a/yarn-project/txe/src/oracle/txe_oracle.ts b/yarn-project/txe/src/oracle/txe_oracle.ts index 608263ea150b..07965dbce20e 100644 --- a/yarn-project/txe/src/oracle/txe_oracle.ts +++ b/yarn-project/txe/src/oracle/txe_oracle.ts @@ -58,7 +58,7 @@ import { import { AztecAddress } from '@aztec/foundation/aztec-address'; import { poseidon2Hash } from '@aztec/foundation/crypto'; import { Fr } from '@aztec/foundation/fields'; -import { type Logger, applyStringFormatting } from '@aztec/foundation/log'; +import { type LogFn, type Logger, applyStringFormatting, createDebugOnlyLogger } from '@aztec/foundation/log'; import { Timer } from '@aztec/foundation/timer'; import { type KeyStore } from '@aztec/key-store'; import { ContractDataOracle, SimulatorOracle, enrichPublicSimulationError } from '@aztec/pxe'; @@ -116,6 +116,8 @@ export class TXE implements TypedOracle { private node = new TXENode(this.blockNumber); + debug: LogFn; + constructor( private logger: Logger, private trees: MerkleTrees, @@ -129,6 +131,8 @@ export class TXE implements TypedOracle { // Default msg_sender (for entrypoints) is now Fr.max_value rather than 0 addr (see #7190 & #7404) this.msgSender = AztecAddress.fromField(Fr.MAX_FIELD_VALUE); this.simulatorOracle = new SimulatorOracle(this.contractDataOracle, txeDatabase, keyStore, this.node); + + this.debug = createDebugOnlyLogger('aztec:kv-pxe-database'); } // Utils @@ -1051,4 +1055,37 @@ export class TXE implements TypedOracle { return preimage.value; } + + /** + * Used by contracts during execution to store arbitrary data in the local PXE database. The data is siloed/scoped + * to a specific `contract`. + * @param contract - The contract address to store the data under. + * @param key - A field element representing the key to store the data under. + * @param values - An array of field elements representing the data to store. + */ + store(contract: AztecAddress, key: Fr, values: Fr[]): Promise { + if (!contract.equals(this.contractAddress)) { + // TODO(#10727): instead of this check check that this.contractAddress is allowed to process notes for contract + throw new Error( + `Contract address ${contract} does not match the oracle's contract address ${this.contractAddress}`, + ); + } + return this.txeDatabase.store(this.contractAddress, key, values); + } + + /** + * Used by contracts during execution to load arbitrary data from the local PXE database. The data is siloed/scoped + * to a specific `contract`. + * @param contract - The contract address to load the data from. + * @param key - A field element representing the key under which to load the data.. + * @returns An array of field elements representing the stored data or `null` if no data is stored under the key. + */ + load(contract: AztecAddress, key: Fr): Promise { + if (!contract.equals(this.contractAddress)) { + // TODO(#10727): instead of this check check that this.contractAddress is allowed to process notes for contract + this.debug(`Data not found for contract ${contract.toString()} and key ${key.toString()}`); + return Promise.resolve(null); + } + return this.txeDatabase.load(this.contractAddress, key); + } } diff --git a/yarn-project/txe/src/txe_service/txe_service.ts b/yarn-project/txe/src/txe_service/txe_service.ts index f372c0ac5ecc..983f6f27df7f 100644 --- a/yarn-project/txe/src/txe_service/txe_service.ts +++ b/yarn-project/txe/src/txe_service/txe_service.ts @@ -598,6 +598,37 @@ export class TXEService { return toForeignCallResult([]); } + async store(contract: ForeignCallSingle, key: ForeignCallSingle, values: ForeignCallArray) { + const processedContract = AztecAddress.fromField(fromSingle(contract)); + const processedKey = fromSingle(key); + const processedValues = fromArray(values); + await this.typedOracle.store(processedContract, processedKey, processedValues); + return toForeignCallResult([]); + } + + /** + * Load data from pxe db. + * @param contract - The contract address. + * @param key - The key to load. + * @param tSize - The size of the serialized object to return. + * @returns The data found flag and the serialized object concatenated in one array. + */ + async load(contract: ForeignCallSingle, key: ForeignCallSingle, tSize: ForeignCallSingle) { + const processedContract = AztecAddress.fromField(fromSingle(contract)); + const processedKey = fromSingle(key); + const values = await this.typedOracle.load(processedContract, processedKey); + // We are going to return a Noir Option struct to represent the possibility of null values. Options are a struct + // with two fields: `some` (a boolean) and `value` (a field array in this case). + if (values === null) { + // No data was found so we set `some` to 0 and pad `value` with zeros get the correct return size. + const processedTSize = fromSingle(tSize).toNumber(); + return toForeignCallResult([toSingle(new Fr(0)), toArray(Array(processedTSize).fill(new Fr(0)))]); + } else { + // Data was found so we set `some` to 1 and return it along with `value`. + return toForeignCallResult([toSingle(new Fr(1)), toArray(values)]); + } + } + // AVM opcodes avmOpcodeEmitUnencryptedLog(_message: ForeignCallArray) {