You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[`lotus index validate-backfill` CLI tool](#lotus-shed-chainindex-validate-backfill-cli-tool)
21
21
-[Usage](#usage)
22
22
-[Regular Checks](#regular-checks)
23
23
-[Downgrade Steps](#downgrade-steps)
@@ -201,7 +201,7 @@ Note: this upgrade path assumes one is starting a fresh node and importing chain
201
201
- As the Lotus daemon syncs the chain, the ChainIndexer will automatically index the synced messages, but it will not automatically sync ETH RPC events and transactions.
202
202
6.**Backfill so ETH RPC events and transactions are indexed as well**
203
203
- See the ["Backfill" section below](#backfill).
204
-
- This will look something like `lotus-shed chainindex validate-backfill --from <head_epoch> --to <epoch_corresponding_with_how_much_state_in_past_want_to_index> --backfill`
204
+
- This will look something like `lotus index validate-backfill --from <head_epoch> --to <epoch_corresponding_with_how_much_state_in_past_want_to_index> --backfill`
205
205
- Example: if the current head is epoch 4360000 and one wants to index a day's worth of epochs (2880), then they'd use `--from 4360000 --to 4357120`
206
206
6.**Ensure node health**
207
207
- Perform whatever steps are usually done to validate a node's health before handling traffic (e.g., log scans, smoke tests)
@@ -218,28 +218,28 @@ Backfilling the new `ChainIndexer` was [benchmarked to take approximately ~12 ho
218
218
219
219
As of 202410, ChainIndexer will accumulate approximately ~340 MiB per day of data, or 10 GiB per month (see [here](https://github.com/filecoin-project/lotus/issues/12453)).
The `lotus-shed chainindex validate-backfill` command is a tool for validating and optionally backfilling the chain index over a range of epochs since calling the [`ChainValidateIndex` API](#chainvalidateindex-rpc-api) for a single epoch at a time can be cumbersome, especially when backfilling or validating the index over a range of historical epochs, such as during a backfill. This tool wraps the `ChainValidateIndex` API to efficiently process multiple epochs.
221
+
### `lotus index validate-backfill` CLI tool
222
+
The `lotus index validate-backfill` command is a tool for validating and optionally backfilling the chain index over a range of epochs since calling the [`ChainValidateIndex` API](#chainvalidateindex-rpc-api) for a single epoch at a time can be cumbersome, especially when backfilling or validating the index over a range of historical epochs, such as during a backfill. This tool wraps the `ChainValidateIndex` API to efficiently process multiple epochs.
223
223
224
224
**Note: This command can only be run when the Lotus daemon is already running with the [`ChainIndexer` enabled](#enablement) as it depends on the `ChainValidateIndex` RPC API.**
lotus index validate-backfill --from <start_epoch> --to <end_epoch> [--backfill] [--log-good]
230
230
```
231
231
232
232
The command validates the chain index entries for each epoch in the specified range, checking for missing or inconsistent entries (i.e. the indexed data does not match the actual chain state). If `--backfill` is enabled (which it is by default), it will attempt to backfill any missing entries using the `ChainValidateIndex` API.
233
233
234
-
You can learn about how to use the tool with `lotus-shed chainindex validate-backfill -h`.
234
+
You can learn about how to use the tool with `lotus index validate-backfill -h`.
235
235
236
236
Note: If you are using a non-standard Lotus repo directory then you can run the command with `lotus-shed -repo /path/to/lotus/repo chainindex validate-backfill ...`, or by setting the `LOTUS_REPO` environment variable.
237
237
238
238
## Regular Checks
239
239
240
240
During normal operation, it is possible, but not strictly necessary, to run periodic checks on the index to ensure it remains consistent with the chain state. The ChainIndexer is designed to be resilient and consistent, but unconsidered edge-cases, or bugs, could cause the index to become inconsistent.
241
241
242
-
The `lotus-shed chainindex validate-backfill` command can be used to validate the index over a range of epochs and can be run periodically via cron, systemd timers, or some other means, to ensure the index remains consistent. An example bash script one could use to validate the index over the last 24 hours every 24 hours is provided below:
242
+
The `lotus index validate-backfill` command can be used to validate the index over a range of epochs and can be run periodically via cron, systemd timers, or some other means, to ensure the index remains consistent. An example bash script one could use to validate the index over the last 24 hours every 24 hours is provided below:
243
243
244
244
245
245
```bash
@@ -308,7 +308,7 @@ In case you need to downgrade to the [previous indexing system](#previous-indexi
308
308
* It replaced the [previous indexing system](#previous-indexing-system).
309
309
* It is composed of a single indexer, [`ChainIndexer`](https://github.com/filecoin-project/lotus/blob/master/chain/index/indexer.go), using a [single database for transactions, messages, and events](https://github.com/filecoin-project/lotus/blob/master/chain/index/ddls.go).
310
310
* It persists state to `${LOTUS_PATH}/chainindex`.
311
-
* It has this CLI backfill tooling: [`lotus-shed chainindex validate-backfill`](#lotus-shed-chainindex-validate-backfill-cli-tool)
311
+
* It has this CLI backfill tooling: [`lotus index validate-backfill`](#lotus-shed-chainindex-validate-backfill-cli-tool)
312
312
***Storage requirements:** See the [backfill disk space requirements](#backfill-disk-space-requirements).
313
313
***Backfil times:** See the [backfill timing](#backfill-timing).
0 commit comments