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

incorrect contract count #2938

Open hackneyb opened 6 years ago

hackneyb commented 6 years ago

BUG REPORT

Stack Trace or error message

Prior to host restart:

Mon 04/16/2018 
07:30 AM
    acceptingcontracts:   Yes
    Contract Count:               754

After host restart:

Mon 04/16/2018 
08:30 AM
    acceptingcontracts:   Yes
    Contract Count:               370

Expected Behavior Contracts should be reflected accurately but may be counted double in some cases - it isn't possible to lose half the contracts in an hour and the restart triggers a different contract count. Potential Compensation and locked collateral hasn't changed during this time period.

How to reproduce it (as minimally and precisely as possible) It seems to be possible to just run the wallet and host. Contract reduction has taken place every time my 1.3.1 and 1.3.2 wallet restarted.

Environment

hackneyb commented 6 years ago

One variable here is that I start siad prior to starting the wallet so I can see the console output of siad. There is still only one siad.exe instance running.

I'll try letting the wallet start siad and see if this helps keep the contract count constant through restarts.

DavidVorick commented 6 years ago

This is a known issue, as it's a part of the host it's on the backburner for now. The correct value is the one after reboot.

The whole dev team is focused on the renter right now, host bugs aren't getting much love. This should change as we bring on more devs though, and the host should start to get some proper TLC by the end of the summer.