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


Understanding Bitcoin’s Default Timelocks in Lightning Implementations

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

Two Timelocks for Channel Opening

In Bitcoin, there are two fundamental timelocks that govern the setup of a new channel: self-delay (BOLT5) and CSV (Compressed Sequential Vertex) relative timelock. These timelocks ensure that both parties in a channel agreement agree on the timing of key events, such as the time when the channel will open or close.

Self-Delay Timelock

The self-delay timelock is a BOLT5 implementation that provides an additional layer of security and efficiency. It works by setting a delay between the expected opening time of a channel and its 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 Timelock

The CSV relative timelock is another BOLT5 implementation used in Lightning implementations. It provides a more flexible timing mechanism, allowing for the negotiation of delays between parties. The CSV relative timelock uses a compressed sequence of vertices (SVO) to represent the delay. This allows for more precise control over the timing of key events.

Negotiation during Channel Opening

During channel opening, the self-delay and CSV relative timelocks are negotiated between the two counterparties in Lightning. 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 its associated timestamp.

  • CSV Relative Timelock Response: The receiver responds with their own CSV relative timelock, which can be different from the sender’s request. This response allows for the negotiation of delays between parties.

  • 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 timing is correct.

Conclusion

In Lightning implementations today, the self-delay and CSV relative timelocks play a crucial role in ensuring secure and reliable communication between channel counterparties. By negotiating these timelocks during channel opening, parties can guarantee that the agreement will be respected by both parties. Understanding how these timelocks work is essential for building and maintaining effective Lightning networks.

Additional Resources

For more information on BOLT5 timelocks in Lightning implementations, please refer to the [Lightning Network specification]( Additionally, you can explore resources such as the [Bitcoin Lightning Network documentation]( and the [Open Source Bitcoin implementation]( for more details on timelocks in Bitcoin itself.

ETHEREUM NUMBER INCLUDED


Leave a Reply

Your email address will not be published. Required fields are marked *