2

If my lightning node goes offline, how long will it take until my counterparty nodes close the channels they co-own with me?

This is obviously up to the counterparty nodes, as they can choose individually when they want to close channels, but what are the default settings for the main implementations?

1 Answer 1

2

A Lightning Channel does not have any requirement as to when to close the channel, as specified by BOLT. It is entirely decided by the user, and the implementation. For the case of lnd, whenever the user wants to close the channel, he will call closechannel trying first to perform a cooperative close, unless specified otherwise:

Name:     "closechannel",
Category: "Channels",
Usage:    "Close an existing channel.",
Description: `
Close an existing channel. The channel can be closed either cooperatively,
or unilaterally (--force).

A unilateral channel closure means that the latest commitment
transaction will be broadcast to the network. As a result, any settled
funds will be time locked for a few blocks before they can be spent.

In the case of a cooperative closure, One can manually set the fee to
be used for the closing transaction via either the --conf_target or
--sat_per_byte arguments. This will be the starting value used during
fee negotiation. This is optional.

To view which funding_txids/output_indexes can be used for a channel close,
see the channel_point values within the listchannels command output.
The format for a channel_point is 'funding_txid:output_index'.`,

Even when calling closeAllChannels , being that counterparty node offline, the shell prompts to the user before unilaterally closing the channel:

        // If the channel is inactive, we'll attempt to
        // unilaterally close the channel, so we should prompt
        // the user for confirmation beforehand.
        if !channel.GetActive() {
            msg := fmt.Sprintf("Unilaterally close channel "+
                "with node %s and channel point %s? "+
                "The closing transaction will need %d "+
                "confirmations before the funds can be "+
                "spent. (yes/no): ", channel.RemotePubkey,
                channel.ChannelPoint, channel.CsvDelay)
3
  • So lnd does not automatically close channels after some time?
    – Illidanek
    Commented Jan 15, 2019 at 15:34
  • 1
    no, this is not required by design. Users would have to agree to this.
    – ranchalp
    Commented Feb 9, 2019 at 10:26
  • this would however happen in Duplex Micropayment Channels
    – ranchalp
    Commented Feb 9, 2019 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.