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

Miner Data Transfer Restart Cmd #4387

Closed
wants to merge 2 commits into from

Conversation

aarshkshah1992
Copy link
Contributor

Closes #4380.

@hannahhoward Where should I add the documentation for this command ?

@@ -102,6 +104,9 @@ type StorageMiner interface {
PiecesGetPieceInfo(ctx context.Context, pieceCid cid.Cid) (*piecestore.PieceInfo, error)
PiecesGetCIDInfo(ctx context.Context, payloadCid cid.Cid) (*piecestore.CIDInfo, error)

// MinerRestartDataTransfer attempts to restart a data transfer with the given transfer ID and other peer
MinerRestartDataTransfer(ctx context.Context, transferID datatransfer.TransferID, otherPeer peer.ID, isInitiator bool) error
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably be prefixed with Markets and be next to MarketDataTransferUpdates

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree

Copy link
Contributor

@hannahhoward hannahhoward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Naming change suggested by @magik6k
  • Command should just be "restart"
  • Initiator should default to false on miner side

I also noticed there's a change to test-vectors in this PR -- is that intentional? If not, remove

}

var minerRestartTransfer = &cli.Command{
Name: "restart-transfer",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can just be "restart" rather than "restart-transfer" cause the miner command will already be under the "data-transfers" namespace

&cli.BoolFlag{
Name: "initiator",
Usage: "specify only transfers where peer is/is not initiator",
Value: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initiator on this side should default to false 99% of the time the miner is NOT the initiator of the request (even when sending data)

@aarshkshah1992
Copy link
Contributor Author

@magik6k @hannahhoward Have made the changes. The test failure looks like a flaky.

@magik6k
Copy link
Contributor

magik6k commented Oct 26, 2020

Done in #4572

@magik6k magik6k closed this Oct 26, 2020
@Kubuxu Kubuxu deleted the feat/miner-data-transfer-restart-api branch November 25, 2021 18:59
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.

Add data transfer restart for the miner
3 participants