Lightning Network Introduction and Trial (Part 1)

原文链接: What is Lightning Network and How to Try It Today


introduce


Once the Bitcoin network starts to process a relatively large number of transactions, it is obviously not scalable: because the block size is limited to 1 Mb, one day this limit will not be able to meet the continuously growing number of transactions, causing the mempool to start growing, A delayed transaction occurs. This scalability issue has spawned many Bitcoin clones in their quest to build a truly scalable blockchain. One such clone is Bitcoin Cash, which solves the scalability problem by increasing the block size to 8 Mb (and plans to increase it further).

Bitcoin Core developers are aware of this problem and have been looking for a solution. Increasing the block size is not an option as it would make it difficult for individuals to run a node - only large corporations can afford it. Also, larger blocks are only a temporary solution: in the future, when Bitcoin gains wider adoption, the block size will have to be doubled again. Therefore, it will lead to an increasingly centralized network.

On August 24, 2017, Segregated Witness (Segwit) was launched on the Bitcoin main network. Although its main purpose is not to improve scalability, but to solve the problem of variability in transaction signatures ( transaction malleability ), Segwit still improves scalability. Segwit eliminates the need to validate the transaction by changing the structure of the transaction to move sender and recipient information into a separate field (called a "witness") in the transaction (you can find a good detailed explanation here) . Additionally, Segwit modified how the block size is calculated: the "witness" field is now not considered. Since transaction information is more concise, a block can contain more transactions.

Another effect of this is that all transactions sent from a Segwit address will require less fees because the size of the fee depends on the size of the transaction. This is fantastic!

Both of these approaches, Segwit and larger blocks, share the same nature: they both require modifications to the blockchain - an approach called "on-chain". The opposite approach is called "off-chain" and it does not require blockchain modifications. Instead, it needs to create a system that attaches to the blockchain and improves its performance without modifying the blockchain. The main content of this article, the Lightning Network, is an off-chain Bitcoin scaling solution.

How does the Lightning Network work?


The purpose of the Lightning Network (LN) is to increase the throughput of the Bitcoin network without modifying its blockchain and splitting it. The idea is to create what is called a "second layer" where all transactions are transferred. Sending transactions on the second layer doesn’t require paying Bitcoin per transaction, nor waiting for new blocks to be mined — that’s the key part. On LN you can:

  1. Open payment channels and connect to other people, companies or services.
  2. Send transactions to other parties through these channels, which are free and instant - this is where the scalability problem is solved.
Let's review these points in detail.

As a software, LN is a node, just like a Bitcoin node. In order to run it, a fully synchronized Bitcoin node is required, as LN is linked to the Bitcoin network and blockchain. Channel opening combined with the Bitcoin network: When a channel is opened, a special kind of transaction is created and sent to the Bitcoin network. This transaction locks up a certain amount of bitcoins from the party who opened the channel - this is a key point: when you open a channel, you lock up the maximum amount of BTC you can possibly spend. You don't have to spend all your BTC, but it's better for you if you know how much you're going to spend up front, because open channels are not free. Locking funds in a payment channel ensures that the sender does have some funds to spend.

As the name suggests, Lightning Network is a network: nodes can connect to each other and form a network. Connecting to another node means opening a channel.

When a channel is open, it is no longer necessary to send transactions over the Bitcoin network, they can now be sent over the second layer - the Lightning Network. Sending transactions over the Lightning Network is instant and free (although a small fee may apply).

When you have a payment channel connected to other nodes, you can send BTC in two ways:

  1. directly to that node.
  2. Indirectly through any other nodes connected to this node.
The second way is probably the most common and basic case. Think of a payment hub: a large node has opened up channels to many service and product providers. You don't need to open channels for every service and product provider, just open one channel to this central node to pay indirectly.


This use case is also the most controversial: having such a large central node means the network is centralized; a large number of user nodes will depend on a small number of central nodes. This aspect of the Lightning Network is the most criticized.

(Translator's Note: The next article will introduce how to try the Lightning Network)


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325800076&siteId=291194637