Skip to content

Provide a control for subgraph pruning in the subgraph manifest #3667

@lutter

Description

@lutter

With #3666, operators can control pruning of individual subgraphs, but it requires user action for each subgraph that should be pruned.

There should be a control that automatically prunes subgraphs without the need to explicitly run graphman prune. There are a few options for this:

  • Make pruning part of the subgraph manifest so that subgraph authors can indicate how much history should be retained
  • Allow operators to set how much history to retain through configuration, e.g., for each chain in graph-node.toml, or through additional rules in graph-node.toml based on subgraph names

Making pruning part of the manifest has the downside that subgraphs that only differ in how much history they retain will have different IPFS hashes, even though they are really the same subgraph, and can all be used to serve the same queries, assuming that the query is for a block height within the subgraph's available history. As an example, a subgraph that retains all history and a subgraph that only retains the last 1000 blocks of history can both be used to respond to a query at a block that is less than 1000 blocks behind the subgraph head.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions