-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add lotus-shed command for backfilling txhash.db #10932
Conversation
307bcb3
to
d0cbd9b
Compare
I would suggest to move this to |
d0cbd9b
to
f6b0b36
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable, two small comments
Did we test that it works on mainnet/devnets?
cli/evm.go
Outdated
|
||
var EvmBackfillTxHashCmd = &cli.Command{ | ||
Name: "backfill-txhash", | ||
Description: "Backfills the txhash.db for a number of epochs starting from a specified height", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be Usage
cli/evm.go
Outdated
&cli.StringFlag{ | ||
Name: "repo", | ||
Value: "~/.lotus", | ||
Usage: "path to the repo", | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is already defined as a global flag, shouldn't be needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@magik6k I think its needed as EvmCmd
does not have this as a Flag, at least skipping it produces an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we move this back to lotus-shed, you shouldn't need this flag.
I tested both locally on mainet using lightweight snapshot, and also on fevm arvhival node (see test plan). I did not test on devnet though. |
i did for calibration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, but I think we need to move this back to lotus-shed. The Lotus CLI is meant to be run against a live node, so we can't have commands that require locking the db.
I'd suggest adding a subcategory under shed for indexes, and include this along with the msgindex
command and others.
d2b8c9c
to
61ec334
Compare
61ec334
to
26b4866
Compare
@arajasek moved back to lotus-shed and introduced a new |
Context
This PR adds a new lotus-shed command for backfilling the txhash.db.
It also moves existing command related to managing sqlite indices into a
indexes
subcategory.New help format:
Test Plan
Compile:
Run backfilling (on local node with 2k blocks):
Run backfilling on fevm archival node: