Skip to content
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

Merged
merged 1 commit into from
Jun 9, 2021
Merged

implement a command to export a car #6405

merged 1 commit into from
Jun 9, 2021

Conversation

Stebalien
Copy link
Member

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.


var exportCarCmd = &cli.Command{
Name: "export-car",
Description: "Export a car from repo (requires node to be offline)",
Copy link
Contributor

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)

Copy link
Member Author

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?

Copy link
Contributor

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

Copy link
Member Author

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.

@magik6k
Copy link
Contributor

magik6k commented Jun 8, 2021

(comments not blocking merge, this is already pretty useful)

@Stebalien
Copy link
Member Author

@magik6k I'm not able to merge this.

package main

import (
"context"
Copy link
Contributor

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

Copy link
Member Author

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"

@magik6k magik6k merged commit c4a86ba into master Jun 9, 2021
@magik6k magik6k deleted the steb/export-car branch June 9, 2021 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants