refactor(dips): replace off-chain epoch vouchers with on-chain SignedRCA#942
Merged
MoonBoi9001 merged 5 commits intomain-dipsfrom Feb 17, 2026
Merged
refactor(dips): replace off-chain epoch vouchers with on-chain SignedRCA#942MoonBoi9001 merged 5 commits intomain-dipsfrom
MoonBoi9001 merged 5 commits intomain-dipsfrom
Conversation
863d79a to
d16bbf2
Compare
cfdaa8c to
14b0ffe
Compare
ffd681e to
b4fe016
Compare
c516428 to
72ece73
Compare
Implement RecurringCollectionAgreement (RCA) protocol for DIPS, aligned with the on-chain IndexingAgreement contract. Changes: - RcaStore trait and PostgreSQL implementation for RCA storage - EIP-712 signature verification via escrow-based authorization - validate_and_create_rca() with full validation pipeline: signature, IPFS manifest, network, pricing, deadline/expiry - Database migration for pending_rca_proposals table The indexer agent queries pending_rca_proposals directly and decides acceptance on-chain via RecurringCollector contract. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add #[serde(default)] to DipsConfig for minimal config files - Validate recurring_collector != Address::ZERO at startup - Warn when tokens_per_second is empty (all proposals rejected) - Bump pricing rejection logs to info level for visibility Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive documentation explaining architecture, validation flow, trust model, and component responsibilities. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive test suite with AAA pattern: - validate_and_create_rca: 11 tests covering all validation paths - PriceCalculator: 7 tests (previously 0) - SignerValidator implementations: 5 tests - Test doubles: FailingIpfsFetcher, FailingRcaStore, RejectingSignerValidator Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add resilience to IPFS manifest fetching: - 30 second timeout per attempt - Up to 4 attempts with exponential backoff (10s, 20s, 40s) - Worst case: ~190 seconds before rejection Dipper gRPC timeout should be >= 220s. See edgeandnode/dipper#557. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
72ece73 to
4392b79
Compare
RembrandtK
reviewed
Feb 17, 2026
|
|
||
| [dips.price_per_epoch] | ||
| [dips.tokens_per_second] | ||
| mainnet = "100" |
There was a problem hiding this comment.
These are quite high example values for per second rates?
Member
Author
There was a problem hiding this comment.
Agreed and addressed in #947 see the new maximal-config-example.toml
RembrandtK
approved these changes
Feb 17, 2026
RembrandtK
left a comment
There was a problem hiding this comment.
Looks good, I think can merge. I left one comment for example config.
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
The
IndexingAgreement.solcontract uses seconds-based pricing for fee computation. indexer-rs needs to validate and storeSignedRCAproposals in a format the indexer agent can read and submit on-chain.Summary
Implements DIPS using
SignedRCA(RecurringCollectionAgreement), aligned with the on-chain contract.Changes
tokens_per_second+ globaltokens_per_entity_per_secondRcaStoretrait (indexer agent reads directly from DB)recurring_collector, warning if no pricing networks configuredRelated
ma/indexing-payments-003branch in contracts repo