Skip to content

feat: start indexing sooner after accepting a payment agreement#1234

Draft
MoonBoi9001 wants to merge 1 commit into
main-dipsfrom
mb9/start-dips-sync-on-offchain-accept
Draft

feat: start indexing sooner after accepting a payment agreement#1234
MoonBoi9001 wants to merge 1 commit into
main-dipsfrom
mb9/start-dips-sync-on-offchain-accept

Conversation

@MoonBoi9001

Copy link
Copy Markdown
Member

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

  • Create the indexing rule as soon as an accepted agreement is seen, so syncing starts immediately.
  • Wait a configurable few seconds before the first on-chain step, timed from the accept.
  • Cap that wait below the agreement deadline so it can never make the agent miss the deadline.
  • Add a setting for the wait (default five seconds) and thread it through the configuration.
  • Add tests for early sync start, the wait window, deadline ordering, and restart safety.

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>
@github-project-automation github-project-automation Bot moved this to 🗃️ Inbox in Indexer Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🗃️ Inbox

Development

Successfully merging this pull request may close these issues.

1 participant