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

Locked Collateral is lost when no data uploaded under contract? #2138

Open Cinerar opened 7 years ago

Cinerar commented 7 years ago

https://forum.sia.tech/topic/1576/locked-collateral-is-lost-when-no-data-uploaded-under-contract

I'm using storage obligation api to see what contracts my host have. https://github.com/NebulousLabs/Sia/compare/master...S-anasol:obligationsapi With https://s-anasol.github.io/hostdbviewer/#/ which allow me to see my host contracts in beautiful way With this two tools i'm able to see what contracts my host have. I see that there are quite big ammount of contracts with locked collateral, but no data uploaded. And i confirm locking of collaterl by this contracts in "wallet transactions"

I was thinking that locked collateral for failed contracts with no data uploaded will be returned when storage proof window ends, but as long as i can see in "wallet transactions" this doesn't happen.

When contract is failed i see 2017/07/11 18:55:43.180727 storageobligations.go:574: Missed storage proof. Revenue would have been 971469293079227611912127230. in logs

And according to wallet transactions when this happens -1.33SC is deducted. And transaction fees of 1.33 is added to failed obligation, but no sign of returning of collateral.

Anyone have some ideas about it? What is going on?

Not sure but maybe it is somehow related with https://github.com/NebulousLabs/Sia/issues/1862 https://github.com/NebulousLabs/Sia/issues/1861

Cinerar commented 7 years ago

contract https://explorer.siahub.info/hash/91c9b542dd1562921f304a3996091e3f310f2a2a7231047ed9e9056dc9a4264b wallet transactions 113659 661f821eab3effcc07248357947a495a7730cb98c8c20980b0a911941f43c740 0.00 SC 0 SF 113659 df564aac153028e44dacdfc6591e5ec9ffc4b4db89bdaa77158d982c76c743b2 -11.58 SC 0 SF 113660 e7e945c71208b2cc2cf4059c0a1b411ef171233752da05fd34dad4b1524dfc1d 0.00 SC 0 SF 113660 8933cffc2f48b4b82d1a2f1821bc96af2e6634f61d66309db8a93de29f298ac8 -1.33 SC 0 SF

Cinerar commented 7 years ago

I think they are related #1933

JamesM424 commented 7 years ago

Well Hi there. You linked to my bug.

My bug was to say that earnings weren't reflected in the wallet activity. The siac uses a 'soft unlock' in that it just slides them in without showing you. SC was earned and collateral returned in my cases. I just thought it was dumb the UI didn't reflect it.

Cinerar commented 7 years ago

@JamesM424 I think locked collateral is returned, bit it is not reflected.