Unlocking the Bitcoin Ecosystem: A Must-Read Guide
星球君的朋友们
2023-11-05 07:14
本文约3405字,阅读全文需要约14分钟
It is expected that the exponential growth of blockchain in the next cycle will come from the large-scale adoption of blockchain driven by the explosion of the Bitcoin ecosystem.

Written by: Echo, Infinitas

Director: Hong Shuning

With the official establishment of Satoshi Lab, a laboratory co-sponsored by Web3 Labs and Waterdrip Capital, in Hong Kong, the discussion of the Bitcoin ecosystem is gradually increasing throughout the entire encryption market. Using client-side verification solutions to build smart contracts on Bitcoin scripts, while being compatible with the infinitely scalable Lightning Network for channel transactions, may become a block on the triangle that simultaneously ensures security, decentralization, and scalability Chain large-scale application solutions.

This article will provide a popular science explanation on some basic concepts of the Bitcoin ecosystem. From the Blockchain Impossible Triangle that hinders large-scale application, to the Bitcoin Lightning Network that overcomes the Impossible Triangle, to the current solutions to Bitcoin scripts and UTXO model principles.

What hinders the large-scale application of blockchain?

Vitalik Buterin, the founder of Ethereum, and Chang Chai, the founder of Babbitt, both proposed that “blockchain networks cannot achieve security, decentralization and scalability at the same time”, which is the “impossible triangle of blockchain”. The problem of the Impossible Triangle has long hindered the large-scale application of blockchain.

On the basis of ensuring security, Ethereum has focused on the development of decentralization in the past ten years and continued to innovate at the infrastructure layer of the underlying public chain to expand the scalability of the Ethereum public chain. In order to achieve this goal, Ethereum has also iterated on various air algorithms, sharding, rollup and other technologies in the past ten years.

But regarding the scalability problem, judging from Ethereum and its Layer 2 attempts, it seems that as long as the solution is still limited to the blockchain, there will be an upper limit on performance.Even the blockchain with the strongest performance we currently see is still difficult to break through the upper limit of TPS (transactions per second). It is still far away from the requirements for large-scale commercial applications of millions of TPS and the goal of achieving hundreds of millions of TPS at the global industrial level. There is a huge gap. For mainstream public chains, whether it is Ethereum or Bitcoin, they all face a bottleneck - How to solve scalability?

How does the Lightning Network work?

The Lightning Network uses off-chain computing methods, namely Payment Channel, to completely solve the scalability problem of the Impossible Triangle——As long as you build enough channels, you can run as many concurrent transactions as you like.

Lightning Network Principle

  • Take the banking system as an analogy, if two people, A and B, open an account and transfer money. When two people are in the same bank, clearing occurs within the same bank. When A and B are not in the same bank, they need to perform inter-bank settlement operations through the central bank.

  • The Lightning Network mimics the way banks clear:Users A and B open a lightning channel between them through the Lightning Network. When the channel is opened, A and B use the channel to settle directly on the Lightning Network without settling on the Bitcoin blockchain. Only when the channel is closed do A and B need to cross the Lightning Network and settle on the Bitcoin blockchain.

Lightning channel operation process

1. Pay reserves: Analogous to the traditional scenario where you need to pay reserves in advance to open a bank account, you also need to pay Bitcoin reserves to open a Lightning Network channel.

2. Off-chain transaction accounting: Each transaction is recorded one by one through the Lightning Network, and a penalty agreement must be signed for each accounting.

3. On-chain settlement record: After closing the lightning channel, the historical transaction data is packaged and settled at one time, and finally sent to the Bitcoin blockchain.

How the Lightning Network avoids on-chain fraud

If during the channel transaction, A performs fraudulent behavior - the channel is closed early to settle Bitcoins. Then when the channel is closed, a fraudulent transaction will immediately be generated on the Bitcoin chain. Based on the openness of the Bitcoin chain, B can observe in time and punish A with a penalty agreement signed in advance. The penalty is to confiscate all As reserves.

The bottleneck of large-scale application of Lightning Network

In theory, the Lightning Network achieves infinite scalability and overcomes the impossible triangle of blockchain. But the most critical problem that hinders the large-scale application of Lightning Network is that Lightning Network uses the same script as Bitcoin, while there are no smart contracts on the Bitcoin chain, only simple scripts, which cannot carry complex applications. That is, the Bitcoin chain is Turing incomplete. Turing complete means that it can theoretically solve any computational problem. Using a Turing-complete scripting language, it can be logically compatible with other programming languages, and can theoretically realize the logic that any other language can realize, and replicate real business logic to the greatest extent. There are no smart contracts on the Bitcoin blockchain, let alone building applications based on smart contracts. soThe biggest problem that the Lightning Network needs to overcome is how to implement smart contracts on Bitcoin.

Existing solutions to improve the “power” of the Bitcoin blockchain

1. Side Chain

• Side chain refers to making a chain with smart contract functions, copying it and linking it to the Bitcoin main chain in both directions, so that Bitcoin assets can be seamlessly migrated between the main chain and the side chain, thereby realizing smart contracts,But there is currently no sufficiently decentralized two-way peg technology.The side chain requires a third-party centralized service provider for the replication and asset migration of the main chain. Currently, there is only a pan-centralized solution. For example, WBTC is an ERC-20 token issued by BitGo on the Ethereum network and is anchored to BTC 1:1 as a derivative asset. The side chain solution has never been supported by the Bitcoin Core developer community due to the centralization issue of third-party issuance.

