graphprotocol / graphprotocol/graph-node
Prune Auto Issue
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.2k
- Forks
- 1.1k
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 1
Description
A user ran into this error after setting prune: auto in his manifest:
Failed to deploy to graph node 0.0.0.0:8020/: subgraph deployment error: store error: new row for relation "subgraph_manifest" violates check constraint "subgraph_manifest_history_blocks_check"
He is running graph-node 0.37.0 locally and does not have a min_history_blocks set in his environment variables. We may want to set this as a high number for a default figure (eg 100,000). Alternatively it might be better to remove the auto option and require the user state the specific history_blocks desired in the manifest.
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 graph/src/data/subgraph/mod.rs around line 603 and trace how prune:auto determines history_blocks when min_history_blocks is unset. Reproduce the graph-node 0.37.0 deployment failure with the manifest configuration described. Done means the intended handling of prune:auto is decided and deployments no longer violate the subgraph_manifest_history_blocks_check constraint.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100