Skip to content

Commit

Permalink
messages: move transactions pre-signed feerate specs to transactions.md
Browse files Browse the repository at this point in the history
  • Loading branch information
darosior committed Sep 29, 2021
1 parent 18931ea commit 26f51a2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
12 changes: 0 additions & 12 deletions messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,6 @@ loss of funds.
Acting as a cache in place of -example given- a p2p network, the information stored on the
coordinator is transient.

All [revaulting transactions][revaulting_txs] (the cancel tx and both emergency txs) are signed
paying a fixed `22 sat/WU` feerate and using the `ALL | ANYONECANPAY` signature hash flag. This
is in order to reduce the funds burden on *each* of the watchtowers.

The [unvault transaction][unvault_tx] is signed using a fixed `6 sat/WU` feerate. This is
a completely arbitrary value that was chosen to avoid blocking operations too early in case of
a huge load of transactions on the network and an increase of the mempools minimum feerate.
This transaction's fees can be bumped if not competitive (using the CPFP output) but
it will likely not be relayed if the mempools minimum feerate goes above `84 000 sat/kw`
until the Bitcoin network deploys [package relay][package_relay].


### Rough flow

Expand Down Expand Up @@ -476,4 +465,3 @@ manager cosig_server

[revaulting_txs]: transactions.md#cancel_tx
[unvault_tx]: transactions.md#unvault_tx
[package_relay]: https://github.com/bitcoin/bitcoin/issues/14895
22 changes: 22 additions & 0 deletions transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ The transaction which spends the [`deposit_tx`](#deposit_tx) deposit output, and
unvault output spendable by the `N` stakeholders or the managers (along with the cosigning
servers) after `X` blocks.

The Unvault transaction is signed using a fixed `6 sat/WU` feerate. This is a
completely arbitrary value that was chosen to avoid blocking operations too early
in case of a huge load of transactions on the network and an increase of the
network mempools minimum feerate.
This transaction's fees can be bumped if not competitive (using the CPFP output) but
it will likely not be relayed if the network mempools minimum feerate goes above
`84 000 sat/kw` until [package relay][package_relay] is deployed on the Bitcoin network.

- version: 2
- locktime: 0

Expand Down Expand Up @@ -115,6 +123,12 @@ The CPFP output value is adjusted depending on the actual transaction size.
The transaction which spends the [`unvault_tx`](#unvault_tx) `output[0]` using the N-of-N path and
pays back to a deposit output (it is therefore another vault deposit transaction).

The Cancel transaction is signed using the `ALL | ANYONECANPAY` signature hash flag, to
allow watchtowers (or anyone else) to attach fee-bumping inputs.

The Cancel transaction is signed at a fixed `22 sat/WU` feerate. This is in order to
reduce the funds burden on *each* of the watchtowers.

- version: 2
- locktime: 0

Expand Down Expand Up @@ -143,6 +157,11 @@ funds. They lock coins to what we call an EDV (Emergency Deep Vault): a script c
by the participants and kept obfuscated by the properties of P2WSH, as the emergency
transactions are never meant to be used.

Both Emergency transactions are signed at a fixed `22 sat/WU` feerate.

Both Emergency transaction are signed using the `ALL | ANYONECANPAY` signature hash flag,
to allow watchtowers (or anyone else) to attach fee-bumping inputs.

The Emergency `scriptPubKey` is not known to the managers.


Expand Down Expand Up @@ -218,3 +237,6 @@ Bypass tx spends the [`deposit_tx`](#deposit_tx) and pays to arbitrary addresses
#### OUT

Unspecified


[package_relay]: https://github.com/bitcoin/bitcoin/issues/14895

0 comments on commit 26f51a2

Please sign in to comment.