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

Handle self-retrieval correctly #134

Merged
merged 1 commit into from Mar 3, 2020

Conversation

hannahhoward
Copy link
Collaborator

@hannahhoward hannahhoward commented Mar 3, 2020

Goals

Allow self-deal retrievals to complete

Implementation

In the case of retrieving data that one stored with one's own storage mining node, the wallet addresses are the same, and payment vouchers are already saved. As a result, saving the payment voucher succeeds but returns a value of 0 for the delta between the voucher and the last voucher saved. In this case, we can fall back to examining the actual voucher amount and subtracting from the funds received to verify the actual delta. This allows retrieval deals to complete.

This has actually been broken for some time, but it only became apparent when a recent change to the retrieval market forced the client to actually confirm it's last payment was accepted -- prior to that tests passed in Lotus even though the deal actually failed, cause the client considered the deal complete as soon as it sent the last payment, even if the provider was unable to process it.

in the case of retrieval from one's one node, payment vouchers are already saved, indicating a
received delta of zero -- in this case, instead of reading the delta, inspect the actual voucher
amount difference from funds received
Copy link
Contributor

@shannonwells shannonwells left a comment

Choose a reason for hiding this comment

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

LGTM

@hannahhoward hannahhoward merged commit e0efcc4 into master Mar 3, 2020
@hannahhoward hannahhoward deleted the fix/handle-voucher-already-saved branch April 30, 2020 21:33
@dirkmc dirkmc mentioned this pull request Jan 19, 2021
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.

None yet

2 participants