-
Notifications
You must be signed in to change notification settings - Fork 59
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
Data Transfer V2 Integration, Rebased #757
Conversation
319fef7
to
cd7796b
Compare
if !ok { | ||
voucher := channelState.Voucher() | ||
if voucher.Voucher == nil { | ||
log.Errorf("received empty voucher") |
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.
if we get this in the logs, what is the likelihood that it's going to be in close-enough proximity to other messages that tell us what transfer this is for? do we need to start putting context-specific information in these messages to help with debugging?
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.
a good question. ultimately, our pressing priority is going to be to improve error messages returned over the wire, since the data we collect is primarily from the client side. We often already have plenty of information on this side, but minimal ability to access it (cause it's per miner logs).
Let's address this as we move forward.
@@ -47,52 +45,46 @@ var ProviderEvents = fsm.Events{ | |||
// receiving blocks | |||
fsm.Event(rm.ProviderEventBlockSent). | |||
FromMany(rm.DealStatusOngoing).ToNoChange(). | |||
From(rm.DealStatusUnsealed).To(rm.DealStatusOngoing). | |||
Action(func(deal *rm.ProviderDealState, totalSent uint64) error { |
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.
a ProviderEventBlockSent
is fired in retrievalmarket/impl/requestvalidation/revalidator.go with an argument; is there any harm in leaving that in, should we remove it just to tidy up?
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.
this file no longer exists
|
||
// request payment | ||
fsm.Event(rm.ProviderEventPaymentRequested). | ||
FromMany(rm.DealStatusOngoing, rm.DealStatusUnsealed).To(rm.DealStatusFundsNeeded). | ||
From(rm.DealStatusFundsNeeded).ToJustRecord(). | ||
From(rm.DealStatusBlocksComplete).To(rm.DealStatusFundsNeededLastPayment). | ||
From(rm.DealStatusNew).To(rm.DealStatusFundsNeededUnseal). | ||
Action(func(deal *rm.ProviderDealState, totalSent uint64) error { |
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.
there's two ProviderEventPaymentRequested
events in retrievalmarket/impl/requestvalidation/revalidator.go with arguments
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.
this file no longer exists
should the ffi have been updated with this too? |
LegacyProtocol: true, | ||
}, nil | ||
// NoOpClientDealState0To1 does nothing (old type removed) | ||
func NoOpClientDealState0To1(oldDs *maptypes.ClientDealState1) (*maptypes.ClientDealState1, error) { |
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.
What are these noop 0To1 migrations for?
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.
This is an annoying part of the migration system -- it has to start from 0... even though I'm intentionally dropping the support here for making these changes. Reason # 243388 to not role your own database and database migration system.
} | ||
currentInterval := uint64(0) | ||
bytesPaid := fundsReceived | ||
if !p.UnsealPrice.NilOrZero() { |
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.
if these can be nil
then do we need checks in IntervalLowerBound
as well? we just proceed as if they're set
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.
Went over it all, hard to remember which bits are mine and which aren't. I'll admit to not following much of the provider states tests although they are nice coverage for that stuff.
03c4f97
to
5bc3411
Compare
0ec8e36
to
68279a8
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #757 +/- ##
==========================================
+ Coverage 57.66% 58.17% +0.51%
==========================================
Files 66 64 -2
Lines 5564 5373 -191
==========================================
- Hits 3208 3125 -83
+ Misses 2013 1918 -95
+ Partials 343 330 -13
|
68279a8
to
e6a7ac9
Compare
e6a7ac9
to
143abad
Compare
2217ef5
to
ca5e771
Compare
Voucher refactor integration (#707) * refactor(storagemarket): update storagemarket * refactor(retrievalmarket): use new voucher system refactor for predictability and correctness using new voucher system * chore(deps): update go-data-transfer v2 * style(lint): prep for pr * docs(retrievalmarket): add comments * chore(deps): update go-statemachine * style(imports): fix imports chore(retrievalmarket): remove old types (#712) feat(ipld): bindnode support for all voucher types (#713) * feat(ipld): new data-transfer ipld vouchers + bindnode * feat(ipld): simplify ipldutils API * feat(ipld): use new bindnode registry in go-ipld-prime Ref: ipld/go-ipld-prime#437 feat(deps): update data transfer 61f0756c feat(deps): update data transfer and other deps update to master data transfer with libp2p v0.22.0 plus associated other deps Update retrievalmarket/types.go Update storagemarket/types.go chore(deps): update to rc candidate chore(dtutils): update for new data transfer configuration interface chore(deps): update to rc4
ca5e771
to
523aa39
Compare
Goals
Update to go data transfer v2!
Implementation
This is a rebase and update for #718, now using go-data-transfer v2 on master, not quite yet tagged.
@rvagg several of these changes are yours.
Others are my own. None are really "new" code since #718
This is dependent on #755, and also should go in after #752.
Also, we shouldn't merge until we get data transfer tagged. I'd like to deploy this in our autoretrieve instance and also maybe sofia miner first.