us icon indicating copy to clipboard operation
us copied to clipboard

RenewContract: ReadResponse: consensus conflict: provided transaction set is standalone and invalid: transaction cannot have an output or payout that has zero value

Open jkawamoto opened this issue 4 years ago • 7 comments

Many contract renewals fail with this error. Is this something we can avoid in renter-side?

jkawamoto avatar Sep 08 '20 00:09 jkawamoto

Hmm. I believe this bug occurs when the host is asked to contribute 0 SC to the contract. Instead of doing nothing, the host adds an output worth 0 SC, which is invalid.

This should be mitigated here. The only thing I can think of is that MaxCollateral could be zero, in which case the IsZero branch wouldn't trigger (because it's an else-if). You'd end up getting an error in that case anyway, though, since your collateral would exceed MaxCollateral.

Are multiple hosts returning this error, or just one?

lukechampine avatar Sep 08 '20 01:09 lukechampine

Looks like it happens with only this host:

2020-09-08

jkawamoto avatar Sep 08 '20 06:09 jkawamoto

We get this error with other hosts:

Is there any way to solve it, or we cannot renew those contracts?

jkawamoto avatar Sep 19 '20 19:09 jkawamoto

You could try running this patch (apply to both FormContract and RenewContract):

diff --git a/renter/proto/formcontract.go b/renter/proto/formcontract.go
index 0cbe034..9c53ada 100644
--- a/renter/proto/formcontract.go
+++ b/renter/proto/formcontract.go
@@ -78,7 +78,8 @@ func (s *Session) FormContract(w Wallet, tpool TransactionPool, key ed25519.Priv
        // side bug) it can't be zero either.
        if hostCollateral.Cmp(s.host.MaxCollateral) > 0 {
                hostCollateral = s.host.MaxCollateral
-       } else if hostCollateral.IsZero() {
+       }
+       if hostCollateral.IsZero() {
                hostCollateral = types.NewCurrency64(1)
        }
 

this should force the collateral to never be 0. My suspicion is that you will get a different error instead, but it's worth a try.

lukechampine avatar Sep 20 '20 02:09 lukechampine

With the above patch, we get "RenewContract: ReadResponse: internal error: file contract proposal expects the host to pay more than the maximum allowed collateral".

jkawamoto avatar Sep 20 '20 23:09 jkawamoto

ok, it's as I suspected -- the host's MaxCollateral is set to 0.

I will submit a patch to fix the host bug, but until people upgrade, renewing the contract is impossible. (Actually, I guess if the host adds more funds to their wallet, their MaxCollateral will increase and the contract will become renewable again.)

EDIT: https://gitlab.com/NebulousLabs/Sia/-/merge_requests/4825

lukechampine avatar Sep 20 '20 23:09 lukechampine

Thanks for the MR. I hope that it will be merged and published soon.

jkawamoto avatar Sep 21 '20 07:09 jkawamoto