Let's watch Daniel explain the blockchain side chain technology in ten minutes

Recently, blockchain technology has attracted a lot of attention. Although blockchain technology is currently developing rapidly, there are still many problems that need to be solved, such as transaction performance and privacy protection, before traditional blockchain technology can be applied to commercial applications, especially financial applications. One way to solve these problems is to develop new blockchains from scratch, but this approach creates a lot of repetitive work and requires constant issuance of new digital assets. So whether there is a solution for technical upgrading relying on the original blockchain without affecting the work of the original blockchain, the side chain was proposed against the background of this demand. This article first introduces the basic concept of side chain, then analyzes the background and working principle of side chain, and finally introduces the main existing side chain.

01—Basic Concepts

A sidechain protocol is essentially a cross-blockchain solution. With this solution, it is possible to transfer digital assets from the first blockchain to the second blockchain, and safely return from the second blockchain to the first block at a later point in time chain. The first blockchain is usually referred to as the main blockchain or main chain, and the second blockchains are referred to as sidechains. Originally, the main chain usually referred to the Bitcoin blockchain, but now the main chain can be any blockchain. Sidechain protocols are envisioned as a way to allow digital assets to be transferred between the main chain and sidechains, a technology that opens the door to developing new applications and experiments with blockchain technology.

02 - Generate background

In 2012, discussions about the concept of sidechains first appeared in Bitcoin chat rooms. At that time, the core development team of Bitcoin was considering how to safely upgrade the Bitcoin protocol to add new functions, but it is dangerous to add functions directly on the Bitcoin blockchain, because if the new functions have software failures in practice, It will have a serious impact on the existing Bitcoin network. In addition, due to the characteristics of Bitcoin's network structure, if a large-scale change is made, it is necessary to obtain the support of the majority of Bitcoin miners. At this time, Bitcoin Core developers proposed a sidechain solution. This technique allows developers to attach new functionality to other blockchains, but those blockchains remain attached to the existing Bitcoin blockchain. These new features in the blockchain can take full advantage of the existing Bitcoin network features without compromising the existing Bitcoin network.

In 2014, many blockchains with new functions have appeared at this time, and various altcoins such as Litecoin, Dogecoin, etc. have emerged. At this time, Bitcoin’s core development team was concerned that the creation of these altcoins would dilute the value of Bitcoin. They believe that Bitcoin should be used as a reserve currency and new features should be added to the sidechain. This way, if users want to use other new blockchain features, they don't need to buy other tokens. In order to transform the concept of sidechains into reality, Bitcoin core developers such as Adam Back and Matt Corallo jointly initiated the establishment of Blockstream, and in October of the same year, released the white paper "Enabling Blockchain Innovations with Pegged Sidechains", which clearly proposed for the first time The concept of side chain and its protocol implementation scheme.

Through the side chain, new functions such as transaction privacy protection technology and smart contracts can be added on the basis of the main chain, which allows users to access a large number of new services without affecting the work of the existing main chain. In addition, the side chain also provides a safer way to upgrade the protocol. When a catastrophic problem occurs on the side chain, the main chain is still safe and sound.

03—implementation plan

The technical foundation of the side chain implementation is two-way peg. Through the two-way peg technology, the digital assets can be temporarily locked in the main chain, and the equivalent digital assets can be released in the side chain at the same time. When the equivalent digital assets are locked in the side chain, the digital assets of the main chain can also be released. The biggest difficulty in the implementation of two-way anchoring is that the protocol transformation needs to be compatible with the existing main chain, that is, it cannot affect the work of the existing main chain. The specific implementation methods can be divided into the following categories:

(1) Single custody model

The easiest way to achieve two-way anchoring between the main chain and the side chain is to send digital assets to a single custodian of the main chain (similar to an exchange). When the single custodian receives the relevant information, it will be activated on the side chain. corresponding digital assets. The biggest problem with this solution is that it is too centralized. Figure 1 shows a schematic diagram of the working principle of a single custody model with Bitcoin as the main chain:

(2) Alliance model

The alliance model is to use the notary alliance to replace a single custodian, and use the multi-signature of the notary alliance to confirm the flow of digital assets on the side chain. In this model, if you want to steal the digital assets frozen on the main chain, you need to break through more institutions, but the security of the side chain still depends on the honesty of the notary alliance. Figure 2 shows the working schematic diagram of the alliance model with Bitcoin as the main chain:

The biggest advantage of the single-custody model and the federation model is that they do not require any changes to the existing Bitcoin protocol.

(3) SPV mode

