In the final battle of "Reunification 4", the winner turned out to be… Lightning Network!

"I used to think that 2019 will be a long time, and the result is coming."

The "Avengers 4: The Final Battle" produced by Marvel has been launched. After the tyranny of the tyranny, the heroes of the Alliance faced a battle.

In the rivers and lakes of Bitcoin, there is also a League of Legends, which is called "Lightning Network."

As a decentralized payment method, Bitcoin solves the trust problem of both parties, but slow & expensive & blocking has always restricted the application and development of Bitcoin.

In order to solve these problems of Bitcoin, the heroes of the Alliance thought of many ways, and Lightning Network is one of them. "Mom no longer has to worry about my slow transfer." The birth of Lightning Network has greatly improved the trading speed and scalability of Bitcoin.

  • How fast is the lightning network?

Bitcoin can handle up to 7 strokes per second (tps), Ethereum is about 15 strokes per second, VISA can process 45,000 strokes per second, and in 2017, 11 is Alipay. 256,000 pens/second.

With the lightning network, you can process up to a million transactions per second in the future, and it's really lightning fast.

  • Why is Bitcoin so slow?

In order to ensure the correctness and unchangeability of the transaction, the Bitcoin network needs to record the details of each transaction in the block, and in order to control the growth rate of the block data, the Bitcoin network limits the size of each block. At 1MB, the mining time for each block is controlled at around 10 minutes.

Moreover, the higher the fee paid to the miner, the faster the transaction will be packaged. If other people's transaction costs are higher than yours, you can only wait in line. The waiting time ranges from a few minutes to a few hours. Sometimes it will take even a few days.

  • Is the lightning network principle too complicated? Xiaobai can also understand

Many articles on the Internet that explain the lightning network are very technical and difficult to understand for Xiaobai. Here, Fat 0 uses the example of the "Re-Link" hero to explain to everyone how the lightning network works.

For example, Captain America and the Hulk jointly opened a public account at Union Bank (so that two people built a lightning network payment channel). In order to facilitate the transaction, the two of them first deposited 100 yuan into the account. The total amount of the account is 200 yuan. Every time a transaction occurs, Captain America and the Hulk need to sign the confirmation of the allocation of 200 yuan (2-2 more), and at the same time invalidate the distribution plan of the previous transaction.

How many?:

  1. The captain of the United States paid 50 yuan to the Hulk, and the result was 50 yuan for the US captain and 150 yuan for the Hulk. Then the captain of the United States and the Hulk signed a contract;
  2. The captain of the United States paid the Hulk for another 20 yuan. The result of the distribution was 30 yuan for the US captain and 170 yuan for the Hulk. Then the captain of the United States and the Hulk signed a new contract and abolished the first contract.
  3. The captain of the United States paid the Hulk for another 10 yuan. The result of the distribution was 20 yuan for the US captain and 180 yuan for the Hulk. Then the third contract was signed and the second contract was abolished. And so on.

The transactions that take place during this whole process do not need to be wound up. If the Captain America or the Hulk wants to close the public account and withdraw it from the public account, it is necessary to take the final fund allocation result to the counter for registration (recorded on the chain), which is greatly Reduced billing process and handling fees.

It seems to be perfect, but there is a problem with it: If someone does not tear up the old contract and use it to cheat, what should I do?

For example, the Hulk and the US captain signed a new contract. The Hulk needs to transfer 100 yuan to the captain of the United States. However, the Hulk did not tear up the old contract and still took the old contract to register at the counter.

Here the lightning network introduces a concept of punishment. The Captain America and the Hulk will have a supplementary clause when signing a new contract. If one party illegally releases the old contract, the other party has the right to take all the money in the public account. In this way, no one on the transaction side dares to cheat.

  • Lightning network routing node

"There is no way in the world. If you walk too many people, it will become a road."

Of course, individual users cannot establish a lightning network payment channel with each node. If the transaction node does not have a direct connection channel, it can use the routing node (equivalent to an intermediary) to conduct transactions.

Quite simply, if there is no payment channel between Raytheon and Captain America, but there is a passage between the Hulk and Thor, then Raytheon can use the Hulk to realize the mutual transfer between the Hulk and the Captain America. The Hulk plays a role as an intermediary.

Through the routing nodes like the Hulk, the heroes of the Avengers Alliance have built a wide-ranging "Lightning Network."

At present, the number of lightning network nodes has exceeded 7,700. The number of channels established between these nodes has exceeded 39,000, and the total capacity of bitcoin exceeds 1,000 BTC.

Source: Cobo