Skip to content

[DIPS] Cherry-pick old commits + contracts setup#1172

Merged
Maikol merged 7 commits intomain-dipsfrom
feat/dips-support
Apr 10, 2026
Merged

[DIPS] Cherry-pick old commits + contracts setup#1172
Maikol merged 7 commits intomain-dipsfrom
feat/dips-support

Conversation

@Maikol
Copy link
Copy Markdown
Member

@Maikol Maikol commented Feb 25, 2026

No description provided.

@github-project-automation github-project-automation bot moved this to 🗃️ Inbox in Indexer Feb 25, 2026
@MoonBoi9001
Copy link
Copy Markdown
Member

@Maikol, just seen this PR while setting up local-network and had a query about merge strategy. Are we merging to main-dips here instead of main?

@Maikol
Copy link
Copy Markdown
Member Author

Maikol commented Feb 26, 2026

@MoonBoi9001 yes, good point. I'll create a main-dips from main and change the base branch for this PR.

@Maikol Maikol changed the base branch from main to main-dips February 26, 2026 13:48
@Maikol Maikol changed the title [WIP] Indexing Payments support [DIPS] Cherry-pick old commits + contracts setup Feb 26, 2026
@Maikol Maikol marked this pull request as ready for review February 26, 2026 13:48
pcarranzav and others added 6 commits March 11, 2026 15:46
This squashed commit adds support for DIPs (Distributed Indexing Payments), which allows
indexers to receive indexing fees for indexing subgraphs requested via the DIPs system.

Key changes:
- Add 'dips' as a new IndexingDecisionBasis enum value
- Add indexing agreements model and database support
- Add DIPs client for interacting with the gateway DIPs service
- Support for matching DIPs agreements with allocations
- Allow actions on deployments that are not published yet (for DIPs)
- Update allocation management to handle DIPs-based allocations
- Add proper handling for cancelled agreements

Co-authored-by: Multiple contributors from the DIPs development team
- Updated all DIPs-related code to use ethers v6 API
- Migrated from BigNumberish to bigint for all numeric operations
- Fixed provider and signer initialization patterns
- Updated test suite to use new ethers v6 patterns
- Removed temporary migration documentation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add DipsReceipt model with snake_case fields matching database conventions
- Update DipsCollector to store Receipt IDs instead of TAP receipts
- Implement GetReceiptById polling in collectAllPayments method
- Update to @graphprotocol/dips-proto 0.3.0 for new proto definitions
- Remove TAP receipt dependencies from DIPs payment flow
- Add comprehensive logging for payment status transitions

This completes the indexer-agent implementation for the new DIPs Safe
payment system, replacing TAP receipts with an asynchronous Receipt ID
based approach.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
The third DIP commit changed tryCollectPayment to use receipt-based
responses (receiptId, amount) but the test still mocked the old
tapReceipt-based response shape. Also regenerates yarn.lock with
new DIP dependencies.
@Maikol Maikol force-pushed the feat/dips-support branch from 7d5af34 to e8eb72f Compare March 11, 2026 19:10
Comment on lines +99 to +104
async tryUpdateAgreementAllocation(
deploymentId: string,
oldAllocationId: Address | null,
newAllocationId: Address | null,
) {
const agreement = await this.models.IndexingAgreement.findOne({
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If two active agreements exist for the same deployment (e.g. different payers), only one gets its allocation tracking updated. Consider using findAll here, or adding cancelled_at: null to the where clause.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I think there might be more things to adjust for supporting multiple agreements. For MVP I think we could enforce a single agreement per subgraph. But we should still try to get it as close to supporting multiple so I can fix this in a later PR.


logger.info('Removing dips from decision basis')
await queryInterface.sequelize.query(
`ALTER TYPE "enum_IndexingRules_decisionBasis" DROP VALUE 'dips'`,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, we should probably clean this migration before merging. I'll add a task to do this.

@github-project-automation github-project-automation bot moved this from 🗃️ Inbox to ✅ Approved in Indexer Apr 8, 2026
MoonBoi9001 added a commit to MoonBoi9001/claude-code-cli-tools that referenced this pull request Apr 8, 2026
## Motivation

When reviewing PRs with Claude, spinning up review agents produces a lot
of raw findings but the severity rankings are unreliable.
Pattern-matching agents flag dead code as critical vulnerabilities and
rank "two systems exist" as a security breach. The user ends up doing
more work triaging false positives than they saved by delegating the
review.

This skill addresses that by building a severity calibration pipeline
around the agents: each finding must prove impact (who calls it, what
triggers it, what happens), and a post-consolidation challenge step
verifies claims against the actual code before presenting results.

## Summary

- Spawns 6 specialized review agents in parallel (architecture,
correctness, security, test coverage, code quality, integration)
- Each agent has a defined lane with specific patterns to hunt for,
reducing overlap
- Severity challenge step verifies every Significant+ finding by reading
the code, checking callers, and asking "so what?"
- Gap check step searches for patterns agents commonly miss (fail-open
catches, parallel systems, data model inconsistencies, inverse findings)
- Writes verified findings to `pr-reviews/pr-{number}-review.md` with
checkboxes

Developed iteratively over 4 rounds of testing against real PRs
(graphprotocol/indexer#1172 and #1174), with severity calibration
improving each round.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added automated GitHub pull request review capability. The system
analyzes code changes across specialized review dimensions, evaluates
pull request metrics and complexity, identifies code issues at varying
severity levels with confidence signaling, performs targeted gap
analysis, and generates comprehensive review reports with detailed
findings.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Maikol Maikol merged commit 6b20bf6 into main-dips Apr 10, 2026
3 checks passed
@Maikol Maikol deleted the feat/dips-support branch April 10, 2026 13:21
@github-project-automation github-project-automation bot moved this from ✅ Approved to 🚗 Merged in Indexer Apr 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: 🚗 Merged

Development

Successfully merging this pull request may close these issues.

3 participants