Skip to content

Commit 1ad02ee

Browse files
committed
fixup! bolt-simple-taproot: taprooty level 1
1 parent e25132d commit 1ad02ee

File tree

1 file changed

+27
-32
lines changed

1 file changed

+27
-32
lines changed

bolt-simple-taproot.md

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ will use to _verify_ a new incoming commitment state sent by the remote party.
324324
In order to force close a channel, the holder of a verification nonce must use
325325
that same nonce to counter sign the commitment transaction with the other half
326326
of the musig2 partial signature. Rather than force an implementation to retain
327-
additional signing state (the verification nonce) to avoid holding as "hot"
327+
additional signing state (the verification nonce) to avoid holding a "hot"
328328
(fully broadcast able) commitment on disk, we instead recommend a counter based
329329
approach.
330330

@@ -366,7 +366,7 @@ reproduced:
366366
the ASCII string `taproot-rev-root`.
367367

368368
3. Given a commitment height/number (`N`), the verification nonce to send to
369-
the remote party party can be derive by obtaining the `Nth` shachain leaf
369+
the remote party party can be derived by obtaining the `Nth` shachain leaf
370370
preimage `k_i`. The verification nonce to be derived by calling the
371371
`musig2.NonceGen` algorithm with the required values, and the `rand'`
372372
value set to `k_i`.
@@ -481,10 +481,10 @@ The remote output of the commitment transaction uses the `combined_funding_key`
481481
as the top-level internal key, and then commits to a normal remote script.
482482

483483
Anchor outputs use the `local_delayedpubkey` and the `remotepubkey` of both
484-
parries as the top-level
485-
internal key committing to the script `16 CSV`. Unless active HTLCs exist on
486-
the commitment transaction, if a local or remote output is missing from the
487-
commitment, its corresponding anchor must not be present, either.
484+
parties as the top-level internal key committing to the script `16 CSV`. Unless
485+
active HTLCs exist on the commitment transaction, if a local or remote output
486+
is missing from the commitment, its corresponding anchor must not be present,
487+
either.
488488

489489
All HTLC scripts use the revocation key as the top-level internal key. This
490490
allows the revocation to be executed without additional on-chain bytes, and
@@ -500,8 +500,8 @@ placed in the `init` message, and the `node_announcement` message.
500500

501501
| Bits | Name | Description | Context | Dependencies | Link |
502502
|-------|----------------------------------|-----------------------------------------------------------|----------|-------------------|---------------------------------------|
503-
| 80/81 | `option_simple_taproot`| Node supports simple taproot channels | IN | `option_channel_type`+`option_anchors` | TODO(roasbeef): link |
504-
| 180/181 | `option_simple_taproot_staging`| Node supports simple taproot channels | IN | `option_channel_type`+`option_anchors` | TODO(roasbeef): link |
503+
| 80/81 | `option_simple_taproot`| Node supports simple taproot channels | IN | `option_channel_type` | TODO(roasbeef): link |
504+
| 180/181 | `option_simple_taproot_staging`| Node supports simple taproot channels | IN | `option_channel_type` | TODO(roasbeef): link |
505505

506506
Note that we allocate _two_ pairs of feature bits: one the final version of
507507
this protocol proposal, and the higher bits (+100) for preliminary experimental
@@ -583,7 +583,7 @@ The sending node:
583583
- MUST specify the `next_local_nonce` field.
584584
- MUST use the `NonceGen` algorithm defined in `bip-musig2` to generate
585585
`next_local_nonce` to ensure it generates nonces in a safe manner.
586-
- MOST not set the `announce_channel` bit.
586+
- MUST not set the `announce_channel` bit.
587587

588588
The receiving node MUST fail the channel if:
589589

@@ -626,9 +626,6 @@ The recipient:
626626
- MUST reject the channel if `next_local_nonce` is absent, or cannot be
627627
parsed as two compressed secp256k1 points
628628

629-
- the specified public nonce cannot be parsed as two compressed secp256k1
630-
points
631-
632629
#### `funding_created` Extensions
633630

634631
1. `tlv_stream`: `funding_created_tlvs`
@@ -755,7 +752,7 @@ The recipient:
755752

756753
### Cooperative Closure
757754

758-
Compared to the base segwit v0 channel type, for simple taproot channels, then
755+
Compared to the base segwit v0 channel type, for simple taproot channels, the
759756
co-op close transaction now always signals RBF. In other words, the sequence
760757
field of the sole input to the cooperative close transaction MUST be
761758
less-than-or-equal to `0xfffffffd`. This enables a future cooperative closure
@@ -781,7 +778,7 @@ A new TLV field is added to the `shutdown` message:
781778
1. `tlv_stream`: `shutdown_tlvs`
782779
2. types:
783780
1. type: 8 (`shutdown_nonce`)
784-
2: data:
781+
2. data:
785782
* [`66*byte`:`nonces`]
786783

