Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

agent,common: lower the default parameters for query fee claiming #893

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,23 +162,23 @@ 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
block gas limit [number] [default: 100]
--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
Expand Down
4 changes: 2 additions & 2 deletions docs/networks/arbitrum-one.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 7 additions & 5 deletions docs/networks/arbitrum-sepolia.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@ In order to avoid collecting or claiming query fees below a certain threshold
(e.g. below the cost of the two transactions), the following configuration
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_VOUCHER_EXPIRATION` | `--voucher-expiration` | Time (in seconds) to permanently delete vouchers with too few query fees (Default: 2160) |

| Environment Variable | CLI Argument | Value |
| -------------------------------------------- | --------------------------------- | ----------------------------------------------------------------------------------------- |
| `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

Expand Down
4 changes: 2 additions & 2 deletions docs/networks/ethereum-mainnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 7 additions & 5 deletions docs/networks/ethereum-sepolia.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@ In order to avoid collecting or claiming query fees below a certain threshold
(e.g. below the cost of the two transactions), the following configuration
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_VOUCHER_EXPIRATION` | `--voucher-expiration` | Time (in seconds) to permanently delete vouchers with too few query fees (Default: 2160) |

| Environment Variable | CLI Argument | Value |
| -------------------------------------------- | --------------------------------- | ----------------------------------------------------------------------------------------- |
| `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

Expand Down
8 changes: 4 additions & 4 deletions packages/indexer-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions packages/indexer-agent/src/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,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', {
Expand All @@ -219,13 +219,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', {
Expand Down
8 changes: 4 additions & 4 deletions packages/indexer-common/src/network-specification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading