graphprotocol / graphprotocol/graph-node
DISABLE_BLOCK_INGESTOR does not disable block ingestion
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.2k
- Forks
- 1.1k
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 1
Description
Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
If the DISABLE_BLOCK_INGESTOR is set to true, 'true', or "true" the subgraph writer / block ingestion is still started when running graph-node
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Reproduction steps:
Using the v.0.27.0 build or image from docker hubgraphprotocol:graph-node:v0.27.0
- Set
DISABLE_BLOCK_INGESTOR=trueand start the graph node - Check the logs and see that the block ingestion and indexing still occurs.
What is the expected behavior?
The expected behavior is that the graph node starts in 'query' only mode with block ingestion and indexing disabled.
Further Digging
I've found that the correct way to disable block ingestion is to set the env var node_id to something other than 'default'. If node_id is not provided, the node name is set to default and the graph-node assumes it needs to ingest and index. This can be verified by setting node_id=default.
Setting node_id to anything else start the graph-node with block ingestion and indexing disabled. Looking at the docker start script, you can also pass node_role=query-node which is sugar for setting DISABLE_BLOCK_INGESTOR=true. This has no effect either and leaving node_role unset has no effect on whether the node starts in query or indexing mode.
Proposed Fixes
Either update the env var readme and remove DISABLE_BLOCK_INGESTOR and describe the node_id behavior.
Respect DISABLE_BLOCK_INGESTOR flag.
I'm happy to open a PR to update the README if this should be the fix.
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 by checking docs/environment-variables.md and the Docker start script for how DISABLE_BLOCK_INGESTOR and node_role are documented and passed through. Trace the startup path that selects query-only versus indexing mode, then verify the expected behavior by running the v0.27.0 image with DISABLE_BLOCK_INGESTOR=true and confirming that block ingestion and indexing do not start.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, rust
- Domain
- backend, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100