revault / practical-revault

Version 0 specifications for a Revault deployment
Creative Commons Attribution 4.0 International
33 stars 9 forks source link

Synchronization of the state of the presigned transaction sigs between stakeholders and watchtowers #126

Open edouardparis opened 2 years ago

edouardparis commented 2 years ago

Stakeholder watchtower

  1. The watchower is able to scan its database and the chain and be aware of if something is missing.

Watchtower has the deposit descriptor and is looking at the chain therefore watchower is aware of vaults missing revocation transactions signatures. Watchtower must be able to generate a list of deposit outpoints requiring the revocation txs sigs. In case of database failure or

  1. The stakeholder must be able to sync quicly the revocation sigs to the watchtower

Stakeholder has to be the initiator of the exchange because it is not always connected. The stakeholder need to know if the watchtowers needs the sigs to send it to it. He may need to know also the balance of the fee bumping wallet. It would also be interesting to have the current tip hash and height the watchtower is watching.

  1. 2FA ?

Message

Method sigs already exists to store revocation transaction signatures. We can have a new method get_status.

 STAKEHOLDER's WALLET                      WATCHTOWER
    ||   -- get_status ---> ||  // Ask for the current watchtower status.
    ||  <-------- status ---- ||  //  Here is the deposit outpoints missing signatures for their revocation txs.
    ||   -- sigs --------->     ||  // Here are all sigs for the transactions.
    ||  <-------- sigs_ack - ||  // I succesfully re-constructed, checked, and stored this transaction.

Request:

{
    "method": "get_status",
    "params": {}
}

Response

{
    "method": "get_status",
    "params": {
        "vaults_missing_signatures": [<deposit outpoint>, ...],
        "block_height": 23134,
        "block_hash": <hash>,
    }
}

Enterprise watchtower

Participants may rely on common watchtowers that are easy to access and replicate, this allow complexe policies with enterprise information. These watchtowers can retrieve the sigs directly from coordinator. They have the descriptors and are able to create the cancel transactions. The messages could be same that the stakholders are using to pull the sigs from the coordinator.