graphprotocol / graphprotocol/indexer

Use contract calls when confirming `allocate` action

Open
#878 1 comment 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

enhancement indexer-agent
Dominant language
TypeScript
Stars
262
Forks
148
PR merge metrics
No merged PRs in 30d

Description

Currently when confirming an allocate action the network subgraph is queried to get the subgraph deployment. If the process of publishing the subgraph to the network and allocating happened very quickly in sequence the subgraph deployment may not be searchable on the network subgraph yet, leading to the following error SHOULD BE UNREACHABLE: No matching subgraphDeployment (${subgraphDeploymentID.ipfsHash}) found on the network. Code here

To improve robustness of this step we should update the matchingRuleExists function to get this data from the contracts directly (or fall back to the contracts if not available on the network subgraph), so we are not relying on the network subgraph being instantly updated to get this information. Additionally let's take a minute to audit any other confirmation data and update to this more robust method to avoid similar race conditions.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.