From ed76f4175bc5a799b94b10ef15e1c63f96a71132 Mon Sep 17 00:00:00 2001 From: Sonali Thakur Date: Thu, 20 Jun 2024 10:47:55 +0530 Subject: [PATCH 1/2] add beforeStateAccounts insertion behind flag beforeStateAccounts type fix --- src/Config.ts | 2 ++ src/Data/Collector.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Config.ts b/src/Config.ts index 33c100b4..b1f0164b 100644 --- a/src/Config.ts +++ b/src/Config.ts @@ -66,6 +66,7 @@ export interface Config { enabled: boolean } newPOQReceipt: boolean + storeReceiptBeforeStates: boolean waitingTimeForMissingTxData: number // Wait time in ms for missing tx data before collecting from other archivers gossipToMoreArchivers: true // To gossip to more archivers in addition to adjacent archivers randomGossipArchiversCount: 2 // Number of random archivers to gossip to @@ -158,6 +159,7 @@ let config: Config = { enabled: false, }, newPOQReceipt: false, + storeReceiptBeforeStates: false, waitingTimeForMissingTxData: 2000, // in ms gossipToMoreArchivers: true, randomGossipArchiversCount: 2, diff --git a/src/Data/Collector.ts b/src/Data/Collector.ts index 74d3d7b1..bb959ad3 100644 --- a/src/Data/Collector.ts +++ b/src/Data/Collector.ts @@ -882,6 +882,7 @@ export const storeReceiptData = async ( receiptId: tx.txId, timestamp: tx.timestamp, applyTimestamp, + beforeStateAccounts: config.storeReceiptBeforeStates ? receipt.beforeStateAccounts : [], }) if (config.dataLogWrite && ReceiptLogWriter) ReceiptLogWriter.writeToLog( @@ -890,6 +891,7 @@ export const storeReceiptData = async ( receiptId: tx.txId, timestamp: tx.timestamp, applyTimestamp, + beforeStateAccounts: config.storeReceiptBeforeStates ? receipt.beforeStateAccounts : [], })}\n` ) txDataList.push({ txId, timestamp }) From aa1fc82ae87292266758ec87d1189e7c9f38d39f Mon Sep 17 00:00:00 2001 From: Sonali Thakur Date: Fri, 6 Sep 2024 11:39:12 +0530 Subject: [PATCH 2/2] set storeReceiptBeforeStates to true --- src/Config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Config.ts b/src/Config.ts index b1f0164b..770af376 100644 --- a/src/Config.ts +++ b/src/Config.ts @@ -159,7 +159,7 @@ let config: Config = { enabled: false, }, newPOQReceipt: false, - storeReceiptBeforeStates: false, + storeReceiptBeforeStates: true, waitingTimeForMissingTxData: 2000, // in ms gossipToMoreArchivers: true, randomGossipArchiversCount: 2,