From 5f28a4fcaec5f12ebeec44f89555d8d4a0ff66ac Mon Sep 17 00:00:00 2001 From: kanshi <46557+kanshi@users.noreply.github.com> Date: Mon, 23 Sep 2024 19:32:02 +0200 Subject: [PATCH] Decrease validation pace to 2 hrs, increase warp delays, decrease batch size of scores to 7 --- src/distribution/distribution.service.ts | 12 ++++++------ src/tasks/tasks.service.ts | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/distribution/distribution.service.ts b/src/distribution/distribution.service.ts index 199ba72..5758756 100644 --- a/src/distribution/distribution.service.ts +++ b/src/distribution/distribution.service.ts @@ -48,7 +48,7 @@ export class DistributionService { private isLive?: string private operator - private static readonly scoresPerBatch = 8 + private static readonly scoresPerBatch = 7 public static readonly maxDistributionRetries = 6 private static readonly familiesPerBatch = 4 private static readonly fingerprintsPerBatch = 50 @@ -238,7 +238,7 @@ export class DistributionService { if (this.operator != undefined) { if (this.isLive === 'true') { try { - await setTimeout(5000) + await setTimeout(10000) const response = await this.distributionContract .writeInteraction({ function: 'addScores', @@ -286,7 +286,7 @@ export class DistributionService { } try { - await setTimeout(5000) + await setTimeout(10000) const response = await this.distributionContract .writeInteraction({ function: 'distribute', @@ -576,7 +576,7 @@ export class DistributionService { ) for (const familyBatch of familyBatches) { - await setTimeout(5000) + await setTimeout(10000) this.logger.debug( `Starting to set relay families for ${familyBatch.length} relays`, ) @@ -655,7 +655,7 @@ export class DistributionService { ) for (const batch of batches) { - await setTimeout(5000) + await setTimeout(10000) this.logger.debug( `Starting to set hardware bonus relays for ${batch.length} relays [${batch}]` ) @@ -705,7 +705,7 @@ export class DistributionService { this.logger.log( `Sleeping before writing relay uptimes to distribution contract` ) - await setTimeout(5000) + await setTimeout(10000) const fingerprints = uptimes.map(r => r.fingerprint) this.logger.log( `Setting uptimes for ${uptimes.length} relays [${fingerprints}]` diff --git a/src/tasks/tasks.service.ts b/src/tasks/tasks.service.ts index e248ec6..37c6200 100644 --- a/src/tasks/tasks.service.ts +++ b/src/tasks/tasks.service.ts @@ -328,7 +328,7 @@ export class TasksService implements OnApplicationBootstrap { } public async queueValidateRelays( - delayJob: number = 1000 * 60 * 60 + delayJob: number = 1000 * 60 * 60 * 2 ): Promise { if (!this.state.isValidating) { this.state.isValidating = true