From 76d1c25b41225506fa08564dba0ecb196e69a2d0 Mon Sep 17 00:00:00 2001 From: cwtaras Date: Fri, 10 May 2024 10:24:09 +0300 Subject: [PATCH] agent,common: lower the default parameters for query fee claiming agent,common: lower the default parameters for query fee claiming --- README.md | 8 ++++---- docs/networks/arbitrum-one.md | 4 ++-- docs/networks/arbitrum-sepolia.md | 4 ++-- docs/networks/ethereum-mainnet.md | 4 ++-- docs/networks/ethereum-sepolia.md | 4 ++-- packages/indexer-agent/README.md | 8 ++++---- packages/indexer-agent/src/commands/start.ts | 8 ++++---- packages/indexer-common/src/network-specification.ts | 8 ++++---- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index b63b0b424..09137b986 100644 --- a/README.md +++ b/README.md @@ -162,11 +162,11 @@ Indexer Infrastructure --rebate-claim-threshold Minimum value of rebate for a single allocation (in GRT) in order for it to be included in a batch rebate claim - on-chain [string] [default: "200"] + on-chain [string] [default: "1"] --rebate-claim-batch-threshold Minimum total value of all rebates in an batch (in GRT) before the batch is claimed on-chain - [string] [default: "2000"] + [string] [default: "5"] --rebate-claim-max-batch-size Maximum number of rebates inside a batch. Upper bound is constrained by available system memory, and by the @@ -174,11 +174,11 @@ Indexer Infrastructure --voucher-redemption-threshold Minimum value of rebate for a single allocation (in GRT) in order for it to be included in a batch rebate claim - on-chain [string] [default: "200"] + on-chain [string] [default: "1"] --voucher-redemption-batch-threshold Minimum total value of all rebates in an batch (in GRT) before the batch is claimed on-chain - [string] [default: "2000"] + [string] [default: "5"] --voucher-redemption-max-batch-size Maximum number of rebates inside a batch. Upper bound is constrained by available system memory, and by the diff --git a/docs/networks/arbitrum-one.md b/docs/networks/arbitrum-one.md index 004e9ef02..46344daef 100644 --- a/docs/networks/arbitrum-one.md +++ b/docs/networks/arbitrum-one.md @@ -55,8 +55,8 @@ option can be used. | Environment Variable | CLI Argument | Value | | -------------------------------------------- | --------------------------------- | ----------------------------------------------------------------------------------------- | -| `INDEXER_AGENT_REBATE_CLAIM_THRESHOLD` | `--rebate-claim-threshold` | Minimum rebate (in GRT) received for an allocation to claim (Default: 200) | -| `INDEXER_AGENT_REBATE_CLAIM_BATCH_THRESHOLD` | `--rebate-claim-batch-threshold` | Minimum total rebates (in GRT) before a batched claim is processed (Default: 2000) | +| `INDEXER_AGENT_REBATE_CLAIM_THRESHOLD` | `--rebate-claim-threshold` | Minimum rebate (in GRT) received for an allocation to claim (Default: 1) | +| `INDEXER_AGENT_REBATE_CLAIM_BATCH_THRESHOLD` | `--rebate-claim-batch-threshold` | Minimum total rebates (in GRT) before a batched claim is processed (Default: 5) | | `INDEXER_AGENT_VOUCHER_EXPIRATION` | `--voucher-expiration` | Time (in seconds) to permanently delete vouchers with too few query fees (Default: 2160) | ### Indexer Service diff --git a/docs/networks/arbitrum-sepolia.md b/docs/networks/arbitrum-sepolia.md index 8b0a032cc..56d197078 100644 --- a/docs/networks/arbitrum-sepolia.md +++ b/docs/networks/arbitrum-sepolia.md @@ -60,8 +60,8 @@ option can be used. | Environment Variable | CLI Argument | Value | | -------------------------------------------- | --------------------------------- | ----------------------------------------------------------------------------------------- | -| `INDEXER_AGENT_REBATE_CLAIM_THRESHOLD` | `--rebate-claim-threshold` | Minimum rebate (in GRT) received for an allocation to claim (Default: 200) | -| `INDEXER_AGENT_REBATE_CLAIM_BATCH_THRESHOLD` | `--rebate-claim-batch-threshold` | Minimum total rebates (in GRT) before a batched claim is processed (Default: 2000) | +| `INDEXER_AGENT_REBATE_CLAIM_THRESHOLD` | `--rebate-claim-threshold` | Minimum rebate (in GRT) received for an allocation to claim (Default: 1) | +| `INDEXER_AGENT_REBATE_CLAIM_BATCH_THRESHOLD` | `--rebate-claim-batch-threshold` | Minimum total rebates (in GRT) before a batched claim is processed (Default: 5) | | `INDEXER_AGENT_VOUCHER_EXPIRATION` | `--voucher-expiration` | Time (in seconds) to permanently delete vouchers with too few query fees (Default: 2160) | ### Indexer Service diff --git a/docs/networks/ethereum-mainnet.md b/docs/networks/ethereum-mainnet.md index 2190d50ba..4bbedc279 100644 --- a/docs/networks/ethereum-mainnet.md +++ b/docs/networks/ethereum-mainnet.md @@ -54,8 +54,8 @@ option can be used. | Environment Variable | CLI Argument | Value | | -------------------------------------------- | --------------------------------- | ----------------------------------------------------------------------------------------- | -| `INDEXER_AGENT_REBATE_CLAIM_THRESHOLD` | `--rebate-claim-threshold` | Minimum rebate (in GRT) received for an allocation to claim (Default: 200) | -| `INDEXER_AGENT_REBATE_CLAIM_BATCH_THRESHOLD` | `--rebate-claim-batch-threshold` | Minimum total rebates (in GRT) before a batched claim is processed (Default: 2000) | +| `INDEXER_AGENT_REBATE_CLAIM_THRESHOLD` | `--rebate-claim-threshold` | Minimum rebate (in GRT) received for an allocation to claim (Default: 1) | +| `INDEXER_AGENT_REBATE_CLAIM_BATCH_THRESHOLD` | `--rebate-claim-batch-threshold` | Minimum total rebates (in GRT) before a batched claim is processed (Default: 5) | | `INDEXER_AGENT_VOUCHER_EXPIRATION` | `--voucher-expiration` | Time (in seconds) to permanently delete vouchers with too few query fees (Default: 2160) | ### Indexer Service diff --git a/docs/networks/ethereum-sepolia.md b/docs/networks/ethereum-sepolia.md index d1d36eb7b..b32116000 100644 --- a/docs/networks/ethereum-sepolia.md +++ b/docs/networks/ethereum-sepolia.md @@ -60,8 +60,8 @@ option can be used. | Environment Variable | CLI Argument | Value | | -------------------------------------------- | --------------------------------- | ----------------------------------------------------------------------------------------- | -| `INDEXER_AGENT_REBATE_CLAIM_THRESHOLD` | `--rebate-claim-threshold` | Minimum rebate (in GRT) received for an allocation to claim (Default: 200) | -| `INDEXER_AGENT_REBATE_CLAIM_BATCH_THRESHOLD` | `--rebate-claim-batch-threshold` | Minimum total rebates (in GRT) before a batched claim is processed (Default: 2000) | +| `INDEXER_AGENT_REBATE_CLAIM_THRESHOLD` | `--rebate-claim-threshold` | Minimum rebate (in GRT) received for an allocation to claim (Default: 1) | +| `INDEXER_AGENT_REBATE_CLAIM_BATCH_THRESHOLD` | `--rebate-claim-batch-threshold` | Minimum total rebates (in GRT) before a batched claim is processed (Default: 5) | | `INDEXER_AGENT_VOUCHER_EXPIRATION` | `--voucher-expiration` | Time (in seconds) to permanently delete vouchers with too few query fees (Default: 2160) | ### Indexer Service diff --git a/packages/indexer-agent/README.md b/packages/indexer-agent/README.md index 25a087884..7ec9589cf 100644 --- a/packages/indexer-agent/README.md +++ b/packages/indexer-agent/README.md @@ -87,11 +87,11 @@ Query Fees allocation (in GRT) in order for it to be included in a batch rebate claim on-chain - [number] [default: 200] + [number] [default: 1] --rebate-claim-batch-threshold Minimum total value of all rebates in an batch (in GRT) before the batch is claimed on-chain - [number] [default: 2000] + [number] [default: 5] --rebate-claim-max-batch-size Maximum number of rebates inside a batch. Upper bound is constrained by available system memory, and by the @@ -101,11 +101,11 @@ Query Fees allocation (in GRT) in order for it to be included in a batch rebate claim on-chain - [number] [default: 200] + [number] [default: 1] --voucher-redemption-batch-threshold Minimum total value of all rebates in an batch (in GRT) before the batch is claimed on-chain - [number] [default: 2000] + [number] [default: 5] --voucher-redemption-max-batch-size Maximum number of rebates inside a batch. Upper bound is constrained by available system memory, and by the diff --git a/packages/indexer-agent/src/commands/start.ts b/packages/indexer-agent/src/commands/start.ts index 8e10a4594..dca96c94f 100644 --- a/packages/indexer-agent/src/commands/start.ts +++ b/packages/indexer-agent/src/commands/start.ts @@ -200,13 +200,13 @@ export const start = { .option('rebate-claim-threshold', { description: `Minimum value of rebate for a single allocation (in GRT) in order for it to be included in a batch rebate claim on-chain`, type: 'number', - default: 200, // This value (the marginal gain of a claim in GRT), should always exceed the marginal cost of a claim (in ETH gas) + default: 1, // This value (the marginal gain of a claim in GRT), should always exceed the marginal cost of a claim (in ETH gas) group: 'Query Fees', }) .option('rebate-claim-batch-threshold', { description: `Minimum total value of all rebates in an batch (in GRT) before the batch is claimed on-chain`, type: 'number', - default: 2000, + default: 5, group: 'Query Fees', }) .option('rebate-claim-max-batch-size', { @@ -218,13 +218,13 @@ export const start = { .option('voucher-redemption-threshold', { description: `Minimum value of rebate for a single allocation (in GRT) in order for it to be included in a batch rebate claim on-chain`, type: 'number', - default: 200, // This value (the marginal gain of a claim in GRT), should always exceed the marginal cost of a claim (in ETH gas) + default: 1, // This value (the marginal gain of a claim in GRT), should always exceed the marginal cost of a claim (in ETH gas) group: 'Query Fees', }) .option('voucher-redemption-batch-threshold', { description: `Minimum total value of all rebates in an batch (in GRT) before the batch is claimed on-chain`, type: 'number', - default: 2000, + default: 5, group: 'Query Fees', }) .option('voucher-redemption-max-batch-size', { diff --git a/packages/indexer-common/src/network-specification.ts b/packages/indexer-common/src/network-specification.ts index 219db9fb4..f806d1e76 100644 --- a/packages/indexer-common/src/network-specification.ts +++ b/packages/indexer-common/src/network-specification.ts @@ -41,14 +41,14 @@ export const IndexerOptions = z url: z.string().url(), geoCoordinates: z.number().array().length(2).default([31.780715, -41.179504]), restakeRewards: z.boolean().default(true), - rebateClaimThreshold: GRT().default(200), - rebateClaimBatchThreshold: GRT().default(200), + rebateClaimThreshold: GRT().default(1), + rebateClaimBatchThreshold: GRT().default(5), rebateClaimMaxBatchSize: positiveNumber().default(100), poiDisputeMonitoring: z.boolean().default(false), poiDisputableEpochs: positiveNumber().default(1), defaultAllocationAmount: GRT().default(0.1), - voucherRedemptionThreshold: GRT().default(200), - voucherRedemptionBatchThreshold: GRT().default(2000), + voucherRedemptionThreshold: GRT().default(1), + voucherRedemptionBatchThreshold: GRT().default(5), voucherRedemptionMaxBatchSize: positiveNumber().default(100), allocationManagementMode: z .enum(ALLOCATION_MANAGEMENT_MODE)