Skip to content

refactor: use GRT per billion entities instead of per million#959

Open
MoonBoi9001 wants to merge 5 commits intomain-dipsfrom
refactor/billion-entities-pricing
Open

refactor: use GRT per billion entities instead of per million#959
MoonBoi9001 wants to merge 5 commits intomain-dipsfrom
refactor/billion-entities-pricing

Conversation

@MoonBoi9001
Copy link
Member

@MoonBoi9001 MoonBoi9001 commented Feb 24, 2026

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:

  • Before: 0.2 GRT per million entities
  • After: 200 GRT per billion entities

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

  • Renamed min_grt_per_million_entities_per_30_days to min_grt_per_billion_entities_per_30_days
  • Updated default value from 0.2 to 200 (identical pricing, different unit)
  • Updated /dips/info endpoint response field name
  • Adjusted internal conversion divisor from 1,000,000 to 1,000,000,000
  • Added entity size context to config example comments

Coordination

This change requires coordinated deployment with:

  • edgeandnode/subgraph-dips-indexer-selection#64
  • edgeandnode/dipper#565

🤖 Generated with Claude Code

@MoonBoi9001 MoonBoi9001 force-pushed the refactor/billion-entities-pricing branch from 8ce2c6a to 779fa8c Compare February 24, 2026 17:47
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>
@MoonBoi9001 MoonBoi9001 force-pushed the refactor/billion-entities-pricing branch from 779fa8c to 4b6c6f4 Compare February 24, 2026 17:49
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>
@MoonBoi9001
Copy link
Member Author

MoonBoi9001 commented Mar 2, 2026

@RembrandtK I merged #961 into this branch, so that when this merges to main-dips, then main dips will have all the recent PR's.

…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>
@MoonBoi9001
Copy link
Member Author

@RembrandtK I merged #964 into this branch, so that when this merges to main-dips, then main-dips will have the RCA struct aligned with the indexing-payments-management-audit contracts branch.

@MoonBoi9001
Copy link
Member Author

@RembrandtK I have also merged #965 into this branch

MoonBoi9001 and others added 2 commits March 2, 2026 21:13
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant