Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

messages: merge the sig messages to the WT into a single sigs #115

Merged
merged 1 commit into from
Jan 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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