Catégories
CRYPTOCURRENCY

Bitcoin: What are the default timelocks in Lightning implementations today? How are they negotiated on channel opening?

Understanding Bitcoin’s Default Time Lock in Lightning Implementation

The Lightning Network, a decentralized and fast payment network built on the Bitcoin protocol, has evolved significantly since its inception. One of the key aspects of Lightning is the use of time locks to ensure secure and reliable communication between channel partners. In this article, we will delve into the default time locks in Lightning’s implementation today and explore how they are negotiated during channel opening.

Two Time Locks for Channel Opening

Bitcoin has two main time locks that govern the setup of a new channel: the self-delay (BOLT5) and the CSV (Compressed Sequential Vertex) relative time lock. These time locks ensure that both parties to a channel contract agree on the timing of key events, such as when the channel will open or close.

Self-delay Time Lock

Self-delay Time Lock is an implementation of BOLT5 that provides an additional level of security and efficiency. It works by setting a delay between the expected channel opening time and the actual opening time. This delay ensures that the other party has enough time to verify the channel agreement before proceeding with the transaction.

CSV Relative Time Lock

CSV relative time lock is another BOLT5 implementation used in Lightning implementations. It provides a more flexible timing mechanism by allowing parties to agree on a delay. The CSV relative time lock uses a compressed vertex sequence (SVO) to represent the delay. This allows for more precise control over the timing of key events.

Negotiations During Channel Opening

During channel opening, both parties in Lightning agree on an automatic delay and CSV relative time lock. The negotiation process typically involves the following steps:

  • Initial Message: The first message sent by one party (the sender) to initiate the channel opening process.
  • Self-delay request: The sender sends a self-delay request to the receiver, specifying the expected delay and the associated timestamp.
  • CSV relative time lock response

    : The receiver responds with its own CSV relative time lock, which may differ from the sender’s request. This response allows the parties to agree on the delay.

  • Verification

    Bitcoin: What are the default timelocks in Lightning implementations today? How are they negotiated on channel opening?

    : Both parties verify each other’s responses to ensure that the negotiated time is correct.

Conclusion

In today’s Lightning implementations, automatic delays and CSV relative time locks play a critical role in ensuring secure and reliable communication between channel partners. By negotiating these time lock constraints during channel opening, parties can guarantee that both parties will adhere to the agreement. Understanding how these time locks work is essential to building and maintaining efficient Lightning networks.

Additional Resources

For more information about BOLT5’s time-locking implementation of Lightning, please see the [Lightning Network Specification] ( Additionally, you can explore resources such as the [Bitcoin Lightning Network Documentation] ( and the [Open Source Bitcoin Implementation] (

anonymous some

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *