NebulousLabs / Sia

Blockchain-based marketplace for file storage. Project has moved to GitLab: https://gitlab.com/NebulousLabs/Sia

Home Page:https://sia.tech

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contractor persistence corrupted when disk is full

MSevey opened this issue · comments

The contractor persistence is not written atomically as there is an edge case of when the disk is full both contractor.json and contractor.json_temp stop writing mid file causing an error on start up.

unable to read persisted json object from disk: invalid character '{' after top-level value

The files have to be deleted which then cause a secondary error of:
panic: renewed should never miss an id

Which is cause by the renter still being persisted, so when threadedUploadLoop starts checking files and hosts, it can't find the hosts associated with the files because that information was stored in the contractor persistence.