Find out what's up with data transfers! #3162
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goals
This started as helping me understand what was happening with data transfers... and turned into something that I think will be super useful for all.
It adds
lotus client list-transfers
along withlotus client list-transfers --watch
which allows you to watch data transfers in real time.This is a screen shot as about 6 128MB pieces are sent over the wire...
Implementation
In addition to the CLI, there are two new APIs:
ClientListDataTransfers which gets the current list of transfers
ClientDataTransferUpdates which returns a channel of updates to data transfers
also defines a data type api.DataTransferChannel which collects the most relevant information from the overall data transfer channel state and outputs to the channel
voucher output will improve with a future update to go-fil-markets so the storage and retrieval vouchers have string form
Note: not trying to force this into calibnet or space race, though it should be very non-breaking (just code adds). I'd really like to get in for mainnet though. In the meantime I can just cherry-pick a squashed commit but I imagine this will be very useful to many.