From 4dd326f44180d81a4e16fda064c5986d79795b20 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Thu, 9 Jan 2025 12:21:55 +0000 Subject: [PATCH 1/2] Don't retransmit txs --- yarn-project/p2p/src/client/p2p_client.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/yarn-project/p2p/src/client/p2p_client.ts b/yarn-project/p2p/src/client/p2p_client.ts index 4ab855f4847..aeb51ae3fcd 100644 --- a/yarn-project/p2p/src/client/p2p_client.ts +++ b/yarn-project/p2p/src/client/p2p_client.ts @@ -380,9 +380,6 @@ export class P2PClient this.log.debug(`Block ${syncedLatestBlock} (proven ${syncedProvenBlock}) already beyond current block`); } - // publish any txs in TxPool after its doing initial sync - this.syncPromise = this.syncPromise.then(() => this.publishStoredTxs()); - this.blockStream.start(); this.log.verbose(`Started block downloader from block ${syncedLatestBlock}`); From d0baea3bf997371611330eff44fd89a68d37af8f Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Thu, 9 Jan 2025 12:42:25 +0000 Subject: [PATCH 2/2] Removed test --- yarn-project/p2p/src/client/p2p_client.test.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/yarn-project/p2p/src/client/p2p_client.test.ts b/yarn-project/p2p/src/client/p2p_client.test.ts index 0179aeae383..231fb263052 100644 --- a/yarn-project/p2p/src/client/p2p_client.test.ts +++ b/yarn-project/p2p/src/client/p2p_client.test.ts @@ -104,17 +104,6 @@ describe('In-Memory P2P Client', () => { expect(txPool.addTxs).toHaveBeenCalledTimes(2); }); - it('republishes previously stored txs on start', async () => { - const tx1 = mockTx(); - const tx2 = mockTx(); - txPool.getAllTxs.mockReturnValue([tx1, tx2]); - - await client.start(); - expect(p2pService.propagate).toHaveBeenCalledTimes(2); - expect(p2pService.propagate).toHaveBeenCalledWith(tx1); - expect(p2pService.propagate).toHaveBeenCalledWith(tx2); - }); - it('restores the previous block number it was at', async () => { await client.start(); await client.stop();