2. Colored Coins

  • In 2012, Meni Rosenfeld, President of the Bitcoin Association, published the paper Overview of Colored Coins, which introduced a mechanism to exploit the fungibility of Bitcoin by coloring certain coins to distinguish specific tokens from other tokens. coins to create applications suitable for these coins. The specific method is to use the OP_RETURN instruction in the Bitcoin script, add 80 bytes of any characters at the end, design the string according to the specified format in the 80 bytes, mark the colored coins by artificially specifying the meaning of the string, and make updates. Complex smart contracts. But 80 bytes of space is too small to implement complex functions.

  • The follow-up Colored Coin program also introduced new technologies. For example, the Ordinals engraving technology uses the 3 M Segregated Witness space in the Bitcoin block to insert small pictures into it to issue NFTs. For example, BRC-20 uses a string of codes to express richer content than 80 bytes. But these colored coins will cause additional serious problems - occupying the Segregated Witness space. The space originally used to store Bitcoin transfer transaction signatures will crowd out the Segregated Witness space.This has led to a reduction in the number of transactions that can be executed on Bitcoin, resulting in a decline in Bitcoin performance.The colored coin scheme was also strongly resisted by Bitcoin core developers because the colored coins polluted the native Bitcoin.In addition, the artificially specified form still requires a centralized third party for server parsing.

3. Client-Validation

In 2016, Bitcoin core developer Peter Todd published a paper proposing the client-side verification paradigm.By simulating the traditional contract signing method, it ensures that only both parties know the privacy premise of the contract content.It does not require any third party participation and is completely decentralized. At the same time, when the transaction is executed, the transaction initiator provides the necessary complete transaction history data and the other party verifies it by itself to prevent the occurrence of fraud problems. There is no centralization problem, and the off-chain verification is not limited by performance, so it is currently considered by most people to be the optimal solution to solve the Turing completeness deficiency of the Bitcoin blockchain.

Traditional contract signing vs blockchain smart contract signing

  • Traditional contract signing: There is a transaction between A and B. A contract is signed first. Both parties confirm the content of the contract and then sign. The contract cannot be tampered with when signing. Any transaction in the future contract execution process is a transaction between A and B and does not require the intervention of a third party.

  • Blockchain smart contract signing: The transaction process is announced to the entire network, and all miners execute and verify it. There is no privacy in the entire execution process, and since it needs to be published to the entire network to reach consensus, performance is limited.

Is client-side validation watertight?

Seeing this, some people seem to have doubts. The decentralized Bitcoin blockchain itself solves the security problems in traditional business, but with the introduction of client verification, the solution returns to the off-chain, even if it is solved Fraud problem, so how to effectively prevent the double-spending problem?

Introducing disposable seals

Since client-side verification itself does not include a double-spending prevention mechanism, we have to introduce third-party assistance to solve this problem. To achieve this, we bind every state of every contract that needs to be verified in client validation to a specific Bitcoin’s Unspent Transaction Output (UTXO). Since UTXO only exists in two forms,"Spent and Unspent. Once you want to change the status of the verification contract, you must spend the bound UTXO (any amount is acceptable), so that the transaction that spends it can be confirmed by the blockchain. In addition, the Bitcoin that spends it The transaction must also provide proof of the content of the state transition (similar to a hash value). Simply put, the bound UTXO can be regarded as the sealing wax of this state envelope - if you want to open the envelope, you must open it Sealing wax.

Additional notes on the UTXO model

Different from the account model of Ethereum,Unspent transaction output (UTXO)Is the sum of cryptocurrency sent from one address to another but not yet redeemed by the recipient so that the funds can be sent to someone else in a subsequent transaction.

  • For example, if Alice sends 1 Bitcoin to Bob, then as long as Bob does not spend the BTC received from Alice, he owns the UTXO. Once Bob spends 1 BTC, the life cycle of the UTXO is over.

  • Assuming that Bobs wallet has only participated in one transaction in which Bob received 1 BTC from Alice, the transaction verifier knows that Bobs UTXO balance is 1 BTC. If Bob sends 1 BTC to Carol, his UTXO immediately becomes 0 BTC. If Bob then tries in the second outgoing transactiondouble flowerhis coins, the validator will find that his UTXO balance is insufficient to be used as an input for the second transaction, and honest validators will notspreadOr confirm his double-spending transaction.

The next exponential growth: Bitcoin ecosystem explodes

During the evolution of Bitcoin, the design of client-side verification has cleverly circumvented the centralization issues of side-chain and colored coin solutions, and introduced a one-time sealing mechanism to further improve security. At this moment, the Bitcoin ecosystem is ushering in the birth of a series of new protocols. Among them, the RGB protocol not only follows the above concepts, but also proposes to be compatible with the Lightning Network, laying the foundation for unlimited scalability. Although the compatibility of the RGB protocol and the Lightning Network is not yet perfect, we are full of confidence in the future and believe that the infrastructure that helps the protocol continue to be optimized will break through the long-standing limitations of the impossible triangle of blockchain.

We have more reason to expect that the exponential growth of blockchain in the next cycle will come from the large-scale adoption of blockchain driven by the explosion of the Bitcoin ecosystem. We believe that Bitcoin will break through its original single store of value and highlight its currency attributes. At the same time, it will continue to graft more applications into the Bitcoin ecosystem through diversified solutions, promote ecological scalability and sustainable development, and continue to contribute to the blockchain world. Bring endless possibilities.

星球君的朋友们
作者文库