Skip to content

Commit fcaae44

Browse files
t-bastsstone
authored andcommitted
Require strict exchange of shutdown
Whenever one side sends `shutdown`, we restart a signing round from scratch. To be compatible with future taproot channels, we require the receiver to also send `shutdown` before moving on to exchanging `closing_complete` and `closing_sig`. This will give nodes a message to exchange fresh musig2 nonces before producing signatures. On reconnection, we also restart a signing session from scratch and discard pending partial signatures.
1 parent 05e7a63 commit fcaae44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eclair-core/src/main/scala/fr/acinq/eclair/wire/internal/channel/version4/ChannelCodecs4.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ private[channel] object ChannelCodecs4 {
780780
private val onRemoteShutdownCodec: Codec[OnRemoteShutdown] = discriminated[OnRemoteShutdown].by(uint8)
781781
.typecase(0x00, provide(OnRemoteShutdown.WaitForSigs))
782782
.typecase(0x01, feeratePerKw.as[OnRemoteShutdown.SignTransaction])
783-
783+
784784
private val waitingForRemoteShutdownCodec: Codec[ClosingNegotiation.WaitingForRemoteShutdown] = (
785785
("localShutdown" | lengthDelimited(shutdownCodec)) ::
786786
("onRemoteShutdown" | onRemoteShutdownCodec)

0 commit comments

Comments
 (0)