From 123309c89244762a2f7bbb446faea9c6518a2bb8 Mon Sep 17 00:00:00 2001 From: Alex Gherghisan Date: Tue, 3 Dec 2024 20:15:39 +0000 Subject: [PATCH] chore: logs --- yarn-project/archiver/src/archiver/archiver.ts | 5 ++++- yarn-project/aztec.js/src/contract/deploy_method.ts | 4 +++- yarn-project/aztec.js/src/deployment/register_class.ts | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/yarn-project/archiver/src/archiver/archiver.ts b/yarn-project/archiver/src/archiver/archiver.ts index 94c664d0f114..5e093a13588c 100644 --- a/yarn-project/archiver/src/archiver/archiver.ts +++ b/yarn-project/archiver/src/archiver/archiver.ts @@ -827,8 +827,11 @@ class ArchiverStoreHelper .filter(log => ContractClassRegisteredEvent.isContractClassRegisteredEvent(log.data)) .map(log => ContractClassRegisteredEvent.fromLog(log.data)) .map(e => e.toContractClassPublic()); + this.#log.info( + `Block ${blockNum} has ${allLogs.length} logs, of which ${contractClasses} contract class registration events`, + ); if (contractClasses.length > 0) { - contractClasses.forEach(c => this.#log.verbose(`Registering contract class ${c.id.toString()}`)); + contractClasses.forEach(c => this.#log.info(`Registering contract class ${c.id.toString()}`)); if (operation == Operation.Store) { // TODO: Will probably want to create some worker threads to compute these bytecode commitments as they are expensive return await this.store.addContractClasses( diff --git a/yarn-project/aztec.js/src/contract/deploy_method.ts b/yarn-project/aztec.js/src/contract/deploy_method.ts index 9b45db9b49cb..909c6b46bb5a 100644 --- a/yarn-project/aztec.js/src/contract/deploy_method.ts +++ b/yarn-project/aztec.js/src/contract/deploy_method.ts @@ -234,8 +234,10 @@ export class DeployMethod extends Bas */ public override async prove(options: DeployOptions): Promise> { const txProvingResult = await this.proveInternal(options); + const tx = txProvingResult.toTx(); const instance = this.getInstance(options); - return new DeployProvenTx(this.wallet, txProvingResult.toTx(), this.postDeployCtor, instance); + this.log.info(`Tx ${tx.getTxHash()} contains ${tx.contractClassLogs.unrollLogs().length} contract class logs`); + return new DeployProvenTx(this.wallet, tx, this.postDeployCtor, instance); } /** diff --git a/yarn-project/aztec.js/src/deployment/register_class.ts b/yarn-project/aztec.js/src/deployment/register_class.ts index eaaba5e8b959..2875655360a8 100644 --- a/yarn-project/aztec.js/src/deployment/register_class.ts +++ b/yarn-project/aztec.js/src/deployment/register_class.ts @@ -22,5 +22,6 @@ export async function registerContractClass( const encodedBytecode = bufferAsFields(packedBytecode, MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS); const registerer = getRegistererContract(wallet); await wallet.addCapsule(encodedBytecode); + console.log({ contract: artifact.name, emitPublicBytecode }); return registerer.methods.register(artifactHash, privateFunctionsRoot, publicBytecodeCommitment, emitPublicBytecode); }