Skip to content

Hostdb fixes

David Vorick requested to merge hostdb-fixes into master

Originally this PR was meant to fix up some of the scanning issues in the hostdb. I went ahead and stepped it forward a lot though. This PR has insufficient testing, but is otherwise approximately complete and ready for code review.

Hosts now are only tracked through the host tree, and all hosts are in the host tree. Scanning is now based on hosts with the highest score, and downtime can dramatically affect score. The old persist was repurposed to fit the new style, re-using the 'AllHosts' field of the old persist and basically ignoring the existing 'ActiveHosts' field, as we have a new way to determine whether a host is active or inactive.

It's not clear to me that this code handles all edge cases gracefully, I guess this is a part of testing.

I discovered some pretty severe deadlock possiblities in the host, introduced by our wallet fixes. It's not clear to me how much work is needed to fix this, but it's likely a decent amount.

A new API call has been added that allows renters to view the expected cost of various actions on the network.

The number of hosts being used to upload data has been increased to 50. I expect this to be the final value for the number of contracts that the renter will form by default, at least for consumers. This is because larger values incur heavy contract fees.

The redundancy parameters have been changed to 10-of-30, which I predict will be pretty stable. Eventually, as the network scales, I think we will switch to 20-of-40, and then stop there for consumers. This will happen when we are better at picking faster, more stable hosts, and we are confident that 10 extra hosts is enough to keep uploads running at high speed for the whole 2x redundancy. We are definitely not there yet.

Merge request reports