NebulousLabs / Sia

Blockchain-based marketplace for file storage. Project has moved to GitLab: https://gitlab.com/NebulousLabs/Sia
https://sia.tech
MIT License
2.71k stars 440 forks source link

Contractor should ignore errors that are from the user's own wallet #3075

Closed DavidVorick closed 6 years ago

DavidVorick commented 6 years ago

Currently, the contractor will pay attention to errors with a host during renewal. If some ongoing error is preventing the renter from renewing with a host, the host will be replaced and the files will be repaired before that contract becomes unavailable.

If the issue is the user's own wallet however (not enough funds, wallet is locked, etc.), then all of the hosts in the contractor will be marked as bad and needing replacement.

There are a large range of errors the wallet could produce that indicate a user problem instead of a host problem. We should resolve this issue by having the contract formation and contract renewal wrap any errors that are the host's fault with a special error (can do this with errors.Extend for the NebulousLabs/errors pacakge) that we check for in the contract loop. Then the contractor will only be marking contracts as bad if the error was a host-side problem instead of some other issue.

ChrisSchinnerl commented 6 years ago

Closing this since it should be fixed with 3080.