feat: start indexing sooner after accepting a payment agreement#1234
Draft
MoonBoi9001 wants to merge 1 commit into
Draft
feat: start indexing sooner after accepting a payment agreement#1234MoonBoi9001 wants to merge 1 commit into
MoonBoi9001 wants to merge 1 commit into
Conversation
Create the dips indexing rule the moment the accept loop sees a pending proposal so graph-node starts syncing right away, and hold the first on-chain acceptIndexingAgreement by a short configurable delay so the payer's offer has time to land before the attempt. Co-Authored-By: Claude Opus 4.8 <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.
TL;DR
When an indexer accepts a payment agreement, the agent now starts indexing the subgraph straight away instead of waiting for the payer's on-chain offer to appear, and it holds the on-chain step for a few seconds so that offer has time to land. A new setting (default five seconds) controls that wait.
Motivation
Today, when an indexer accepts a payment agreement off-chain, the agent only writes a pending record, and the rule that tells the indexing engine to start work is tied to the payer's on-chain offer being visible. Because that offer transaction takes a moment to land and be indexed, the agent repeatedly tries the on-chain acceptance and finds the offer not yet there, and indexing doesn't begin until it clears. That wastes attempts against a tight agreement deadline and delays the indexer doing the work it is being paid for. This change starts the indexing as soon as the off-chain acceptance is seen and waits a short, bounded few seconds before the first on-chain attempt, so far fewer attempts are wasted while the subgraph is already syncing.
Summary