feat: on-chain acceptance fixes for DIPs recurring agreements#1178
Open
MoonBoi9001 wants to merge 1 commit intofeat/dips-continuous-collectionfrom
Open
feat: on-chain acceptance fixes for DIPs recurring agreements#1178MoonBoi9001 wants to merge 1 commit intofeat/dips-continuous-collectionfrom
MoonBoi9001 wants to merge 1 commit intofeat/dips-continuous-collectionfrom
Conversation
Maikol
approved these changes
Mar 12, 2026
9e70b84 to
163ac0b
Compare
163ac0b to
3915cca
Compare
3915cca to
3a60410
Compare
3a60410 to
9a65178
Compare
Three fixes that together enable end-to-end DIPs on-chain acceptance: 1. Pass SubgraphService (not HorizonStaking) to RewardsManager.getRewards in the allocation stakeUsageSummary call. 2. Decouple DIPs proposal acceptance from the 120s reconciliation loop into a dedicated 5s polling loop (startProposalAcceptanceLoop). The 300s RCA deadline left insufficient slack with the old 240s+ latency. 3. Log full revert context (reason, data, message, contract target) when on-chain acceptance fails, instead of just the parsed error (which was null for unknown custom errors). Test metadata version updated to 0 to match the Solidity enum IndexingAgreementVersion.V1 (first variant = 0). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
9a65178 to
15d1704
Compare
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's DIPs on-chain acceptance path had three issues preventing agreements from being accepted on-chain. These were discovered during local end-to-end testing of the full DIPs pipeline (dipper -> IISA -> proposal -> indexer-service -> agent -> SubgraphService contract).
Summary
1. Wrong contract in getRewards call
AllocationManager.stakeUsageSummary()calledRewardsManager.getRewards(HorizonStaking, allocationId)butHorizonStakingis not a registered rewards issuer --SubgraphServiceis. Every allocation operation (including DIPs acceptance) reverted with "Not a rewards issuer".2. Acceptance latency exceeded RCA deadline
Proposal acceptance was tied to the agent's 120s reconciliation loop, requiring 2+ cycles (240s+) before attempting on-chain acceptance. The RCA deadline is 300s, leaving insufficient slack. Added a dedicated
startProposalAcceptanceLoop()that pollspending_rca_proposalsevery 5 seconds, independent of the reconciliation cycle.3. Opaque contract revert errors
When on-chain acceptance failed, the log showed
error: nullbecausetryParseCustomErrorcouldn't decode unknown custom errors. Added full revert context (reason, data, message, contract target) to the rejection log so the root cause is immediately visible.Test metadata version updated to
0to matchIndexingAgreementVersion.V1(first Solidity enum variant = 0). See companion PRs: edgeandnode/dipper#583, graphprotocol/indexer-rs#983.Generated with Claude Code