Initial implementation of new RPC loop
Description of Feature
This MR implements the new RPC loop, along with a few RPCs, for the host. The RPCs implemented are:
Download. Both the renter and host side of the protocol are implemented for these RPCs. Additional RPCs will be implemented in later MRs.
For now, I am resisting the urge to abstract this code via RPC request/response helper functions. I expect that such an abstraction will be both possible and desirable, but I am holding off until we implement a few more RPCs, because they may have additional requirements that affect the final abstraction. For example, it seems like we will want some mechanism for the host to cache some metadata within a RPC loop session (e.g. a
storageObligation that is being updated on each loop iteration), but it's not clear how best to achieve this.
Since both the renter and host are involved, integration tests have been added to the
siatest package. No new tests have been added to the
Modules and Packages Impacted
This MR affects the
host gained support for the new RPC loop and various RPCs;
proto gained a
Session type that can request these RPCs; and
modules gained the various IDs, request types, and response types of the new RPCs. Subsequent MRs will add new RPCs and make use of the
Session type in the