Skip to content

Commit 95f7ad1

Browse files
committed
Use empty TLV flag
Similar to what is done for `require_confirmed_inputs`. We add a requirement for the receiver of `accept_channel` and `accept_channel2`.
1 parent 2b41937 commit 95f7ad1

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

blip-0030.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,12 @@ Additional TLV fields for the `open_channel2` message:
3232
1. `tlv_stream`: `open_channel2_tlvs`
3333
2. types:
3434
1. type: 32768 (`zero_reserve`)
35-
2. data:
36-
* [`byte`:`use_zero_reserve`]
3735

3836
Additional TLV fields for the `accept_channel2` message:
3937

4038
1. `tlv_stream`: `accept_channel2_tlvs`
4139
2. types:
4240
1. type: 32768 (`zero_reserve`)
43-
2. data:
44-
* [`byte`:`use_zero_reserve`]
4541

4642
### Requirements
4743

@@ -51,7 +47,7 @@ A node that wants to support zero-reserve channels:
5147

5248
When sending `open_channel`:
5349

54-
* If `zero_reserve` was negotiated:
50+
* If the `zero_reserve` feature was negotiated:
5551
* MAY set `channel_reserve_satoshis` to `0`
5652

5753
When receiving `open_channel`:
@@ -62,19 +58,31 @@ When receiving `open_channel`:
6258
* Otherwise:
6359
* MUST send an `error` and forget the channel
6460

61+
When receiving `accept_channel`:
62+
63+
* If `channel_reserve_satoshis` was set to `0` in `open_channel`, and it is
64+
not set to `0` in `accept_channel`:
65+
* MUST send an `error` and forget the channel
66+
6567
When sending `open_channel2`:
6668

67-
* If `zero_reserve` was negotiated:
68-
* MAY set the `zero_reserve` TLV field to `1`
69+
* If the `zero_reserve` feature was negotiated:
70+
* MAY set the `zero_reserve` TLV field
6971

7072
When receiving `open_channel2`:
7173

72-
* If `zero_reserve` is set to `1`:
74+
* If the `zero_reserve` TLV field is set:
7375
* If it wants to use `zero_reserve`:
74-
* MUST set the `zero_reserve` TLV field to `1` in `accept_channel2`
76+
* MUST set the `zero_reserve` TLV field in `accept_channel2`
7577
* Otherwise:
7678
* MUST send an `error` and forget the channel
7779

80+
When receiving `accept_channel2`:
81+
82+
* If `zero_reserve` was set in `open_channel2`, and it is not set in
83+
`accept_channel2`:
84+
* MUST send an `error` and forget the channel
85+
7886
When sending or receiving `update_add_htlc`:
7987

8088
* If `zero_reserve` has been negotiated:

0 commit comments

Comments
 (0)