graphprotocol / graphprotocol/graph-node
Make using an illegal enum value a deterministic error
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.2k
- Forks
- 1.1k
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 1
Description
If an entity uses a value for an enum that is not part of the enum, the subgraph fails with a non-deterministic error along the lines of
Mar 31 23:48:52.214 ERRO Subgraph failed with non-deterministic error: Error while processing block stream for a subgraph: store error: invalid input value for enum sgd249350.contract_topic: "CAMANAGER", retry_delay_s: 1800, attempt: 8, sgd: 249350, subgraph_id: QmXW8msFbPZq2RNUHDk1RK1KBkRnj8R48HF3pkzhM2vq4t, component: SubgraphInstanceManager
which leads to attempts to retry the operation every 30 minutes. Those retries are futile - the subgraph has no chance of making progress.
Contributor guide
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.
Research direction
Start at the subgraph block-stream processing path and the store error handling around SubgraphInstanceManager; the issue provides no file or test path. Reproduce an enum value outside the declared enum and verify it is reported as a deterministic failure rather than retried every 30 minutes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, rust
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100