Estar fuera de línea: ¿cuándo otros nodos cierran canales?

Si mi nodo Lightning se desconecta, ¿cuánto tiempo pasará hasta que mis nodos de contraparte cierren los canales de los que son copropietarios conmigo?

Obviamente, esto depende de los nodos de la contraparte, ya que pueden elegir individualmente cuándo quieren cerrar los canales, pero ¿cuáles son las configuraciones predeterminadas para las implementaciones principales?

Respuestas (1)

Un Lightning Channel no tiene ningún requisito sobre cuándo cerrar el canal, según lo especificado por BOLT. Es enteramente decidido por el usuario y la implementación. Para el caso de lnd, siempre que el usuario quiera cerrar el canal, llamará closechannelintentando primero realizar un cierre cooperativo, salvo que se especifique lo contrario:

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'.`,

Incluso al llamar closeAllChannels, estando el nodo de la contraparte fuera de línea, el shell le indica al usuario antes de cerrar unilateralmente el canal:

        // 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)
Entonces, ¿lnd no cierra automáticamente los canales después de un tiempo?
no, esto no es requerido por diseño. Los usuarios tendrían que estar de acuerdo con esto.
sin embargo, esto sucedería en canales de micropagos dúplex