1

What is happening when a channel is pending when opened? How long does it usually take? To open a channel with a node you're already connected to you don't need to get consensus from all the other connected nodes (as you would if you were sending a transaction on chain) so why the wait?

2 Answers 2

1

Opening a channel involves sending an on-chain transaction (with a multisig output controlled by the channel’s participants), so when the channel is ‘pending’ it simply means this transaction is not yet confirmed. How long it takes the transaction to confirm depends on the same factors as any other transaction.

Further, the participants will often wait for a certain number of transaction confirmations before starting to make channel payments. The number of confirmations required is negotiated in the minimum_depth parameter of the accept_channel message. From BOLT 2:

The funding_locked message indicates that the funding transaction has reached the minimum_depth asked for in accept_channel. Once both nodes have sent this, the channel enters normal operating mode

(thanks to @jnewbery for the added info)

3
  • @selfishminer you should add your edit as a separate answer since it is a complete re-write compared to mine, but I think it is helpful.
    – chytrik
    Nov 7, 2018 at 10:08
  • 1
    "Once the transaction confirms..." the participants actually wait for a certain number of confirmations before starting to make channel payments. The number of confirmations required is negotiated in the minimum_depth parameter of the accept_channel message. From BOLT 2: "The funding_locked message indicates that the funding transaction has reached the minimum_depth asked for in accept_channel. Once both nodes have sent this, the channel enters normal operating mode."
    – jnewbery
    Nov 30, 2018 at 2:51
  • @jnewbery thanks for the clarification/extra info, I've edited the answer to include it
    – chytrik
    Nov 30, 2018 at 3:04
1

What is happening when a channel is pending when opened? How long does it usually take?

A node establishes a channel by sending an open_channel message to its desired peer. This message specifies the parameters under which the channel will operate (e.g. the number of bitcoin the channel will be funded with and the cost to route payments through the channel). The channel counterparty must reply with the accept channel message, one parameter of which is minimum_depth, wherein the number of confirmations the funding transaction must have (before the channel can be used) is specified. This protects channel participants from losing money in the event the funding transaction is double spent.

To open a channel with a node you're already connected to you don't need to get consensus from all the other connected nodes (as you would if you were sending a transaction on chain) so why the wait?

Establishing a network connection with a node is only one step in the process of establishing a lightning channel. The funds must first be secured in a multisignature output (2-of-2, with one key from each channel participant). Moving the funds to a multisignature output can only be done with an on-chain transaction. Without this step there is no way to restrict one party from stealing the funds outright. Once the funds have been moved to such an output, channel participants can make lightning transactions.

Your Answer

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

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