We already have a few questions about technical details of Lightning network, however, …
- What is the Lightning network proposal in the first place?
- What problem is it aiming to solve?
Bitcoin Stack Exchange is a question and answer site for Bitcoin users, developers, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
Scalability of "everyone checks everything"
Bitcoin is a gossip network:
P2P nodes connect mostly randomly to each other and pass-on new information to each other as they receive it. That way, information floods through the network quickly: each step further increases the nodes that were informed exponentially (until most are).
In Bitcoin every node receives and checks every piece of blockchain data, currently some are relayed even more than once. While this is a manageable problem at 1 MB blocks, this setup has a real cost: bandwidth usage, CPU load for verification, and storage-footprint on the hard drive.
At 1 MB, the Bitcoin network can support about 3 transactions per second (tps). To scale up to Visa-levels we'd likely need around 3,000 tps. To serve all internet commerce, a multiple of that. While there are some gains possible with more efficient use of the space we have (CoinJoin, Schnorr Signatures, …), it is obviously a much harder challenge to manage ~1 GB blocks every ten minutes. At that point, relay bandwidth would be a multiple of that, verification of 144 GB blockchain data per day would take a significant portion of an average home computer's computing power, and hard drives would tend to fill up fairly quickly.
It follows that there is a limit to what can be done with pure on-chain scaling.
Early Bitcoin merchants were comfortable to take the risk of accepting zero-confirmation transactions. The "first-seen" principle was firmly established as a node policy and even transactions without fees would confirm eventually.
Since then, blockspace demand has increased, some miners changed their policy to mine the transaction with the most fees instead of the "first-seen", and zero-fee transactions have become infeasible.
Meanwhile, payment processors and some merchants still take the calculated risk of accepting transactions before confirmation, but generally, a transaction is only reliable after it is confirmed.
The Lightning Network (LN) proposal describes a structure to provide secure, instant transactions negotiated only among the involved users.
LN leverages payment channels, a type of multi-signature construct, to create jointly managed balances between pairs of users. By re-negotiating the balance's payout shares, the users can instantly transfer balance to each other. Each re-negotiation is recorded as an update to the smart-contract securing the funds of both parties.
By having multiple connections in the network at once, users can receive balances from one partner and forward them to another. Leveraging this network, Lightning Network is promising instant payments to every other LN participant and increased transaction capacity at a low-cost.
Should a user wish to close a payment channel, the smart-contract's current state can be executed on the Blockchain as a regular transaction.
Interested to read more? See → How does the Lightning network work in simple terms?