787784
Before a signature can be generated for a co-op close transaction, both sides
@@ -812,7 +809,7 @@ message's existing `tlv_stream`:
812809
2. types:
813810
1. type: 6 (`partial_signature`)
814811
2. data:
815-
* [`32*byte`: `partial_signature`
812+
* [`32*byte`: `partial_signature`]
816813

817814
Both sides **MUST** provide this new TLV field.
818815

@@ -877,17 +874,15 @@ sort of fee rate negotiation. The regular segwit v0 channels permit either side
877874
to accept a prior offer by a peer that it would have accepted in the current
878875
round. For musig2, as each signature comes with nonce state, the prior offer
879876
may actually be using distinct nonce state, rendering it unable to be comined
880-
for the final transaction braodcast.
877+
for the final transaction broadcast.
881878

882879
Instead, the responder will simply accept what the initiator proposes. The
883880
responder can always CPFP after the fact if they require a higher fee rate. The
884881
initiator is the one that pays fees directly (coming out of their settled
885-
output), so the responder will always have their full funds develiered to them.
882+
output), so the responder will always have their full funds delivered to them.
886883
This change ensures that cooperative close always succeeds after a single
887884
round.
888885

889-
890-
891886
### Channel Operation
892887

893888
`n_a_L`: Alice's local secret nonce
@@ -1073,9 +1068,9 @@ The new output has the following form:
10731068
* `to_delay_script_root = tapscript_root([to_delay_script, revoke_script])`
10741069
* `to_delay_script` is the delay script:
10751070
```
1076-
<local_delayedpubkey> OP_CHECKSIG
1077-
<to_self_delay> OP_CHECKSEQUENCEVERIFY OP_DROP
1078-
* `revoke_script` is the delay script:
1071+
<local_delayedpubkey> OP_CHECKSIGVERIFY
1072+
<to_self_delay> OP_CHECKSEQUENCEVERIFY
1073+
* `revoke_script` is the revoke script:
10791074
```
10801075
<local_delayedpubkey> OP_DROP
10811076
<revocation_pubkey> OP_CHECKSIG
@@ -1122,7 +1117,7 @@ to achieve this property, we'll utilize a NUMS point (`simple_taproot_nums`) By
11221117
using this point as the internal key, we ensure that the remote party isn't
11231118
able to by pass the CSV delay.
11241119
1125-
Using a NUMS key has a key benefit: the static internal key allows the remote
1120+
Using a NUMS key has a key benefit: the static internal key allows the remote
11261121
party to scan for their output on chain, which is useful for various recovery
11271122
scenarios.
11281123
@@ -1135,8 +1130,8 @@ The `to_remote` output has the following form:
11351130
* `to_remote_script_root = tapscript_root([to_remote_script])`
11361131
* `to_remote_script` is the remote script:
11371132
```
1138-
<remotepubkey> OP_CHECKSIG
1139-
1 OP_CHECKSEQUENCEVERIFY OP_DROP
1133+
<remotepubkey> OP_CHECKSIGVERIFY
1134+
1 OP_CHECKSEQUENCEVERIFY
11401135
```
11411136
11421137
This output can be swept by the remote party with the following witness:
@@ -1204,8 +1199,8 @@ An offered HTLC has the following form:
12041199
* `htlc_success`:
12051200
```
12061201
OP_SIZE 32 OP_EQUALVERIFY OP_HASH160 <RIPEMD160(payment_hash)> OP_EQUALVERIFY
1207-
<remote_htlcpubkey> OP_CHECKSIG
1208-
1 OP_CHECKSEQUENCEVERIFY OP_DROP
1202+
<remote_htlcpubkey> OP_CHECKSIGVERIFY
1203+
1 OP_CHECKSEQUENCEVERIFY
12091204
```
12101205
12111206
In order to spend a offered HTLC, via either script path, an `inclusion_proof`
@@ -1222,9 +1217,9 @@ Accepted HTLCs inherit a similar format:
12221217
* `htlc_script_root = tapscript_root([htlc_timeout, htlc_success])`
12231218
* `htlc_timeout`:
12241219
```
1225-
<remote_htlcpubkey> OP_CHECKSIG
1226-
1 OP_CHECKSEQUENCEVERIFY OP_DROP
1227-
<cltv_expiry> OP_CHECKLOCKTIMEVERIFY OP_DROP
1220+
<remote_htlcpubkey> OP_CHECKSIGVERIFY
1221+
1 OP_CHECKSEQUENCEVERIFY OP_VERIFY
1222+
<cltv_expiry> OP_CHECKLOCKTIMEVERIFY
12281223
```
12291224
* `htlc_success`:
12301225
```
@@ -1276,8 +1271,8 @@ A HTLC-Success transaction has the following structure:
12761271
* `htlc_script_root = tapscript_root([htlc_success])`
12771272
* `htlc_success`:
12781273
```
1279-
<local_delayedpubkey> OP_CHECKSIG
1280-
<to_self_delay> OP_CHECKSEQUENCEVERIFY OP_DROP
1274+
<local_delayedpubkey> OP_CHECKSIGVERIFY
1275+
<to_self_delay> OP_CHECKSEQUENCEVERIFY
12811276
```
12821277
12831278
##### HTLC-Timeout Transactions

0 commit comments

Comments
 (0)