Skip to content

Closing tx rebase#214

Merged
rustyrussell merged 2 commits into
lightning:masterfrom
rustyrussell:closing-tx-rebase
Aug 8, 2017
Merged

Closing tx rebase#214
rustyrussell merged 2 commits into
lightning:masterfrom
rustyrussell:closing-tx-rebase

Conversation

@rustyrussell
Copy link
Copy Markdown
Collaborator

This is the rebase and rollup of the changes in #199 and #201 which got horribly inter-twined.

  1. Change descriptions of closing tx construction to references to BOLT 3.
  2. Recipient should check the fee offer has improved in closing_signed.
  3. Therefore, sender must improve closing offer.
  4. Offers do not persist across reconnection, so no state req'd, and
    also helps if fee has changed.
  5. You don't need to re-send shutdown if you received closing_signed
    (implicit acknowledgement).
  6. You don't have to accept a channel_reestablish which requests the last
    revoke_and_ack be retransmitted if you've already received closing_signed
    (which is an implicit acknowledgement).

The only surprise here (maybe?) is that we use the commitment number encoding.
I think that makes sense, but it was unspecified before.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Copy link
Copy Markdown
Collaborator

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This newest version is starting to look pretty good to me. Several ambiguous cases w.r.t initiating a channel closure in the face of reconnections have now been addressed.

My sole comment contests that both sides should close the connection after the closing fee has been negotiated.

Comment thread 02-peer-protocol.md Outdated
and MUST fail the connection if it is not.

If `fee_satoshis` is equal to its previously sent `fee_satoshis`, the receiver
SHOULD close the connection and SHOULD sign and broadcast the final closing
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my reading, this is the normal case in which both sides eventually decide on a valid fee for the cooperative closure transaction.

In this case, why should the connection be closed all together? It's possible that either side wishes to open a new channel, or that the parties had more than one channel amongst each other. Additionally, this may have been Alice's only connection within the network, therefor if the connection is closed upon channel closure, then she won't receive any graph updates,

1. Change descriptions of closing tx construction to references to BOLT 3.
2. Recipient *should* check the fee offer has improved in closing_signed.
3. Therefore, sender *must* improve closing offer.
4. Offers do not persist across reconnection, so no state req'd, and
   also helps if fee has changed.
5. You don't need to re-send `shutdown` if you received `closing_signed`
   (implicit acknowledgement).
6. You don't have to accept a `channel_reestablish` which requests the last
   revoke_and_ack be retransmitted if you've already received `closing_signed`
   (which is an implicit acknowledgement).

Closes: lightning#201
Closes: lightning#199
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@rustyrussell rustyrussell dismissed Roasbeef’s stale review August 8, 2017 00:19

Agreed, good spotting, fixed!

@rustyrussell rustyrussell merged commit 094a86e into lightning:master Aug 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants