Skip to content

Agent: verify RecurringCollector.rcaOffers before acceptIndexingAgreement #1198

@MoonBoi9001

Description

@MoonBoi9001

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions