New contract protocol (Renter side)
The protocol code is almost ready, but not quite. There is some tricky signature stuff that I wasn't comfortable implementing on my own.
This PR also adds some spending metrics, and persistent subscription.
Not yet implemented:
- If the connection drops during revision, the renter should immediately attempt to reconnect and resend the last action.
Need to figure out how host pubkeys should be handled by the hostdb. Right now I'm just assuming aPublicKey
field in the host settings.The contract protocol should be documented extensively somewhere, perhaps in the doc folder. We wrote it down earlier so it shouldn't be hard to convert to a more readable format.