Host unlock hash is not updated when wallet seed changes
Created by: MaxMaximus
Hello.
I have finished my full cycle of testing as a host on sia network (from July to mid of October) and results just awful. It not only have lot of minor to moderate bug and problems (i already reported some of them here) but test ended with such unacceptable critical situation:
- all contract already expired, but host did not get ANY of storage revenues (despite fact it successfully post some storage proofs to blockchain) and also had host all collateral locked in contracts. Not just risked collateral (it can be happening if host fail storage proof part), but all collateral sent to contract.
At first i thought it is a just wallet display bug as reported there: https://github.com/NebulousLabs/Sia/issues/2420 So host actually getting collateral back and this is just not reflected properly as incoming transaction in wallet. But later i set up wallet balance monitoring - and found out that available balance only goes down. There are no additions to balance after contract expire - only additional small deduction for fees each time a next contract expire.
I do not find anything interesting in logs what can lead to situation with full collateral lost. There are some messages about successful storage proofs, some errors with missed storage proofs as described in that issue: https://github.com/NebulousLabs/Sia/issues/1862 (data folder is intact, host online, wallet unlocked, but still somehow miss some of storage proofs). No other major errors.
Here are details: windows host (window 7 64 bit Pro) running siad. ver. 1.22 initially, later host was updated to ver. 1.3.0 via built-in updater (siac update ) . 100 % hosting, never used for renting/uploading files or as finance wallet (i have a separate SIA installation for this on another computer)
Here full wallet detail from test host: wallet-tx.txt As you can see there are only 2 incoming tx (50+350 SC). It was my own tx - loading this test wallet by external transaction (from my other wallet). All other txs were made by host automatically. And there is no any incoming tx despite all contract already ended (last one about a week ago). Final balance: 48 SC from initial 400 SC. So actual storage revenue is a negative value.
Here stats from host (siac host -v outputs i have taken manually from time to time) host-v.txt
Stat shows that all contracted already ended. Note additional minor bug: host stats reports some of Locked/risked Collateral and potential revenues still remaining despite fact that all contract already expired and amount of data stored is zero at last report.
And another one minor bug: "Lost Collateral" and "Transaction Fee Expenses" counter seems broken - they always show zero, despite fact that this host had lost collateral and had paid some tx fees.
Here is a host.log: host.log Some errors at contract formation stage in July (some of them caused by one more issue with siad - i have changed my prices and collateral few times and looks like siad tries to force new setting on already existing contract which lead to errors in host-renter communication):
Error at 9 September - it was my mistake: i forgot to unlock wallet after one of client restarts and host failed storage proofs on 1 or 2 contract (but there were 17 of them, and even if storage proof missing host should lose only risked collateral in proportion to amount of data actually was stored under this contract, not full locked collateral).
Errors in October with Missed storage proof - looks like one more bug. Host was running 24/7 online in October, with port open, wallet unlocked, data folder intact, etc. But somehow still missed some storage proofs (while successfully doing others).
Here is a wallet.log: wallet.log I did not find anything interesting here, but there are more details about wallet tx after update to v. 1.3.0.
I can provide additional log, but think there is nothing useful there: i have checked ALL other logs already and found out only routine records like start/stop event at client restarts and other standard expected entries.
P.S. I saw few similar report on your discord server about collateral not return back after contract expire. There is something in common: windows host, acceptingcontracts set to NO before contract expire. So may be it related to previous issue (acceptingcontracts=NO prevent use of existing contract, not only new): https://github.com/NebulousLabs/Sia/issues/2415