Skip to content

Uptime monitoring

Luke Champine requested to merge uptime into master

The contractor now spawns a background loop that regularly deletes any contracts whose hosts have gone offline. Since the contractor already tries to form new contracts when it dips below allowance.Hosts, no further work is needed to ensure that the contractor will replace the offline hosts with new contracts. It is then the renter's job to reupload data to the new contracts.

This code relies on hdb.IsOffline being a good indicator of whether a host is truly offline. The current IsOffline algorithm is too simple and will result in contracts being deleted too aggressively. For example, if the hostdb is turned off for a week, and a host is momentarily offline when the hostdb turns on, then it will consider the host to be offline.

Merge request reports