Skip to content

Commit

Permalink
BOLT 2: advise ping-before-commitment_signed on quiescent connections. (
Browse files Browse the repository at this point in the history
#508)

This seems to be a cause of stuck HTLCs on the network: c-lightning has
done this for a while now (since 0.6.1).

[ Minor wording clarification merged --RR ]
Decided-at: Adelaide Summit 2018
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell authored Nov 29, 2018
1 parent 4c12ae8 commit 20524d4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions 02-peer-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,8 @@ change the commitment transaction aside from the new revocation hash
fee changes).
- MUST include one `htlc_signature` for every HTLC transaction corresponding
to BIP69 lexicographic ordering of the commitment transaction.
- if it has not recently received a message from the remote node:
- SHOULD use `ping` and await the reply `pong` before sending `commitment_signed`.

A receiving node:
- once all pending updates are applied:
Expand All @@ -958,6 +960,13 @@ There's little point offering spam updates: it implies a bug.

The `num_htlcs` field is redundant, but makes the packet length check fully self-contained.

The recommendation to require recent messages recognizes the reality
that networks are unreliable: nodes might not realize their peers are
offline until after sending `commitment_signed`. Once
`commitment_signed` is sent, the sender considers itself bound to
those HTLCs, and cannot fail the related incoming HTLCs until the
output HTLCs are fully resolved.

### Completing the Transition to the Updated State: `revoke_and_ack`

Once the recipient of `commitment_signed` checks the signature and knows
Expand Down

0 comments on commit 20524d4

Please sign in to comment.