-
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
implement a command to export a car #6405
Conversation
8d3012d
to
f248674
Compare
|
||
var exportCarCmd = &cli.Command{ | ||
Name: "export-car", | ||
Description: "Export a car from repo (requires node to be offline)", |
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.
We could support online-mode with the API blockstore (blockstore.NewAPIBlockstore
)
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.
Is there a good way to detect this?
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.
I guess do something like what we do in https://github.com/filecoin-project/lotus/blob/master/cli/wait.go
Could also just be an explicit --offline flag
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.
Eh, I'd rather not spend time on this for now.
(comments not blocking merge, this is already pretty useful) |
f248674
to
4624b20
Compare
@magik6k I'm not able to merge this. |
cmd/lotus-shed/export-car.go
Outdated
package main | ||
|
||
import ( | ||
"context" |
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.
CI says this is unused
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.
"just one little change, what could go wrong"
4624b20
to
a64a059
Compare
Add a lotus-shed command for exporting a car of an arbitrary dag.
Currently, we allow exporting tipsets, etc. But we don't have any convenient commands for simply exporting an arbitrary dag for analysis. This is useful for, e.g., analyzing bad actor states.