Skip to content

Commit

Permalink
Clarify the sighash types for HTLC Success and Timeout transactions (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ksedgwic committed Jan 31, 2022
1 parent 29db92f commit d975de1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion 03-transactions.md
Expand Up @@ -328,7 +328,7 @@ These HTLC transactions are almost identical, except the HTLC-timeout transactio
* txout count: 1
* `txout[0]` amount: the HTLC amount minus fees (see [Fee Calculation](#fee-calculation))
* `txout[0]` script: version-0 P2WSH with witness script as shown below
* if `option_anchors` applies to this commitment transaction, `SIGHASH_SINGLE|SIGHASH_ANYONECANPAY` is used.
* if `option_anchors` applies to this commitment transaction, `SIGHASH_SINGLE|SIGHASH_ANYONECANPAY` is used as described in [BOLT #5](05-onchain.md#generation-of-htlc-transactions).

The witness script for the output is:

Expand Down
4 changes: 2 additions & 2 deletions 05-onchain.md
Expand Up @@ -594,8 +594,8 @@ If `option_anchors` does not apply to the commitment transaction, then
HTLC-timeout and HTLC-success transactions are complete transactions with
(hopefully!) reasonable fees and must be used directly.

Otherwise, the use of `SIGHASH_SINGLE|SIGHASH_ANYONECANPAY` on the HTLC
signatures received from the peer allows HTLC transactions to be combined with
Otherwise, `SIGHASH_SINGLE|SIGHASH_ANYONECANPAY` MUST be used on the
HTLC signatures received from the peer, as this allows HTLC transactions to be combined with
other transactions. The local signature MUST use `SIGHASH_ALL`, otherwise
anyone can attach additional inputs and outputs to the tx.

Expand Down

0 comments on commit d975de1

Please sign in to comment.