The SPV (Simplified Payment Verification) model is the original idea of ​​the decentralized two-way anchoring technology in the original sidechain white paper "Enabling Blockchain Innovations with Pegged Sidechains". SPV is a method for proving the existence of a transaction, which can verify the existence of a transaction in a particular block with a small amount of data. In the SPV mode, users send digital assets on the main chain to a special address on the main chain. Doing so will lock the digital assets of the main chain, and the output will still be locked within a possible competition period to confirm the corresponding The transaction has been completed, and an SPV proof is created and sent to the sidechain. At this moment, a corresponding transaction with SPV proof will appear on the side chain, and at the same time, it is verified that the digital asset on the main chain has been locked, and then another digital asset with the same value can be opened on the side chain. The use and changes of this digital asset will be sent back to the main chain at a later time. The process repeats when this digital asset is returned to the main chain. They are sent to the locked output on the sidechain, and after a certain waiting time, an SPV proof can be created to be sent back to the main chain to unlock the digital asset on the main chain. The problem with the SPV model is that a soft fork of the main chain is required. Figure 3 shows a schematic diagram of the workflow in the SPV mode of the Bitcoin main chain:

(4) Drive chain mode

The drive chain concept was proposed by Bitcoin Hivemind founder Paul Sztorc. In the drive chain, the miner is the 'algorithm agent guardian', which detects the current state of the side chain. In other words, miners are essentially fund custodians, and DriveChain issues the custody of locked digital assets to digital asset miners, and allows miners to vote when to unlock digital assets and where to send the unlocked digital assets . Miners observe the state of the sidechain, and when they receive a request from the sidechain, they execute a coordination protocol to ensure they agree on the authenticity of the request. The higher the participation of honest miners in the drive chain, the greater the overall system security. Like the SPV side chain, the drive chain also needs to soft fork the main chain. Figure 4 shows a schematic diagram of the workflow of the drive chain mode with Bitcoin as the main chain:

(5) Mixed mode

All the above modes are symmetrical, and the hybrid mode is an effective combination of the above methods for obtaining bidirectional anchoring. Because the main chain and the side chain are fundamentally different in the realization mechanism, the symmetrical two-way anchoring model may not be perfect. The hybrid mode is to use different unlocking methods on the main chain and side chain, such as using the SPV mode on the side chain, and using the drive chain mode on the main chain network. Likewise, the hybrid model also requires a soft fork of the main chain.

04—Typical example

At present, the more famous sidechains include the sidechain based on the Bitcoin network BTC Relay, Rootstock's Liquid, and non-Bitcoin sidechains such as Lisk and domestic Asch.

BTC Relay is a sidechain solution for smart contracts based on the Ethereum blockchain launched by ConsenSys. BTC Relay connects the Ethereum network with the Bitcoin network in a secure and decentralized way. BTC Relay allows users to verify Bitcoin transactions on the Ethereum blockchain by using Ethereum’s smart contract capabilities. Ethereum DApp developers can make API calls to BTC Relay from smart contracts to verify Bitcoin network activity.

Liquid is an open source side chain project of Blockstream. It uses Bitcoin's two-way anchoring technology. The purpose of Liquid is to enable Bitcoin to be exchanged between the main chain and side chain, aiming to improve privacy, reduce costs, and speed up exchanges and brokerages. Value transfer and settlement process between merchants.

Lisk is a blockchain platform dedicated to creating distributed applications for JavaScript developers, founded in early 2016 by Max Kordek and Oliver Beddows of Germany. It runs every distributed application on its own and unique blockchain, known as a sidechain. This encapsulation makes the main Lisk mainnet efficient, fast and streamlined.

Asch is a decentralized application platform based on side chain technology launched in China. It was established by Shan Qingfeng in early 2016. The services provided by the Asch platform include a main chain and a set of application software development kits. Asch's main chain is mainly responsible for building infrastructure, data sharing between applications, and asset routing. The application software development kit has a built-in side chain protocol, which is mainly responsible for building specific applications. Through the side chain protocol, assets can be exchanged with the main chain.

05—Summary

The side chain is to achieve the goal of the cryptocurrency financial ecology in an integrated way, rather than exclude the existing system like other digital assets. Sidechain technology further expands the application scope and innovation space of blockchain technology, enabling traditional blockchains to support a variety of asset types, as well as small and micro payments, smart contracts, security processing mechanisms, property registration, etc., and can enhance blockchain Chain privacy protection. Using the side chain, we can easily build various intelligent applications such as financial contracts, stocks, futures, derivatives, etc.

I hope this article can help friends and children's shoes who are developing in this industry to spend less time looking for information in forums, blogs and other places, and spend the limited time on learning, so the editor has compiled some information on the official account: Java Architect Inn. Scan the QR code below to follow the official account. I believe that for those who have worked, encountered technical bottlenecks or wrote bloggers, this information must have what you need.

Guess you like

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