From e3a59ffc69bc17edd4e4a1b3c5b897d02b1f112a Mon Sep 17 00:00:00 2001 From: matias martinez Date: Wed, 22 Nov 2023 16:09:58 -0300 Subject: [PATCH] minor changes - using confirmed for solana log extraction --- .../src/domain/actions/solana/HandleSolanaTransactions.ts | 4 +++- .../src/domain/actions/solana/PollSolanaTransactions.ts | 6 +++--- deploy/blockchain-watcher/workers/solana.yaml | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/blockchain-watcher/src/domain/actions/solana/HandleSolanaTransactions.ts b/blockchain-watcher/src/domain/actions/solana/HandleSolanaTransactions.ts index d77a80e6..0cfaae93 100644 --- a/blockchain-watcher/src/domain/actions/solana/HandleSolanaTransactions.ts +++ b/blockchain-watcher/src/domain/actions/solana/HandleSolanaTransactions.ts @@ -25,7 +25,9 @@ export class HandleSolanaTransactions { const hasError = tx.meta?.err; if (hasError) this.logger.warn( - `Ignoring tx for program ${this.cfg.programId} in ${tx.slot} has error: ${tx.meta?.err}` + `Ignoring tx for program ${this.cfg.programId} in ${tx.slot} has error: ${JSON.stringify( + tx.meta?.err + )}` ); return !hasError; }); diff --git a/blockchain-watcher/src/domain/actions/solana/PollSolanaTransactions.ts b/blockchain-watcher/src/domain/actions/solana/PollSolanaTransactions.ts index a52cc3c0..0042c2b9 100644 --- a/blockchain-watcher/src/domain/actions/solana/PollSolanaTransactions.ts +++ b/blockchain-watcher/src/domain/actions/solana/PollSolanaTransactions.ts @@ -81,7 +81,7 @@ export class PollSolanaTransactions extends RunPollingJob { this.cfg.signaturesLimit ); this.logger.debug( - `Got ${sigs.length} signatures for address ${this.cfg.programId} between sigs ${afterSignature} and ${beforeSignature} [slots: ${range.fromSlot} - ${range.toSlot}]` + `Got ${sigs.length} signatures for address ${this.cfg.programId} between txs ${afterSignature} and ${beforeSignature} [slots: ${range.fromSlot} - ${range.toSlot}]` ); const txs = await this.slotRepository.getTransactions(sigs); @@ -163,8 +163,8 @@ export class PollSolanaTransactionsConfig { programId: string; fromSlot?: number; toSlot?: number; - slotBatchSize: number = 10_000; - signaturesLimit: number = 1_000; + slotBatchSize: number = 1_000; + signaturesLimit: number = 500; interval?: number = 5_000; constructor(id: string, programId: string, commitment?: string, slotBatchSize?: number) { diff --git a/deploy/blockchain-watcher/workers/solana.yaml b/deploy/blockchain-watcher/workers/solana.yaml index 0070637f..f07c40bc 100644 --- a/deploy/blockchain-watcher/workers/solana.yaml +++ b/deploy/blockchain-watcher/workers/solana.yaml @@ -43,7 +43,7 @@ data: "action": "PollSolanaTransactions", "config": { "slotBatchSize": 10000, - "commitment": "processed", + "commitment": "confirmed", "interval": 10000, "programId": "3u8hJUVTA4jH1wYAyUur7FFZVQ8H635K3tSHHF4ssjQ5", "chain": "solana" @@ -70,7 +70,7 @@ data: "action": "PollSolanaTransactions", "config": { "slotBatchSize": 10000, - "commitment": "processed", + "commitment": "confirmed", "interval": 10000, "signaturesLimit": 1000, "programId": "worm2ZoG2kUd4vFXhvjh93UUH596ayRfgQ2MgjNMTth",