fix(dips): create indexing rule before acceptIndexingAgreement#1199
Closed
MoonBoi9001 wants to merge 1 commit intofeat/dips-on-chain-cancelfrom
Closed
fix(dips): create indexing rule before acceptIndexingAgreement#1199MoonBoi9001 wants to merge 1 commit intofeat/dips-on-chain-cancelfrom
MoonBoi9001 wants to merge 1 commit intofeat/dips-on-chain-cancelfrom
Conversation
The dips rule was created on the 15s reconciliation loop by iterating pending_rca_proposals, but the fast 5s accept loop clears that row as soon as the acceptIndexingAgreement receipt lands. On fast chains the receipt consistently beats the next reconcile tick, so graph-node never gets told to deploy the subgraph and the agent spins on unallocate attempts for the just-created DIPs allocation. Extract the per-proposal rule logic into ensureDipsRuleForProposal and call it eagerly from processProposal before executeTransaction fires. Reconciliation still calls it as defense-in-depth. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Member
Author
|
Wrong base — the race this fixes only exists on |
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 indexer-agent runs two concurrent loops for DIPs. One accepts proposals on-chain every 5 seconds. The other runs the wider reconciliation every 15 seconds and is responsible for upserting the
dipsindexing rule that tells graph-node to deploy the subgraph.Both loops read from the same
pending_rca_proposalstable. The accept loop removes a proposal from that table as soon asacceptIndexingAgreementconfirms on-chain. The reconcile loop only creates the rule if the proposal is still pending when its tick fires.On Arbitrum,
acceptIndexingAgreementtypically confirms in a second or two, so the accept loop clears the row long before the next 15s reconcile tick. The rule is never created. Graph-node never receives the deploy instruction. Subsequent reconciliation then sees a DIPs allocation with no matching rule and tries to unallocate it withreason: "group:none"— which fails withIE067, leaving the agent to loop on the same failed action while the indexer silently collects nothing.The behaviour is timing-dependent on hardhat, where receipts take 4-8s and the reconcile tick occasionally wins. It becomes deterministic on Arbitrum, where receipts land in ~1s and the reconcile always loses. The existing legacy path does not help: it reads
IndexingAgreement, a table populated only by the deprecated voucher system, not the RCA flow.Summary
ensureDipsRuleForProposaland call it eagerly fromprocessProposal, beforeacceptIndexingAgreementbroadcasts.Stack
Targets
feat/dips-on-chain-cancel(#1190) rather thanmain-dipsso the author of the open stack (#1181, #1185, #1190) does not have to rebase. The bug landed withfeat/dips-support(#1172, merged) and is inherited by every branch below #1178. Landing here lets #1178 rebase onto this fix and pull it in with no further coordination.