Skip to content

Commit 4eb45ca

Browse files
docs: update references for lotus-shed chainindex to lotus index (#12684)
* update docs * update docs * chore: run `make docsgen-cli` chore: run `make docsgen-cli` --------- Co-authored-by: Phi <[email protected]>
1 parent 99cf232 commit 4eb45ca

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

cli/index.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var validateBackfillChainIndexCmd = &cli.Command{
2424
Name: "validate-backfill",
2525
Usage: "Validates and optionally backfills the chainindex for a range of epochs",
2626
Description: `
27-
lotus-shed chainindex validate-backfill --from <start_epoch> --to <end_epoch> [--backfill] [--log-good] [--quiet]
27+
lotus index validate-backfill --from <start_epoch> --to <end_epoch> [--backfill] [--log-good] [--quiet]
2828
2929
The command validates the chain index entries for each epoch in the specified range, checking for missing or
3030
inconsistent entries (i.e. the indexed data does not match the actual chain state). If '--backfill' is enabled
@@ -47,7 +47,7 @@ Example usage:
4747
4848
To validate and backfill the chain index for the last 5760 epochs (2 days) and log details for all epochs:
4949
50-
lotus-shed chainindex validate-backfill --from 1000000 --to 994240 --log-good
50+
lotus index validate-backfill --from 1000000 --to 994240 --log-good
5151
5252
This command is useful for backfilling the chain index over a range of historical epochs during the migration to
5353
the new ChainIndexer. It can also be run periodically to validate the index's integrity using system schedulers

documentation/en/chain-indexer-overview-for-operators.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
- [Backfill](#backfill)
1818
- [Backfill Timing](#backfill-timing)
1919
- [Backfill Disk Space Requirements](#backfill-disk-space-requirements)
20-
- [`lotus-shed chainindex validate-backfill` CLI tool](#lotus-shed-chainindex-validate-backfill-cli-tool)
20+
- [`lotus index validate-backfill` CLI tool](#lotus-shed-chainindex-validate-backfill-cli-tool)
2121
- [Usage](#usage)
2222
- [Regular Checks](#regular-checks)
2323
- [Downgrade Steps](#downgrade-steps)
@@ -201,7 +201,7 @@ Note: this upgrade path assumes one is starting a fresh node and importing chain
201201
- 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.
202202
6. **Backfill so ETH RPC events and transactions are indexed as well**
203203
- 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`
205205
- 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`
206206
6. **Ensure node health**
207207
- 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
218218

219219
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)).
220220

221-
### `lotus-shed chainindex validate-backfill` CLI tool
222-
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.
223223

224224
**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.**
225225

226226
#### Usage
227227

228228
```
229-
lotus-shed chainindex validate-backfill --from <start_epoch> --to <end_epoch> [--backfill] [--log-good]
229+
lotus index validate-backfill --from <start_epoch> --to <end_epoch> [--backfill] [--log-good]
230230
```
231231

232232
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.
233233

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`.
235235

236236
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.
237237

238238
## Regular Checks
239239

240240
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.
241241

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:
243243

244244

245245
```bash
@@ -308,7 +308,7 @@ In case you need to downgrade to the [previous indexing system](#previous-indexi
308308
* It replaced the [previous indexing system](#previous-indexing-system).
309309
* 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).
310310
* 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)
312312
* **Storage requirements:** See the [backfill disk space requirements](#backfill-disk-space-requirements).
313313
* **Backfil times:** See the [backfill timing](#backfill-timing).
314314

documentation/en/cli-lotus.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2268,7 +2268,7 @@ USAGE:
22682268
22692269
DESCRIPTION:
22702270
2271-
lotus-shed chainindex validate-backfill --from <start_epoch> --to <end_epoch> [--backfill] [--log-good] [--quiet]
2271+
lotus index validate-backfill --from <start_epoch> --to <end_epoch> [--backfill] [--log-good] [--quiet]
22722272
22732273
The command validates the chain index entries for each epoch in the specified range, checking for missing or
22742274
inconsistent entries (i.e. the indexed data does not match the actual chain state). If '--backfill' is enabled
@@ -2291,7 +2291,7 @@ DESCRIPTION:
22912291
22922292
To validate and backfill the chain index for the last 5760 epochs (2 days) and log details for all epochs:
22932293
2294-
lotus-shed chainindex validate-backfill --from 1000000 --to 994240 --log-good
2294+
lotus index validate-backfill --from 1000000 --to 994240 --log-good
22952295
22962296
This command is useful for backfilling the chain index over a range of historical epochs during the migration to
22972297
the new ChainIndexer. It can also be run periodically to validate the index's integrity using system schedulers

0 commit comments

Comments
 (0)