refactor: use GRT per billion entities instead of per million#959
Open
MoonBoi9001 wants to merge 5 commits intomain-dipsfrom
Open
refactor: use GRT per billion entities instead of per million#959MoonBoi9001 wants to merge 5 commits intomain-dipsfrom
MoonBoi9001 wants to merge 5 commits intomain-dipsfrom
Conversation
8ce2c6a to
779fa8c
Compare
The entity pricing unit has been changed from "GRT per million entities" to "GRT per billion entities" for better human readability. At scale, "0.2 GRT per million entities" sounds negligible but actually translates to ~$4.50/TB/month - a meaningful cost that indexers might overlook. Using "200 GRT per billion entities" makes the cost more apparent. Changes: - Config: min_grt_per_million_entities_per_30_days -> min_grt_per_billion_entities_per_30_days - Default value: 0.2 -> 200 (same economics, just different unit) - /dips/info endpoint: field renamed in response - Internal conversion divisor: 1_000_000 -> 1_000_000_000 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
779fa8c to
4b6c6f4
Compare
SignerNotAuthorised errors were mapped to RejectReason::Other, which causes dipper to block the indexer for 30 days. Signer authorization is a transient config issue that resolves once the operator registers the signer on the escrow contract, so a dedicated rejection reason allows dipper to apply a much shorter lookback window. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
|
@RembrandtK I merged #961 into this branch, so that when this merges to |
…contracts (#964) The RecurringCollector contract on the `indexing-payments-management-audit` branch removed `bytes16 agreementId` from the RCA struct and replaced it with `uint256 nonce`. Agreement IDs are now derived on-chain via `bytes16(keccak256(abi.encode(payer, dataService, serviceProvider, deadline, nonce)))`. The `deadline` and `endsAt` fields also changed from `uint256` to `uint64`. Updates the sol! struct definition, adds `derive_agreement_id`, simplifies `validate_and_create_rca` by removing fallible U256-to-u64 conversion, and updates all test RCA constructions. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
|
@RembrandtK I merged #964 into this branch, so that when this merges to |
Member
Author
|
@RembrandtK I have also merged #965 into this branch |
There is no DIPs v1 -- the off-chain voucher system was abandoned before deployment. DIPs refers exclusively to the on-chain RCA system. Rename the migration from dips_v2 to dips_pending_proposals and clean up doc comments that referenced "V2". Also clarifies the migration ownership comment in service.rs: the indexer-service does not run migrations by convention, the agent owns DDL, and the SQL files here are for local dev and tests only. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
The RejectReason proto enum only had 4 values (Unspecified, PriceTooLow, Other, SignerNotAuthorised), so 6 of the 8 validation failures in indexer-service mapped to the generic Other. Dipper uses the reason to set exclusion periods and Other gets 30 days, meaning transient issues like DeadlineExpired would incorrectly exclude an indexer for a month. Added DeadlineExpired, UnsupportedNetwork, SubgraphManifestUnavailable, UnexpectedServiceProvider, AgreementExpired, and UnsupportedMetadataVersion to the proto and updated reject_reason_from_error to map each DipsError variant to its specific reason. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Entity pricing is currently expressed as "GRT per million entities per 30 days", which makes costs appear negligible at first glance. An indexer seeing "0.2 GRT per million entities" might not realize this translates to meaningful disk costs at scale.
By switching to "GRT per billion entities", the numbers become more representative of actual operational costs:
The underlying economics are unchanged - this is purely a UX improvement to help indexers understand what they're committing to.
Entity Size Context
Analysis of subgraphs indexed by the upgrade indexer in Q1 2025 found the average entity size to be approximately 0.759 KiB. At this size, 1 billion entities ≈ 0.707 TiB of disk space. This figure may have shifted somewhat since then, but we don't expect overly dramatic changes. Indexers can monitor their own entity size observations and adjust pricing accordingly if they feel this analysis is outdated.
Summary
min_grt_per_million_entities_per_30_daystomin_grt_per_billion_entities_per_30_days/dips/infoendpoint response field nameCoordination
This change requires coordinated deployment with:
🤖 Generated with Claude Code