From 8c8387b6b18335ca23f62c3d4c942415b7449462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bene=C5=A1?= Date: Wed, 29 Nov 2023 12:45:26 +0100 Subject: [PATCH] chore: remove temporary logging (#3466) The 2 pixies test have not failed since I fixed [this race condition](https://github.com/AztecProtocol/aztec-packages/commit/9557a66dce6104e794a7ab20172738954d4315ba) last week so I think we can be pretty confident that it was really the case of the failures. For this reason I am removing the temporary logging here. --- yarn-project/aztec.js/src/contract/sent_tx.ts | 31 ++----------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/yarn-project/aztec.js/src/contract/sent_tx.ts b/yarn-project/aztec.js/src/contract/sent_tx.ts index 33af8912162..66a0dbfb489 100644 --- a/yarn-project/aztec.js/src/contract/sent_tx.ts +++ b/yarn-project/aztec.js/src/contract/sent_tx.ts @@ -1,4 +1,4 @@ -import { FieldsOf, MAX_NEW_NULLIFIERS_PER_TX } from '@aztec/circuits.js'; +import { FieldsOf } from '@aztec/circuits.js'; import { retryUntil } from '@aztec/foundation/retry'; import { ExtendedNote, GetUnencryptedLogsResponse, PXE, TxHash, TxReceipt, TxStatus } from '@aztec/types'; @@ -66,34 +66,7 @@ export class SentTx { } const receipt = await this.waitForReceipt(opts); if (receipt.status !== TxStatus.MINED) { - // ############## Temporary code start ############## - // A few logs placed here temporarily to help me (@benesjan) debug an issue with intermittent failure of - // 2 pixies test. - // https://github.com/AztecProtocol/aztec-packages/issues/3357 - // For whatever reason (according to logs) the tx which appears here as dropped seems to be correctly included - // in a block and the block built and submitted on-chain. I will try to fetch the latest block here and see - // which txs it contains to check if the block source used here has the relevant block. If it doesn't then - // the test is probably misconfigured and an incorrect block source is used (pxe pointing to a different aztec - // node or smt like that) or there is some bigger issue with block sync somewhere. - const blockNum = await this.pxe.getBlockNumber(); - const block = await this.pxe.getBlock(blockNum); - if (block) { - const txHashes = []; - for (let txIndex = 0; txIndex < block!.numberOfTxs; txIndex++) { - const txHash = block!.newNullifiers[MAX_NEW_NULLIFIERS_PER_TX * txIndex]; - txHashes.push(txHash.toString()); - } - throw new Error( - `Transaction ${await this.getTxHash()} was ${ - receipt.status - }.\nTx hashes of txs included in the last synced block ${block?.number} are: ${txHashes}`, - ); - } else { - throw new Error(`Transaction ${await this.getTxHash()} was ${receipt.status}. Block ${blockNum} not found.`); - } - // ############## Temporary code end ############## - - // throw new Error(`Transaction ${await this.getTxHash()} was ${receipt.status}`); + throw new Error(`Transaction ${await this.getTxHash()} was ${receipt.status}`); } if (opts?.debug) { const txHash = await this.getTxHash();