graphprotocol / graphprotocol/indexer
Use contract calls when confirming `allocate` action
Nobody has claimed this yet.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.