Skip to content

Commit 192869f

Browse files
committed
node: Document cache_size setting in config.md
1 parent 2b9b38b commit 192869f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/config.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,13 @@ whose `--node-id` matches the `ingestor` value. The
110110
acts as a hard override that always prevents ingestion regardless of
111111
the config.
112112

113+
The section-level setting `cache_size` controls the default number of
114+
blocks from the chain head for which block data is kept cached. Individual
115+
chains can override this value. The default is 500. When the environment
116+
variable `GRAPH_STORE_IGNORE_BLOCK_CACHE` is set, blocks older than
117+
`cache_size` are treated as if they have no data. The value must be greater
118+
than the reorg threshold.
119+
113120
The configuration for a chain `name` is specified in the section
114121
`[chains.<name>]`, with the following:
115122

@@ -120,6 +127,8 @@ The configuration for a chain `name` is specified in the section
120127
- `amp`: the network name used by AMP for this chain; defaults to the chain name.
121128
Set this when AMP uses a different name than graph-node (e.g., `amp = "ethereum-mainnet"`
122129
on a chain named `mainnet`).
130+
- `cache_size`: number of blocks from the chain head for which to keep
131+
block data cached. Defaults to the section-level `cache_size`.
123132
- `provider`: a list of providers for that chain
124133

125134
A `provider` is an object with the following characteristics:
@@ -168,6 +177,7 @@ optimisations.
168177
```toml
169178
[chains]
170179
ingestor = "block_ingestor_node"
180+
cache_size = 500
171181
[chains.mainnet]
172182
shard = "vip"
173183
amp = "ethereum-mainnet"

0 commit comments

Comments
 (0)