graphprotocol / graphprotocol/indexer

Agent: verify `RecurringCollector.rcaOffers` before `acceptIndexingAgreement`

Open
#1,198 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

DIPS
Dominant language
TypeScript
Stars
262
Forks
148
PR merge metrics
No merged PRs in 30d

Description

After the DIPs proposal-first migration (edgeandnode/dipper#607, graphprotocol/indexer-rs#1009), offer existence is enforced only by the contract call itself, and the agent avoids burning gas only because estimateGas catches the revert — defense-in-depth by accident.

Add an explicit rcaOffers(agreementId) read before submitting; on miss, skip and retry with a timeout; on hash mismatch, drop permanently. Needs deriveAgreementId and hashRCA helpers in @graphprotocol/toolshed first — neither exists today.

Context: malicious/absent payer sends valid gRPC proposal → indexer-rs accepts on terms → agent loops on estimateGas → error → retry indefinitely. No gas lost, but unbounded RPC/DB churn.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Agent path around RecurringCollector.rcaOffers and acceptIndexingAgreement, including the existing estimateGas retry behavior. Verify how deriveAgreementId and hashRCA would be provided by @graphprotocol/toolshed. Done means missing offers retry with a timeout, while hash mismatches are dropped permanently before submission.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, typescript
Domain
backend-api-design, blockchain, distributed-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.