Skip to content

Redesign the Host

David Vorick requested to merge multi-host into renter-host-upgrades

This PR is the worst kind of PR. It mixes a bunch of changes together. When I started writing the code, I really wasn't sure where I was going with it. I had in my head though that I should be creating "Host 1.0", which included all of the bells and whistles which would be required to make something that would have all the security features that I keep saying are 'on the way'. I wanted to not be saying that anymore, I wanted to say 'implemented'.

So, not all of those features are done. The bulk of this PR is just switching up the storage model of the host. The new storage model uses multiple storage folders, divides file contracts into sectors, and tolerates disk failures.

I went ahead and redesigned the host interface. You will notice that the actual host no longer satisfies the new host interface, because I added a bunch of functions that haven't been implemented yet. I had to extend the transaction pool to provide fee estimation, but that fee estimation is not used anywhere yet.

Basically, this is still a giant work in progress. You can skim the api/* diffs, and the modules/host/* diffs. Be sure to check out modules/host.go

All of the rpc code is gone from the host at this point. It's also out-of-scope for this PR. This feature branch should not be merged until both the host and the renter are using the new RPCs.

Merge request reports