Skip to content

update calculateHostWeight

David Vorick requested to merge hostdb-tuning into master

calculateHostWeight was very strongly favoring the cost of downloading the file, and making an unreasonable assumption that the average file (weighted by size) would be downloaded 50 times.

Additionally, the contract price, upload price, and download price were not being adjusted to match the fact that the storage price only covers a single block instead of the contract length.

The updated calculateHostWeight function also takes into account the collateral, although only minimal emphasis is applied. Price is still by far the dominating factor.

Merge request reports