1
0
Fork 0
mirror of https://github.com/ACINQ/eclair.git synced 2025-02-24 06:47:46 +01:00
eclair/eclair-core
Bastien Teinturier 3a95a7deb5
Store channel state after sending commit_sig (#2614)
We must store the channel state after sending our `tx_signatures`,
because our peer may broadcast the transaction at that point.
But it's useful to store it earlier than that, to allow resuming the
signatures exchange if we get disconnected, otherwise we could
end up in a state where one peer has forgotten the channel while
the other has sent `tx_signatures` and must thus wait for the
channel to be spent or double-spent.

With that change, we can cleanly handle any disconnection:

- if we get disconnected before any peer sent `commitment_signed`,
  the channel is forgotten by both peers
- if we get disconnected after one peer send `commitment_signed`
  but the other peer didn't, the channel will be forgotten when
  reconnecting (this is safe because the peer that sent
  `commitment_signed` did *not* send `tx_signatures` since the
  other peer didn't send `commitment_signed`)
- if we get disconnected after both peers sent `commitment_signed`,
  we simply resume the signatures exchange on reconnection

We introduce a new TLV field to `channel_reestablish` that contains
the `txid` of the funding transaction that is partially signed: this lets
peers figure out which messages to send back on reconnection.
2023-04-05 14:52:16 +02:00
..
src Store channel state after sending commit_sig (#2614) 2023-04-05 14:52:16 +02:00
eclair-cli Add GetNode router API (#2568) 2023-01-16 15:13:09 +01:00
pom.xml Update to bitcoind 23.1 (#2551) 2023-01-04 14:27:46 +01:00