← Back to Basis of Lightning Technology
BOLT 0specificationlightningpaymentstransactionsscriptp2p

BOLT 0: Introduction and Index

Welcome, friend! These Basis of Lightning Technology (BOLT) documents describe a layer-2 protocol for off-chain bitcoin transfer by mutual cooperation, relying on on-chain transactions for enforcement if necessary. Some requirements are subtle; we have tried to highlight motivations and reasoning behind the results you see here. I'm sure we've fallen short; if you find any part confusing or wrong

No reviews
Unknown·Updated Mar 28, 2026·0 reviews·0 attestations·View source
Collections:BOLTs — Merged

Specification

BOLT #0: Introduction and Index

Welcome, friend! These Basis of Lightning Technology (BOLT) documents describe a layer-2 protocol for off-chain bitcoin transfer by mutual cooperation, relying on on-chain transactions for enforcement if necessary.

Some requirements are subtle; we have tried to highlight motivations and reasoning behind the results you see here. I'm sure we've fallen short; if you find any part confusing or wrong, please contact us and help us improve.

This is version 0.

  1. BOLT #1: Base Protocol
  2. BOLT #2: Peer Protocol for Channel Management
  3. BOLT #3: Bitcoin Transaction and Script Formats
  4. BOLT #4: Onion Routing Protocol
  5. BOLT #5: Recommendations for On-chain Transaction Handling
  6. BOLT #7: P2P Node and Channel Discovery
  7. BOLT #8: Encrypted and Authenticated Transport
  8. BOLT #9: Assigned Feature Flags
  9. BOLT #10: DNS Bootstrap and Assisted Node Location
  10. BOLT #11: Invoice Protocol for Lightning Payments
  11. BOLT #12: Negotiation Protocol for Lightning Payments

The Spark: A Short Introduction to Lightning

Lightning is a protocol for making fast payments with Bitcoin using a network of channels.

Channels

Lightning works by establishing channels: two participants create a Lightning payment channel that contains some amount of bitcoin (e.g., 0.1 bitcoin) that they've locked up on the Bitcoin network. It is spendable only with both their signatures.

Initially they each hold a bitcoin transaction that sends all the bitcoin (e.g. 0.1 bitcoin) back to one party. They can later sign a new bitcoin transaction that splits these funds differently, e.g. 0.09 bitcoin to one party, 0.01 bitcoin to the other, and invalidate the previous bitcoin transaction so it won't be spent.

See BOLT #2: Channel Establishment for more on channel establishment and BOLT #3: Funding Transaction Output for the format of the bitcoin transaction that creates the channel. See BOLT #5: Recommendations for On-chain Transaction Handling for the requirements when participants disagree or fail, and the cross-signed bitcoin transaction must be spent.

Conditional Payments

A Lightning channel only allows payment between two participants, but channels can be connected together to form a network that allows payments between all members of the network. This requires the technology of a conditional payment, which can be added to a channel, e.g. "you get 0.01 bitcoin if you reveal the secret within 6 hours". Once the recipient presents the secret, that bitcoin transaction is replaced with one lacking the conditional payment and adding the funds to that recipient's output.

See BOLT #2: Adding an HTLC for the commands a participant uses to add a conditional payment, and BOLT #3: Commitment Transaction for the complete format of the bitcoin transaction.

Forwarding

Such a conditional payment can be safely forwarded to another participant with a lower time limit, e.g. "you get 0.01 bitcoin if you reveal the secret within 5 hours". This allows channels to be chained into a network without trusting the intermediaries.

See BOLT #2: Forwarding HTLCs for details on forwarding payments, BOLT #4: Packet Structure for how payment instructions are transported.

Network Topology

To make a payment, a participant needs to know what channels it can send through. Participants tell each other about channel and node creation, and updates.

See BOLT #7: P2P Node and Channel Discovery for details on the communication protocol, and BOLT #10: DNS Bootstrap and Assisted Node Location for initial network bootstrap.

Payment Invoicing

A participant receives invoices that tell them what payments to make.

See BOLT #11: Invoice Protocol for Lightning Payments for the protocol describing the destination and purpose of a payment such that the payer can later prove successful payment.

Glossary and Terminology Guide

  • Announcement:

    • A gossip message sent between peers intended to aid the discovery of a channel or a node.
  • chain_hash:

    • The uniquely identifying hash of the target blockchain (usually the genesis hash). This allows nodes to create and reference channels on several blockchains. Nodes are to ignore any messages that reference a chain_hash that are unknown to them. Unlike bitcoin-cli, the hash is not reversed but is used directly.

      For the main chain Bitcoin blockchain, the chain_hash value MUST be (encoded in hex): 6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000.

  • Channel:

  • Closing transaction:

  • Commitment number:

  • Commitment revocation private key:

    • Every commitment transaction has a unique commitment revocation private-key value that allows the other peer to spend all outputs immediately: revealing this key is how old commitment transactions are revoked. To support revocation, each output of the commitment transaction refers to the commitment revocation public key.
    • See container: commitment transaction
    • See originator: per-commitment secret
  • Commitment transaction:

  • Fail the channel:

    • This is a forced close of the channel. Very early on (before opening), this may not require any action but forgetting the existence of the channel. Usually it requires signing and broadcasting the latest commitment transaction, although during mutual close it can also be performed by signing and broadcasting a mutual close transaction. See BOLT #5.
  • Close the connection:

    • This means closing communication with the peer (such as closing the TCP socket). It does not imply closing any channels with the peer, but does cause the discarding of uncommitted state for connections with channels: see BOLT #2.
  • Final node:

  • Funding transaction:

  • Hop:

  • HTLC: Hashed Time Locked Contract.

  • Invoice: A request for funds on the Lightning Network, possibly

    including payment type, payment amount, expiry, and other information. This is how payments are made on the Lightning Network, rather than using Bitcoin-style addresses.

  • It's ok to be odd:

    • A rule applied to some numeric fields that indicates either optional or compulsory support for features. Even numbers indicate that both endpoints MUST support the feature in question, while odd numbers indicate that the feature MAY be disregarded by the other endpoint.
  • MSAT:

    • A millisatoshi, often used as a field name.
  • Mutual close:

  • Node:

  • Origin node:

  • Outpoint:

  • Payment hash:

  • Payment preimage:

    • Proof that payment has been received, held by the final recipient, who is the only person who knows this secret. The final recipient releases the preimage in order to release funds. The payment preimage is hashed as the payment hash in the HTLC.
    • See container: HTLC
    • See derivation: payment hash
  • Peers:

    • Two nodes that are in communication with each other.
      • Two peers may gossip with each other prior to setting up a channel.
      • Two peers may establish a channel through which they transact.
    • See related: node
  • Penalty transaction:

  • Per-commitment secret:

  • Processing node:

  • Receiving node:

  • Receiving peer:

    • A node that is receiving a message from a directly connected peer.
    • See category: peer
    • See related: sending peer
  • Revoked commitment transaction:

    • An old commitment transaction that has been revoked because a new commitment transaction has been negotiated.
    • _See category: [commitment transaction](#commitmen

[Content truncatedview full spec at source]

Discussion (0 threads)

Sign in to start a discussion on this spec.