Skip to content

Commit

Permalink
Merge #115: messages: merge the sig messages to the WT into a singl…
Browse files Browse the repository at this point in the history
…e `sigs`

f96ef9e messages: merge the `sig` messages to the WT into a single `sigs` (Antoine Poinsot)

Pull request description:

  Fixes #109, closes #98.

ACKs for top commit:
  darosior:
    ACK f96ef9e

Tree-SHA512: 0d9b6aa4b822b782a46f8a7baa6c7ac9601ba78d1f17595baaeb1f4624de4c4885e59cdc05bdab54479eddea35ab880fd10a917e210c129bc187285574073fac
  • Loading branch information
darosior committed Jan 25, 2022
2 parents 3c8cc38 + f96ef9e commit 0c230ca
Showing 1 changed file with 22 additions and 25 deletions.
47 changes: 22 additions & 25 deletions messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,42 +36,40 @@ transaction.

```
STAKEHOLDER's WALLET WATCHTOWER
|| -- sig emer ------------> || // Here are all sigs for the emergency transaction.
|| <--- sig_ack --------- || // I succesfully re-constructed, checked, and stored this transaction.
|| -- sig emer_unvault ----> ||
|| <--- sig_ack --------- ||
|| -- sig cancel --------> ||
|| <--- sig_ack --------- ||
|| -- sigs --------------> || // Here are all sigs for the emergency transaction.
|| <-------- sigs_ack ----- || // I succesfully re-constructed, checked, and stored this transaction.
```

### Messages format

#### `sig`

Sent at any point in time by a stakeholder's wallet to share all signatures for a revocation
transaction with its watchtower.
#### `sigs`

The wallet must first send the Emergency transaction signatures. Then it must share the
UnvaultEmergency transaction signatures.
Only prior to delegating a vault (and thereby sharing its Unvault transaction signature with the
managers) it must share the Cancel transaction signature, and wait for a positive response for the
watchtower before sharing the Unvault transaction signature.
Sent at any point in time by a stakeholder's wallet to share the revocation transactions' signature
with (one of) its watchtower(s).

This order is established so the watchtower can allocate fee-bumping reserve only when a vault is
delegated.
It must wait for a positive response from the watchtower before sharing the Unvault transaction
signature.

#### Request

```json
{
"method": "sig",
"method": "sigs",
"params": {
"signatures": {
"pubkeyA": "ALL|ANYONECANPAY Bitcoin ECDSA signature as hex",
"pubkeyB": "ALL|ANYONECANPAY Bitcoin ECDSA signature as hex",
...
"emergency": {
"pubkeyA": "ALL|ANYONECANPAY Bitcoin ECDSA signature as hex",
"pubkeyB": "ALL|ANYONECANPAY Bitcoin ECDSA signature as hex",
},
"cancel": {
"pubkeyA": "ALL|ANYONECANPAY Bitcoin ECDSA signature as hex",
"pubkeyB": "ALL|ANYONECANPAY Bitcoin ECDSA signature as hex",
}
"unvault_emergency": {
"pubkeyA": "ALL|ANYONECANPAY Bitcoin ECDSA signature as hex",
"pubkeyB": "ALL|ANYONECANPAY Bitcoin ECDSA signature as hex",
}
},
"txid": "txid",
"deposit_outpoint": "deposit utxo outpoint",
"derivation_index": 42
}
Expand All @@ -80,14 +78,13 @@ delegated.

#### Response

The watchtower must not send an ACK if it did not successfully reconstruct and check
the transaction, *or if it is unable to bump its feerate with its currently-available utxos*.
The watchtower must not send an ACK if it did not successfully checked and stored all transactions'
signatures, *or if it is unable to bump its feerate with its currently-available utxos*.

```json
{
"result": {
"ack": true,
"txid": "txid"
}
}
```
Expand Down

0 comments on commit 0c230ca

Please sign in to comment.