graphprotocol / graphprotocol/graph-node

[Feature] Deployments with limited history should not keep history during syncing

Open
#4,477 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/indexing enhancement Stale
Dominant language
Rust
Stars
3.2k
Forks
1.1k
Avg merge
4d 1h
Merged PRs (30d)
1

Description

Description

When syncing a subgraph that has limited history, i.e. has history_blocks set, we should not keep any history while we are syncing more than history_blocks away from the chain head. When storing an update to an entity, simply overwrite the old version of the entity instead of keeping the old and the new version.

Are you aware of any blockers that must be resolved before implementing this feature? If so, which? Link to any relevant GitHub issues.

No response

Some information to help us out
  • Tick this box if you plan on implementing this feature yourself.
  • I have searched the issue tracker to make sure this issue is not a duplicate.

Contributor guide

Open the contributing guide

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.

Research direction

Start by tracing the entity update and storage path used when syncing deployments with history_blocks; the issue does not name specific files or tests. Confirm how versions are retained beyond the configured history window, then add coverage showing that updates older than the window overwrite the previous entity version while in-range history remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.