Open rvagg opened 3 days ago
Some thoughts on how to attack this:
lotus
CLI is instantiated - cmd/lotus/main.go - it pulls in its subcommands from cli/clicommands/cmd.go, which is where the initial groupings get set that you see in lotus help
.DEVELOPER
list as index Manage the chain indexer
chainindex
but I think we should just be index
for the new one. It has one sub-sub-command, validate-backfill
, which is what we're moving. That file needs to move into the cli/ package, I think we should just call it index.go. Have a look at chain.go as a template for how it should be organised, and follow where ChainCmd
is used, we want to add an IndexCmd
.GetFullNodeAPI
and friends. Basically we want to make this command fit in to lotus
, and hopefully it's pretty close as it is and this will mostly be about just moving the file and its wiring.
The new chain_index.go functionality in lotus-shed is more like a lotus command now than the previous sqlite db management utilities. It interacts via RPC and doesn't do any shonky multi-writer work anymore and our documentation treats it as a normal part of a workflow, so we should just normalise it.
Let's move it into the
lotus
CLI. I think it could either go in under the existingchain
subcommand as anindex
sub-sub command, or it we could just add a new top-levelindex
subcommand in the same DEVELOPER group aschain
.