SiaFoundation / renterd

A renter for Sia
https://sia.tech/software/renterd
MIT License
69 stars 23 forks source link

Monitor expired contracts to unlock funds if host doesn't do it #1719

Open ChrisSchinnerl opened 14 hours ago

ChrisSchinnerl commented 14 hours ago

A side-effect of the new consensus is the fact that a node needs to become active to unlock contract funds. Usually that happens either implicitly when renewing a contract or the host does it after a contract expires. The renter is missing that mechanism which is important for when a host goes offline without unlocking the funds. So the renter needs to check for expired contracts in the chain subscriber and then broadcast a txn starting a while after the contract expired to give the host some time to do it first.

NickJH commented 13 hours ago

Are you saying that, if a host has a meltdown, he no longer automatically receives back the Locked Collateral - Risked Collateral for any contract? And bandwidth income?

ChrisSchinnerl commented 9 hours ago

Are you saying that, if a host has a meltdown, he no longer automatically receives back the Locked Collateral - Risked Collateral for any contract? And bandwidth income?

You will need to boot up the host again after a meltdown and then it will automatically unlock the funds.

NickJH commented 8 hours ago

And keep it running until all the contracts expire? This is a big shift. It used to be that if your host went down and was not recovered, that you just lost your risked collateral. You still got the remaining Locked collateral back and depending on something (RHP2/3?) you also got your accrued bandwidth income.