-
Notifications
You must be signed in to change notification settings - Fork 519
Closed
Labels
Description
I am a little confused about the fee_range requirements for coop close.
I asked some clarifying questions of @t-bast in #847 (comment):
"Yes, fee_range allows the funder to update its fee_range if the fundee doesn't respond or sent a warning."
I didn't realize until now that the funder may update its fee_range even if the fundee did not send a warning. I think this could lead to the following issue:
A's PoV
A B
fr=[100, 200], fs=150
----closing_signed---->
fr=[200, 300], fs=275
----closing_signed----> (A doesn't hear back soon enough and updates the range)
fr=[150, 250], fs=175
<---closing_signed----- (spec says A should fail here since 175 is not in the overlap)
B's PoV
A B
fr=[100, 200], fs=150
----closing_signed---->
fr=[150, 250], fs=175
<---closing_signed----- (B sends acceptable message back)
fr=[200, 300], fs=275
----closing_signed----> (spec says B should fail since 175 wasn't received)
-
A fails since there is an overlap between A's range [200, 300] and B's range [150, 250] of [200, 250], but 175 isn't in the overlap:
- if the message contains a fee_range:
- if there is no overlap between that and its own fee_range:
- SHOULD send a warning
- MUST fail the channel if it doesn't receive a satisfying fee_range after a reasonable amount of time
- otherwise:
- if it is the funder:
- if fee_satoshis is not in the overlap between the sent and received fee_range:
- MUST fail the channel
- if fee_satoshis is not in the overlap between the sent and received fee_range:
- if it is the funder:
- if there is no overlap between that and its own fee_range:
- if the message contains a fee_range:
-
B fails since there is an overlap between A's range [200, 300] and B's range [150, 250] of [200, 250], but 175 should have been received from A since B has already sent closing_signed.
- if the message contains a fee_range:
- if there is no overlap between that and its own fee_range:
- SHOULD send a warning
- MUST fail the channel if it doesn't receive a satisfying fee_range after a reasonable amount of time
- otherwise:
- otherwise (it is not the funder):
- if it has already sent a closing_signed:
- if fee_satoshis is not the same as the value it sent:
- MUST fail the channel
- if fee_satoshis is not the same as the value it sent:
- if it has already sent a closing_signed:
- otherwise (it is not the funder):
- if there is no overlap between that and its own fee_range:
- if the message contains a fee_range: