-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bolt2: fee_range clarification #1013
Comments
You're right, that case would lead to a force-close. It can happen in theory, but I'd argue it likely won't happen in practice: A will send its second range after a while if it believes that B is unresponsive. It's very unlikely that B will decide to respond to an old messages exactly at the same time. So there is indeed a potential race condition, but we're very unlikely to hit it. Nevertheless, as discussed on the PR, we can change this to be a turn-based protocol by adding a new message to explicitly reject a fee range (e.g. |
I also don't think it's likely and depends on implementations "unresponsive timers" and maybe connection issues. I think making it turn-based by using a special message instead of a |
Here is a high-level proposal for an updated turn-based closing flow:
Then A's behavior should be left open to implementations. A can now either force-close or sending another On the eclair side, here is what I plan to offer to node operators. When they initiate the mutual close and provide a fee range, they can also provide a boolean flag When the mutual close is initiated by our peer (ie we're not funder and won't pay the on-chain fee), we will accept whatever Would that work for you? We can decide later (when actually implementing it) whether it needs a feature bit or not. It technically doesn't need one, but I don't mind adding one if others feel it's useful or better to make explicit. |
I like the proposal.
|
True, maybe we can instead have a field |
I don't really understand why this is a (material) concern. If A is gonna send a new closing_signed, A should handle this. If you don't want to handle it, disconnect and reconnect :). More realistically, basically every node should send a warning now, so you can just treat the no-warning-received case as "peer has gone away". |
after what time can you determine that your peer hasn't sent the warning? the wording of the spec says that the warning is optional (SHOULD). the spec says to fail the channel here. also having a turn-based fee_range is needed for simple-taproot-channels unless an overhaul of coop closing is done where only sigs are sent at the end |
Its optional primarily for backwards compatibility reasons - warnings were not merged when the new closing stuff was merged. I think we could just switch it to MUST (which, actually, isn't that much of a backwards compatibility concern - if a peer "takes forever" to respond you have to handle that another way anyway). Ultimately the intent here is that retrying with a new fee range will not be something that's even remotely quick - it either requires a user manually responding to a warning message (that includes human-readable text explaining that the peer doesn't like our fees) or the node deciding "enough" time has passed (probably on the order of many blocks where its feerate estimates have changed). |
Yes it can be changed to a MUST. I know that it's not going to happen, but the way the spec is written doesn't really convey the intent behind the change (waiting a while and whatnot) |
Should the sender of warning give a hint about the range like too high or too low in TLV? Otherwise, the funder will be guessing. Also is it possible that a warning is sent from B -> A regarding the same channel but unrelated to coop close? If so, it could confuse A. |
Let's focus on getting rid of this entirely and replace it with #1096 instead? |
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
B's PoV
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:
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.
The text was updated successfully, but these errors were encountered: