Jump to content

Lightning Network

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Davidswiki (talk | contribs) at 19:38, 14 June 2018 (Updating design section). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Lightning Network
Original author(s)Joseph Poon, Thaddeus Dryja
Developer(s)Elements Project (Blockstream)
Lightning Labs
ACINQ
MIT DCI
Preview release
1.0 RC / 6 December 2017; 6 years ago (2017-12-06)
Written inC, Go, Scala
TypeCryptocurrency
Websitelightning.network

The Lightning Network is a "second layer" payment protocol that operates on top of a blockchain (most commonly Bitcoin). It enables instant transactions between participating nodes and has been touted as a solution to the bitcoin scalability problem. It features a peer-to-peer system for making micropayments of digital cryptocurrency through a network of bidirectional payment channels without delegating custody of funds.

Normal use of the Lightning Network consists of opening a payment channel by committing a funding transaction to the relevant blockchain, followed by making any number of Lightning transactions that update the tentative distribution of the channel's funds without broadcasting to the blockchain, optionally followed by closing the payment channel by broadcasting the final version of the transaction to distribute the channel's funds.

To perform as intended, Lightning Network requires a transaction malleability fix, such as Segregated Witness (SegWit) in Bitcoin[1].[2]

History

Joseph Poon and Thaddeus Dryja wrote the Lightning white paper. The specification was announced after the paper, and is being developed by multiple parties, including Elements Project (c-lightning, depending on Bitcoin Core/bitcoind), Lightning Labs (lnd, depending on btcsuite/btcd or Bitcoin Core/bitcoind), and ACINQ (eclair, depending on Bitcoin Core/bitcoind).

The specification is available on Github, and its largest contributor is Rusty Russell of Blockstream.[3]

The public alpha release of lnd was made on 10 January 2017.[4] The Release Candidate (RC1) of the Lightning protocol specification was released on 6 December 2017.

In December 2017, three different entities working on creating software implementations, ACINQ, Lightning Labs, Blockstream, performed a series of interoperable test transactions.[5] There is also an implementation by the MIT DCI that uses a different specification. Payment provider Bitrefill tweeted in December 2017 claiming it was the first lightning transaction operating on the Bitcoin network.[6]

On January 4, 2018. TorGuard became the first VPN provider to accept payments via mainnet Lightning network[7] while covering any potential losses of funds when sending Lightning payments.[8]

In January 2018 Blockstream launched a payment processing system for web retailers called "Lightning Charge," and noted that lightning was live on mainnet with 60 nodes operating as of January 18, 2018, and should be considered "in testing."[9][10]

On March 15, 2018, Lightning Labs CEO Elizabeth Stark announced the initial release of lnd 0.4-beta for developers with the intent on making it available for testing purposes on the main bitcoin network. The released also included Litecoin support.[11]

On March 28, 2018 ACINQ released desktop version of eclair software for mainnet.[12]

On April 4, 2018 ACINQ released Android version of eclair software for mainnet. [13]

In April 2018, the eclair wallet was removed from the Google Play store for a few days because the app developer lost the private signing key making it unable to be updated for critical bugs.[14]

In April 2018, Btcduke.com becomes the first bitcoin-to-fiat exchange in the world to accept main net lightning network deposits and withdrawals. [15]

In May 2018, Vaultoro.com becomes the first bitcoin-to-gold exchange in the world to accept main net lightning network deposits. [16]

2018 DDoS attacks

On March 20, 2018, Lightning Network nodes faced a Distributed Denial of Service (DDoS) attack that sent around 200 nodes offline, down from around 1,050 to 870. The exploit used as many node connections as possible to prevent any new connections.[17] A month earlier in February, Bitcoin Core developer Peter Todd said the Lightning protocol could very well "prove to be vulnerable to DoS [denial of service] attacks in its current incarnation." According to the cryptographer, this poses danger to both the peer-to-peer as well as the blockchain level of the project.[18]

Design

The payment channels allow participants to transfer money to each other without having to make all their transactions public on the blockchain. This is done by penalizing uncooperative participants. When opening a channel, participants must commit an amount (in a funding transaction, which is on the blockchain). Time-based script extensions like CheckSequenceVerify and CheckLockTimeVerify make the penalties possible.

If we presume a large network of channels on the Bitcoin blockchain, and all Bitcoin users are participating on this graph by having at least one channel open on the Bitcoin blockchain, it is possible to create a near-infinite amount of transactions inside this network. The only transactions that are broadcast on the Bitcoin blockchain prematurely are with uncooperative channel counterparties.

— Lightning Paper[19]

The CheckSequenceVerify (CSV) Bitcoin Improvement Proposal details how Hash Time-Locked Contracts are implemented with CSV and used in Lightning.[20]

Commitment transactions

If Alice and Bob have a payment channel, both of them also have a "latest" commitment transaction. A commitment transaction divides the funds from the funding transaction according to the correct allocation between Alice and Bob. For example, if Alice owns 1.0 mBTC (equal to 0.001 bitcoins or 100000 satoshis) and Bob owns 1.0 mBTC in the channel, the commitment transactions divide the total channel funds in that way.

Commitment transactions allow multiple users to participate in a single transaction (and thus act as a single entity), using a multi-key system. Determination of congestion falls primarily on the miners, so this network rests on the assumption that honest miners will not organize a 51% attack.[21][better source needed]

Since commitment transactions spend the funding transaction, they must be signed by both partners.

Commitment transactions are actually a pair of asymmetrical transactions. Alice's commitment transaction contains two outputs: one which pays Bob outright, and another which is a timelocked, revocable output that eventually pays Alice. The revocable output may be revoked by Bob if Bob knows the revocation key. Bob's commitment transaction is the reverse: it pays outright to Alice, but pays Bob's share under a timelocked, revocable output; if Alice knows the revocation key to Bob's commitment transaction, she can revoke it.

Initially, Alice holds the commitment transaction, and Bob holds the commitment transaction. The revocation key for , , is known by Alice, but not by Bob; the revocation key for , , is likewise known only by Bob.

Suppose Alice decides to pay Bob 0.25 mBTC (before this, each owns 1 mBTC):

  1. Alice creates a new Bob's transaction, , which allocates 0.75 mBTC to Alice and 1.25 mBTC to Bob.
  2. Alice signs and sends to Bob.
  3. Bob receives , signs it, and keeps it.
  4. Bob creates a new Alice's transaction, , which allocates 0.75 mBTC to Alice and 1.25 mBTC to Bob.
  5. Bob signs and sends to Alice.
  6. Alice receives , signs it, and keeps it.
  7. Alice provides , invalidating ; she can then delete .
  8. Bob provides , invalidating ; he can then delete .

Limitations

The Lightning Network is made up of bidirectional payment channels between two nodes which combined create smart contracts.[22] If at anytime either party drops the channel, the channel will close and be settled on the blockchain.[16] Due to the nature of the Lightning Network's dispute mechanism which requires all users to watch the blockchain constantly for fraud, the concept of a "watchtower" has been developed, where trust can be outsourced to watchtower nodes to monitor for fraud.[23]

Criticisms

Opponents of the Lightning Network have been quick to point out design flaws in the off-chain network which has been cited as a scaling solution to Bitcoin's scaling problems, citing various issues such as the path-routing problem which could make it difficult or even impossible to find payment routes.[22] In addition other opponents of this second layer solution such as Yours CEO Ryan Charles explain in clear terms how the Lightning Network can not work smoothly, where opening and closing channels will not happen instantly and users must be online at all times to receive a payment, in addition to other problems.[24][25] Also, when payment channels are used, funding them requires two on-blockchain transactions (to open and then close the channel) making single-use Lighting Network payment channels more expensive than doing a single on-blockchain Bitcoin transaction.[26]

Others have criticized the Lightning Network saying it's impossible for the network to be decentralized, saying it will lead to a hub-and-spoke model of centralized hubs on the network.[27][28] Some solutions to the path-routing problem have been suggested such as Flare,[29] but are also subject to centralisation by using trusted master nodes, called 'beacons'. Some fear due to the centralizing nature of Lightning Network, it will lead to "Lightning Banks" where legislators may be able to target them in an attempt to regulate the system.[30]

References

  1. ^ Does Lightning require Segregated Witness? in Rusty Russell's Lightning Things To Know
  2. ^ "lightning-rfc: Lightning Network Specifications". 25 September 2017 – via GitHub.
  3. ^ "lightning-rfc: Lightning Network Specifications". 25 September 2017 – via GitHub.
  4. ^ "Alpha Release of the Lightning Network Daemon". Lightning Network Community Blog. Lightning Labs. 10 January 2017. Retrieved 19 September 2017.
  5. ^ "BITCOIN LIGHTNING NETWORK IS COMING: TEST A TRANSACTION NOW". Bitcoinist. 20 December 2017. Retrieved 21 December 2017.
  6. ^ "Payment Provider Bitrefill Runs Successful Lightning Transaction Test". Coindesk. 29 December 2017. Retrieved 4 January 2018.
  7. ^ "TorGuard VPN announcing mainnet Lightning network support".
  8. ^ "TorGuard VPN officially announces coverage of potential losses".
  9. ^ "Blockstream Launches Micropayments Processing System for Bitcoin Apps". Coindesk. 17 January 2018. Retrieved 21 January 2018.
  10. ^ "'UNFAIRLY CHEAP' LIGHTNING NETWORK MAINNET HITS 40 NODES, 60 CHANNELS". Bitcoinist. 18 January 2018. Retrieved 21 January 2018.
  11. ^ "Announcing our first Lightning mainnet release, lnd 0.4-beta". Article. Lightning. 2018-03-15.
  12. ^ "ACINQ eclair desktop for mainnet announcement".
  13. ^ "ACINQ eclair Android for mainnet announcement".
  14. ^ "Eclair: first Bitcoin Lightning Network wallet removed from Google Playstore". News Article. WhatTech.com. 2018-04-09.
  15. ^ https://www.reddit.com/r/lightningnetwork/comments/89q9o5/first_exchange_accepting_ln_payments_as_deposit/
  16. ^ a b "Vaultoro: First Bitcoin Exchange to accept Lightning Network deposits". News Article. bitcoinmagazine.com. 2018-05-04. Cite error: The named reference "BitcoinMagazine" was defined multiple times with different content (see the help page).
  17. ^ "Lightning Network DDoS Sends 20% of Nodes Down". News Article. TrustNodes. 2018-03-21.
  18. ^ "Bitcoin developer warns Lightning Network is flawed and likely vulnerable to DoS attacks". News Article. The Next Web. 2018-02-27.
  19. ^ https://lightning.network/lightning-network-paper.pdf
  20. ^ "bips: Bitcoin Improvement Proposals". 25 September 2017 – via GitHub.
  21. ^ Poon, Joseph (November 2015). "The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments" (PDF). We Use Coins. {{cite web}}: Cite has empty unknown parameter: |dead-url= (help)
  22. ^ a b "Lightning Network May Not Solve Bitcoin's Scaling 'Trilemma'". Article. CoinDesk. 2018-01-20.
  23. ^ "Bitcoin Lightning Fraud? Laolu Is Building a 'Watchtower' to Fight It". Article. CoinDesk News. 2018-02-22. Retrieved 2018-03-21.
  24. ^ Charles, Ryan (2018-01-28). "Lightning Network vs. Bitcoin Cash". Video. YouTube.
  25. ^ "Why We Chose Bitcoin Cash Over Litecoin". article. Yours. 2017-10-18.
  26. ^ "Will Bitcoin's Lightning Network Kill Off Altcoins Focused On Cheap Transactions?". Article. Forbes. 2017-12-28.
  27. ^ "Mathematical Proof That the Lightning Network Cannot Be a Decentralized Bitcoin Scaling Solution". Medium. 2017-06-26.
  28. ^ "Lightning Network Centralization Leads to Economic Censorship". Article. Bitcoin.com. 2017-10-09.
  29. ^ "Flare: An Approach to Routing in Lightning Network" (PDF). Whitepaper. Bitfury. 2016-07-06.
  30. ^ "Bitcoin And The Lightning Banks". Article. SeekingAlpha. 2018-01-26.