Skip to content

feat: skip DIPs rule cleanup when network data is stale#1224

Merged
MoonBoi9001 merged 3 commits into
main-dipsfrom
mb9/skip-dips-rule-cleanup-when-indexing-data-is-stale
Jun 1, 2026
Merged

feat: skip DIPs rule cleanup when network data is stale#1224
MoonBoi9001 merged 3 commits into
main-dipsfrom
mb9/skip-dips-rule-cleanup-when-indexing-data-is-stale

Conversation

@MoonBoi9001
Copy link
Copy Markdown
Member

TL;DR

The indexer-agent removes a DIPs indexing rule once the shared on-chain record no longer lists a paying agreement for it. When that record is lagging it can look empty even though agreements are live, so the agent would wrongly stop indexing work it is still being paid for. This skips the cleanup whenever the record is behind or can't be read, so a lagging data source can't trigger mass removal.

Motivation

The indexer-agent keeps a DIPs indexing rule for each subgraph it has a paying agreement to index, and removes a rule once the network's published record of agreements no longer backs it. That record is itself a subgraph that indexes on-chain agreement events, and like any subgraph it can fall behind the chain.

When it lags, its list of agreements is incomplete — recently-accepted ones, or in the worst case all of them, can be missing — so the removal step sees no backing agreement and deletes rules that are in fact live. The indexer then stops indexing subgraphs it is still being paid for, until the record catches up and the rules are recreated. This change skips the removal step whenever the record is behind wall-clock time by more than a short threshold, or its freshness can't be read at all.

Summary

  • The rule cleanup runs only when the agreements record is fresh.
  • Freshness is the gap between the record's latest indexed block and wall-clock time.
  • If the record lags by more than five minutes, cleanup is skipped for that cycle.
  • If the record's freshness can't be read, cleanup is skipped too, so it fails safe.
  • Rule creation is unchanged; only the removal step is gated.

@github-project-automation github-project-automation Bot moved this to 🗃️ Inbox in Indexer May 29, 2026
The agent accepted DIPs agreements only on its 120s reconcile cycle, so under backlog they
expired past the 300s deadline. This adds a dedicated 5s loop that accepts proposals in
parallel (one per deployment, nonce-serialised) and creates the rule up front to deploy early.
@MoonBoi9001 MoonBoi9001 force-pushed the mb9/dedicated-fast-loop-for-dips-acceptance branch from c90d378 to 1c1fb04 Compare May 29, 2026 07:49
The agent removes a DIPS indexing rule once the indexing-payments subgraph no longer lists a
paying agreement for it. When that subgraph lags, its list is incomplete, so the agent would
delete rules for live agreements. Skip the cleanup while the subgraph is behind or unreadable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@MoonBoi9001 MoonBoi9001 force-pushed the mb9/skip-dips-rule-cleanup-when-indexing-data-is-stale branch from 4543a63 to 0b6036b Compare May 29, 2026 07:50
@MoonBoi9001 MoonBoi9001 requested a review from Maikol May 29, 2026 08:13
@github-project-automation github-project-automation Bot moved this from 🗃️ Inbox to ✅ Approved in Indexer May 29, 2026
Base automatically changed from mb9/dedicated-fast-loop-for-dips-acceptance to main-dips June 1, 2026 06:26
@MoonBoi9001 MoonBoi9001 merged commit fe14501 into main-dips Jun 1, 2026
3 checks passed
@MoonBoi9001 MoonBoi9001 deleted the mb9/skip-dips-rule-cleanup-when-indexing-data-is-stale branch June 1, 2026 06:52
@github-project-automation github-project-automation Bot moved this from ✅ Approved to 🚗 Merged in Indexer Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: 🚗 Merged

Development

Successfully merging this pull request may close these issues.

2 participants