-
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
Flush out & fix retrieval bugs #525
Conversation
Looks great 👍 Could we also add an integration test for this scenario where the unseal price is non-zero but the price per byte is zero 🙏 |
b979373
to
b3b5df3
Compare
b3b5df3
to
bdfd414
Compare
bdfd414
to
9173c93
Compare
DealProposal: *proposal, | ||
Receiver: receiver, | ||
LegacyProtocol: legacyProtocol, | ||
CurrentInterval: proposal.PaymentInterval, |
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.
Not setting the CurrentInterval
here creates issues when we have a non zero price for Unsealing & bytes because we don't initialize this value correctly in the FSM when we jump directly to the Give me money for the unsealing
state via the RequestPayment
event instead of going via the ProviderOpen
event .
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.
Great work Aarsh! 🎉
@@ -81,7 +81,11 @@ var ProviderEvents = fsm.Events{ | |||
From(rm.DealStatusFundsNeededUnseal).To(rm.DealStatusUnsealing). | |||
Action(func(deal *rm.ProviderDealState, fundsReceived abi.TokenAmount) error { | |||
deal.FundsReceived = big.Add(deal.FundsReceived, fundsReceived) | |||
deal.CurrentInterval += deal.PaymentIntervalIncrease | |||
|
|||
// only update interval if the payment is for bytes and not for unsealing. |
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.
Nice catch 🎣
Note: I'm going to test this out on a live client / miner before merging |
Depends On filecoin-project/go-data-transfer#186.
Closes filecoin-project/lotus#5895.
Closes #528.
Closes #527.
TODO
Testing Proof