Anatomy of Polkadot cross-chain solution
With the development of web3.0, blockchain technology has also entered the next stage. In order to break the barriers between the various blockchains and better expand the boundaries of the blockchain, cross-chain technology has attracted everyone's attention and has developed well. PolkaDot is one of the much-anticipated cross-chain solutions, currently developed by the team led by former Ethereum CTO Gavin Wood. So in the context of a new round of Internet technology quietly starting, what exactly is Polkadot? What problem does it appear to solve? And how is it solved? We will try to give the answer in this article.
- Research Report | The full-featured Polkadot mainnet is expected to be online in June, with a DOT target price of $ 135
- Gavin Wood: Polkadot's 2019 Annual Review (full text)
- Technical Guide | Polkadot Wave Card Chain: Building Pre-POC-3 on Substrate
- Babbitt column | What is the cross-chain across?
- Babbitt's exclusive approach to the low-key legend, see how the real Gavin Wood "nothing"
- Popular science | Five differences between Cosmos and Polkadot
Polkadot is a heterogeneous multi-chain technology, mainly composed of relay chains, parallel chains and transition bridges . It was established to connect public, alliance, private, and all technologies that may appear in the web3.0 ecosystem in the future. It hopes to enable each independent blockchain network to achieve information exchange and trustless transactions through Polkadot's relay chain. The goal is to achieve the 3 goals that the blockchain has been striving to achieve: interoperability , scalability, and shared security .
Polkadot is also a protocol that allows independent blockchains to exchange information with each other. Polkadot is an inter-chain blockchain protocol, which is different from the traditional Internet message transmission protocols (such as the TCP / IP protocol). Polkadot also verifies the messages during message transmission between the various chains. Sequence and validity of messages.
Polkadot hopes to be able to connect to various blockchain networks, focusing on solving the following three levels of problems:
In the current blockchain ecosystem, each blockchain network exists in isolation, and there is no possibility of communication and interoperation between them. In the future blockchain world, there will also be various blockchains in order to meet certain specific needs, but if they are still isolated from each other, it will be very detrimental to the development of the blockchain ecosystem. In order to break this barrier and expand the boundaries between blockchain networks, interoperability between blockchains is a problem that must be solved.
One of the design goals of Polkadot is to allow DApps and smart contracts on the blockchain to seamlessly trade with data or assets on other chains.
In most current blockchains, transactions are processed one by one at the nodes, so when the transaction volume gradually increases, it is easy to encounter performance bottlenecks due to network limitations.
And Polkadot provides the ability to run multiple parallel chains, each of which can process multiple transactions in parallel. In this case, the Polkadot network is equivalent to gaining unlimited scalability. In the test, a parallel chain in the Polkadot network can process about 1000 transactions per second. Through the creation of the parallel chain, the number of transactions per second can be doubled, so that the Polkadot network has higher performance.
Picture source: https://polkadot.network/Polkadot-lightpaper.pdf
- Shared security
There is competition in computing power between the blockchains based on the PoW consensus, which will not only cause waste of computing power and other resources, but also some blockchains with less computing power will be very vulnerable to attack. Therefore, the security of each blockchain Sex is different.
And if each blockchain wants to communicate with each other, it will not be able to trust each other on an equal basis due to the difference in computing power between the various blockchains, which is not good for information such as assets. Cross-chain communication.
In the Polkadot network, the relay chain is responsible for the security of the entire network . Each parallel chain that joins the Polkadot network has the same degree of security. Therefore, they can fully trust each other when performing cross-chain communication. Parachain. And because Polkadot concentrates the security of the network on the relay chain, it is very difficult to attack the entire Polkadot network .
Picture source: https://polkadot.network/Polkadot-lightpaper.pdf
Figure 1 (picture from: https://polkadot.network/PolkaDotPaper.pdf)
Figure 1 shows the overall architecture of the Polkadot network. From this we can see that the relay chain is at the center of the network and it will handle the overall consensus and security in the network. There are also many parachains. Connect the relay chain to access the Polkadot network; at the same time, you can see that there is a bridge at the bottom of the figure, which is also the way to connect an independent blockchain (such as Ethereum ) in the Polkadot network. . In addition, you can see many participants, such as: Collector, Validator, Fisherman, and so on. Then we will introduce the main chain roles and different participants in the Polkadot network separately.
Main chain role
- Relay chain
The relay chain is the central chain of the Polkadot network, which provides a unified consensus and security guarantee for the entire network.
All validators in the Polkadot network will pledge DOT tokens on the relay chain to participate in Polkadot network governance.
Since most business-related operations in the Polkadot network will be implemented by various parallel chains, only a small number of transaction types such as network governance and parallel chain auctions will occur on the relay chain, so the transaction procedures on the relay chain The fee is usually higher than the transaction fee on the parallel chain.
Most of the computational work in the entire Polkadot network will be delegated to each parallel chain for processing, and the parallel chain will be responsible for the realization of specific business scenarios . Polkadot does not make any restrictions on the functions of parachains. Parachains can be used as application chains to implement any application scenario, but they do not have the ability to block consensus. They pass the responsibility of consensus to the relay chain. Share the security guarantee from the relay chain. Parachains can communicate with each other through ICMP (Interchain Message Passing), and at the same time, they will be verified by the validators assigned to it.
However, the parachain may not be a specific chain. It is defined in Polkadot as: Parachain is a data structure specific to certain applications. It is globally consistent and can be performed by validators of the Polkadot relay chain. verification. Some parachains may be specific to some Dapps, or they may be parachains that focus on specific functions such as privacy or scalability. There may also be some experimental parachains. In short, parachains are not necessarily essential in nature. It's a blockchain.
Image source: https://wiki.polkadot.network/docs/assets/network/one_parachain.png
The bridge plays an important role in the inter-chain communication of the blockchain. There are still many places to be determined about the implementation of the transition bridge in Polkadot. There should be more specific updates in the subsequent official. As of now, the transition bridge in Polkadot mainly has three different meanings:
- Bridge Contracts (Bridge Contracts) : By deploying smart contracts on the parallel chains of Polkadot and external blockchains (such as Ethereum) to achieve the effect of the bridge, in order to achieve cross-chain value transfer.
- Cross-Parachain Communication : Because parallel chains can communicate with each other through ICMP, there is no need for smart contracts to undertake bridging functions. And ICMP-based inter-chain communication will be a solution that Polkadot natively supports.
- In-built Bridging Modules : In a Polkadot network, receiving messages on a parachain from a non-parallel chain is likely to be done in Polkadot's built-in modules. In this case, there is no need to deploy a smart contract in a non-parallel chain to act as a "virtual parachain", and the collector can directly collect and organize transactions on the blockchain and submit it to the relay chain, just like the parallel chain. Do that. The current built-in bridge module may consider developing based on a specific chain (for example: Bitcoin, Ethereum), which means that as long as the blockchain supported by the built-in transfer module can be directly bridged to the Polkadot network, and No need to bridge through smart contracts. However, for the blockchain that the built-in bridge does not support for the time being, the method of the bridge bridge contract must also be used to achieve it.
The main participants
Figure 2 (picture from: https://polkadot.network/PolkaDotPaper.pdf)
It can be seen from Figure 2 that in the Polkadot network, there are four main participants, namely validators , collectors , phishers, and nominees . In a nutshell, their duties are as follows: the collector will collect transaction information from each parallel chain and package it into blocks to be verified, and the next set of validators will verify the blocks on the parallel chain; at the same time in the network The phishers will monitor the behavior of the verifier, and if the phishers find illegal behavior, they will report to other verifiers; and the nominee will participate in network governance by pledge tokens to the verifiers they trust. Then the similarities and differences between them are analyzed as follows:
The validator will be responsible for the block production of the Polkadot network. It will run a relay chain node and verify its nominated parallel chain blocks in each round of block generation. After the blocks from the parallel chain have been determined by their validator set, the validator set will assemble all parallel block headers into the blocks of the relay chain and reach consensus.
In the Polkadot network, validators exist in the form of groups. They do not come from the parachain, but are a pool of validators that are managed by the relay chain.
The collector will help the verifier to collect, verify, and submit alternative parachain blocks, and it will maintain a full node of the parachain.
The phishers mainly rely on reporting illegal transactions or blocks to gain income. A phisher is a software process in Polkadot that monitors illegal behavior in the Polkadot network and reports illegal transactions to the Polkadot network once found. The phishers also need to pledge tokens when reporting illegal transactions, and the reported transactions also need to go through the consensus process. As long as they pass the verification of 2/3 and above other validators, they will be packaged into the block. The transaction is valid, and the phishers will get the corresponding rewards. If they find that the phishers have made false reports, they will confiscate their tokens as punishment. The same punishment and rewards for phishers are also blockchain transactions.
The nominee is the party that owns the token, and he hopes to benefit by pledged the token. But it is either due to a small share of tokens or lack of professional skills to maintain the relay chain nodes, so he did not directly act as a validator.
However, the system also provides another way to participate in network governance. It does not need to maintain a relay chain node, but it can choose up to 16 validators he trusts, and pledge its stake through that validator. To share the benefits of validators. Inter-Chain Communication-ICMP
Between the parallel chains of the Polkadot network, they communicate with each other through ICMP. ICMP stands for Inter-Chain Message Passing. Taking parachain A to parachain B as an example, the process is briefly explained as follows:
- Parachain A puts transactions that need to be cross-chain into its own message output queue (egress).
- The collectors of parachain A will get this cross-chain transaction at the same time when they collect the transaction and submit it to a group of validators of parachain A.
- If this group of validators of parachain A are successfully verified, they will submit the block header information of parachain A and the information in the egress queue in parachain A to the relay chain.
- The relay chain will run a consensus algorithm for block confirmation and cross-chain transaction routing . The validator on the relay chain will move the corresponding transaction of the parallel chain A from the egress queue of the parallel chain A to the message input queue of the parallel chain B ( ingress).
- Parachain B will execute this block, execute the corresponding transactions in the inress queue and modify its own ledger.
The above are the main steps for cross-chain transactions based on ICMP in Polkadot.
ICMP is a protocol in the Polkadot network that defines the way messages are passed between parachains and / or relay chains without additional trust. It relies heavily on the existence of relay chains in the Polkadot network, and it would be meaningless without the relay chain ICMP. Similarly, ICMP is not a standard for messages or formats .
As far as the consensus mechanism in the Polkadot network is concerned, the ICMP protocol includes mechanisms for queue processing, forwarding, and sequencing of messages. By combining with the Polkadot network relay chain, it can achieve data availability. By combining with the parachain in Polkadot network, it also realizes the input and output of messages. However, the ICMP protocol does not include lower-level networks, and message semantics itself.
In short, ICMP is not and is not too "standard" in the traditional sense, it will be a field of proprietary technology that relies on Polkadot.
In the Polkadot network, all nodes also need to reach a consensus before all states on the blockchain can continue to build and evolve. This is a method of reaching agreement on shared states. The state of the nodes in the Polkadot network can be kept in sync with each other through the consensus mechanism. It aims to provide network participants with objective facts of all states, and each network participant has its own subjective judgment based on this objective fact. To communicate and finally reach an agreement to build a new block.
What is probabilistic vs. provable finality? A pure Nakamoto consensus blockchain running PoW consensus, it can only achieve probability certainty and eventually reach a certainty state. Probabilistic certainty means that under some participants in the network, we see that multiple blocks are connected to a certain block, that is, the longest chain principle, then we think it is certain. The final consensus at this time means that at some point in the future, all nodes in the network will reach a consensus on the authenticity of a set of data. It may take a long time to reach this final consensus, and we simply cannot estimate how long this time is. However, deterministic tools such as GRANDPA or Ethereum's Casper FFG are designed to provide stronger and faster guarantees of block certainty. And after some process of the Byzantine agreement, they will never be restored. This concept of irreversible consensus is also called provable certainty.
There are two different kinds of consensus in the Polkadot network, namely GRANDPA and BABE . The reason why there are two different kinds of consensus is because Polkadot uses a hybrid consensus approach. Here the hybrid consensus separates the generation of the block from the final determination of the block, where the BABE consensus is used for block generation and the GRANDPA consensus is used for block determination .
Hybrid consensus is a way to obtain the benefits of probabilistic certainty (the ability to generate new blocks) and provable certainty (a single agreement reached on a chain, and irreversible) in the Polkadot network. By adopting such a hybrid consensus mechanism, Polkadot can quickly generate blocks, while the slower deterministic mechanism can be run in an independent process to complete the block confirmation without the overall slowdown of the network transaction speed or Blocked. So what kind of consensus mechanism is BABE and GRANDPA?
Figure 3 Block generation interval in the BABE consensus
BABE (Blind Assignment for B lockchain Extension) is a consensus protocol based on PoS. It runs between validator nodes and determines which validator generates a new block. The BABE and Ouroboros Praos algorithms are similar, except that there are changes in the "chain selection rules" and "slot time".
Starting with the genesis block, we divide the subsequent time of creating the block into different epochs, and then divide the different epochs into slots with smaller time intervals, as shown in Figure 3. The main point in the BABE consensus protocol is to choose different validators and generate a block in each slot .
BABE will randomly assign validator slots for block generation according to the total amount of tokens pledged by the validator. In each slot, the validator in Polkadot will participate in a "draw", and the result of the draw will tell the validator whether he is a candidate for the block generated in the slot. In Polkadot, a slot has 6 seconds. Due to the randomness of the validator selection in each epoch period, this may result in multiple validators in a slot, and may also result in the absence of a validator in some slots, which may lead to block time. As shown in Figure 4, there are two or even three validators in some slots, but there are no validators in some slots. So how to deal with these two different situations.
Figure 4 (picture from: https://wiki.polkadot.network/docs/assets/VRF_babe.png)
- slot has multiple validators
When there are multiple validators in a slot as candidates for generating blocks, each validator generates a block and broadcasts it to the network. At this time, it is like a game, and whose block is first spread to more nodes in the network, it will win. Due to the influence of the network topology and network delay, multiple chains may continue to generate blocks until they are finally determined. As shown in Figure 5, there may be multiple chains generating blocks at the same time, and the longest chain may eventually be confirmed.
Figure 5 (picture from: https://wiki.polkadot.network/docs/en/learn-consensus)
- no validator in slot
When no validator in a slot wins a lottery, the slot does not seem to be able to generate blocks. At this time Polkadot will choose a validator through the round-robin method in the background, and let him generate a secondary block. But if there is already a validator who wins the lottery in a slot, then he will generate a primary block and there will be no secondary blocks. Therefore, we will see that there must be a block in each slot, which is either a primary block or a secondary block. As shown in Figure 6, there may be both a primary block (represented by 1 in the figure) and a secondary block (represented by 2 in the figure) in the temporarily forked chain.
Figure 6 (picture from: https://wiki.polkadot.network/docs/en/learn-consensus)
GRANDPA ( G HOST-based Recursive ANcestor Deriving Agreement) is a method implemented for the Polkadot relay chain to finalize the block.
As long as 2/3 of the nodes are honest and can handle 1/5 of the Byzantine nodes asynchronously, then it can work in a partially synchronous network model. One significant difference is that even in long-term network partitions or other network failures, the GRANDPA protocol will still reach consensus on a certain chain, rather than consensus on a certain block, which greatly speeds up The process of finalizing the block. In the GRANDPA protocol, all nodes will vote for all the parent nodes they can see. In this case, all the blocks on the chain will have one vote. If the number of votes obtained by a block exceeds 2/3 of the entire network, then you can finally determine that this block is on the final chain.
In other words, as long as more than 2/3 of the validators prove that a certain chain contains a certain block, they can immediately and finally determine the chain where the block is located as the final determined chain.
- Forked selection
By combining the BABE consensus and the GRANDPA consensus, Polkadot's choice becomes clear when faced with a fork. The BABE consensus will always generate blocks on the chain finalized by GRANDPA. There may be a fork behind the finalized block, and the BABE consensus will provide probability certainty by creating blocks on the chain with the most major blocks (such as the block labeled 1 in Figure 7).
As shown in Figure 7, the black block is the block that has been finalized. The block marked with 1 in the figure represents the main block, and the block marked with 2 represents the secondary block. In this figure, even though the topmost chain is the longest chain, its main block is indeed the smallest, so it is not eligible. Although the total number of blocks in the second chain is short, the number of main blocks is indeed the largest, so the second chain should be selected.
Figure 7 (picture from: https://wiki.polkadot.network/docs/assets/best_chain.png)
Incentives and punishments
In each blockchain ecosystem, there will be an economic system to enable all network participants to better participate in the contribution of the network. So what does this economic system look like in Polkadot.
DOT is a native token in the Polkadot network. DOT is also a certificate of permission for the holder to vote, verify or entrust to other validators, and it can also be used to pay transaction fees when conducting transactions. DOT has four main uses in Polkadot:
The DOT holders determine the future of the Polkadot network to some extent. Similar privileges owned by miners in other platforms will be given to the participants of the relay chain, that is, the holders of the DOT. They can manage important events that occur on the network, such as protocol upgrades and repairs.
Game theory inspires DOT holders to do good in the network. Participants who do not do evil will get corresponding rewards through this mechanism, and those who do evil in the network will lose their DOT. This can also ensure the security of the network to a certain extent.
For messages to be sent from one blockchain to the next, the sender can pay a certain DOT as a transaction fee, but this is not required.
New parachains need to join the network by bonding DOT. And unmaintained and useless parachains can also be removed from the network by unbinding DOT. This is also a form of PoS. DOT token will not be used until the mainnet is launched.
Parachute Slot Auction
According to current estimates, the maximum number of parachains is 100, but it may decrease or increase in the future.
The Polkadot network auctions the right to use parachains through an auction mechanism-the highest bidder needs to lock a certain number of DOTs in the PoS system in order to have the right to use the parachains acquired within a certain period of time.
This means that if you want to use the parachain on Polkadot, you need to buy and lock a lot of DOT until you don't want to use this parachain anymore.
Participant motivation and punishment
- Validator incentives
The validator confirms the block on the relay chain by pledged the token. When the block is confirmed, it will receive the corresponding reward. If they commit evil, they are reported by the phishers and verified to be true. They will be punished.
The collector will collect the transactions in the parallel chain, and the transaction fee in these transactions will be used as the collector's reward.
The phishers monitor the validators in the Polkadot network. If an illegal transaction is found, it will report to other groups of validators for verification by pledged tokens. If other validators prove that the report is true, the phishers will Obtain the corresponding rewards. Conversely, if the report is false, the phisher will be punished accordingly and the tokens pledged by him will be confiscated.
Nominees can support up to 16 validator candidates they trust, and pledge their tokens with validators they trust, so that they can share their benefits with the validators.
In Polkadot's pledge mechanism, all validators will receive the same reward, and all nominees participating in the pledge will wait for the validators to deduct the commission set before distributing the reward according to their mortgage ratio. Ecology
As shown in Figure 8, PolkaProject released all the projects in the Polkadot ecosystem. You can see that there are quite a few projects in the Polkadot ecosystem, including wallets, blockchain browsers, infrastructure projects, and some forums. There are still many excellent projects, such as: ChainX, Edgeware, Darwinia, Cdot, etc. We will give a brief introduction to these excellent projects later. Before that, let's take a look at the developer ecology of Polkadot.
Figure 8 (picture from: https://pbs.twimg.com/media/EJojsU7U4AAE5Ag?format=jpg&name=large)
Judging from Polkadot 's open source project in GitHub, there are code-related updates almost every day, and most of the updates are Gavin's commit. And Substrate, a blockchain development framework also developed by it, has sufficient code updates every day. As shown in the two pictures below, we have reason to believe that the core projects in the Polkadot ecosystem are currently under normal maintenance. And in the Riot chat software, there are two chat rooms "Substrate Technical" and "Polkadot Watercooler", and there is also a "Polkadot Network (Official)" chat room in Telegram. There are almost 5,000 people in this chat room, and there are daily Many small friends ask technical questions and Polkadot-related questions, and they can get timely responses. Therefore, Polkadot still has a relatively active developer ecosystem.
When it comes to Polkadot ecology, you have to mention Substrate. Substrate is an abstract blockchain development framework developed by Parity during the development of Polkadot. In the process of developing Polkadot, they slowly discovered that there are many mechanisms that every blockchain should have, such as consensus, pledge, accounts, etc. They gradually abstracted these modules until they were finally abstracted. Substrate is a next-generation blockchain development framework.
Substrate is developed by Rust language. We can create a complete and configurable blockchain through the Substrate framework. With Substrate, we can get many out-of-the-box features, as well as add custom features:
- A PoS-based blockchain
- Scalable runtime environment
- Pluggable consensus (PoS, PoW, PoA)
- P2P network layer
- Built-in basic encryption tools
- Support for light clients
Currently, Substrate is a project independent of Polkadot, and is now developed and maintained by a separate team. Although Polkadot is a project built on Substrate, any other projects based on Substrate are connected to the Polkadot network and run. We can now use Substrate to build a new blockchain without waiting for Polkadot development to complete, and we can start using this framework to develop a blockchain.
ChainX is a star project in the Polkadot ecosystem. Its vision is to break the asset barriers between chains to achieve a multi-currency fusion public chain ecology. ChainX's system architecture mainly includes three steps:
- ChainX 1.0 mainly implements a single-chain system, which is implemented based on the blockchain framework Substrate, in order to become a parallel chain of Polkadot. And ChainX v1 has been launched before Polkadot in May 2019, and it has now been run as a unique chain and issued a ChainX native token named PCX. However, due to the development delay of Polkadot, Polkadot has not yet been launched on the main network, so ChainX is still in a single-chain operation and cannot be connected to Polkadot as a parallel link.
- ChainX 2.0 is mainly used to implement a dual-chain system, that is, adding a bridge adapter bridge chain as a flat chain of Polkadot. The functions developed by ChainX 2.0 now include a BTC adapter bridge and a WASM smart contract platform that supports BTC. ChainX v2 is expected to be launched after Polkadot releases v1.
- ChainX 3.0 is mainly intended to implement a multi-chain system. At the 3.0 stage, ChainX will be split into a multi-chain architecture, which will serve as the first layer relay network operation of Polkadot. Among them, Polkadot focuses on the underlying message cross-chain, while ChainX focuses on achieving its internal asset cross-chain. As shown below. among them:
- ChainX relay chain: It is the most secure security of the entire ChainX system, and is responsible for the overall shared security consensus of the first layer network.
- Adapter bridge parallel chain: It is used to split each adapter bridge into independent parallel chains to share pressure.
- Transaction parallel chain: Provide free matching services for the assets of the entire system to improve transaction throughput.
- DAPP Parachain: Various applications developed by the community can run independently and maintain cross-chain communication capabilities.
Picture source: https://chainx.org/static/1326c0c531c7770e90eb72ef364585ca/f4193/section3_3.png
Darwinia (Darwin Network) said in its official website that it is a Polkadot parachain for user-oriented blockchain application developers. In the business scenario, the Darwin network is mainly focused on the cross-chain problem of the game blockchain .
Darwin Networks hopes to use blockchain technology and frameworks to construct an open network and application development kit. This network and development kit will be applied to the blockchain trusted technology and the infrastructure of Web3. At the same time, it can have the following characteristics: layered network design, support for cross-chain interaction, developer-friendliness, and the best users Experience and highly customizable. Driven by this vision, they hope to be able to build the Darwin Network and the Darwin Application Chain SDK.
Dallas Network is a blockchain network built on the Substrate framework. It refers to Polkadot's cross-chain networking framework in the design of the architecture, including the design of relay chains, flat chains, and transition bridges. The Darwin network is a member of the Polkadot state, but at the same time it is different from Polkadot. The Darwin network is mainly focused on cross-chain and application chain businesses in the game and application direction. Its technical architecture diagram is shown below. The Darwin relay chain will be incorporated into the Polkadot network as a parallel link when the Polkadot mainnet is launched in the future.
Picture source: https://darwinia.network/static/media/architecture.389ccdfd.png
The Darwin network is currently in the testnet phase, and its overall development roadmap is as follows. It can be seen that the Darwin network is expected to go online in December 2019 and release its application chain SDK by February 2020.
Picture source: https://darwinia.network/
Edgeware is the first WASM-based smart contract platform in the Polkadot ecosystem. It is also a parallel chain in the Polkadot network, with the scalability and security of the Polkadot network.
Edgeware is based on the Substrate framework. Since Substrate implements almost all the code needed to launch a working blockchain, including the libp2p network, WebAssembly operation, PBFT consensus, and the client running the verification node. Therefore, Edgeware's work mainly includes the construction of a blockchain governance system for writing C / C ++ / Russian smart contracts that can be compiled into Ethereum WebAssembly, porting existing EVM smart contracts, and eventually running on Ewasm.
Cdot Network hopes to create a cross-chain hub in the Polkadot ecosystem, namely Cdot Hub, to connect the parallel chains in Polkadot with some mainstream public chains (which can also include some of the more important alliance chains, etc.).
Cdot Hub is developed based on the Substrate framework, adopts the Tendermint consensus, and will implement the IBC cross-chain protocol. This allows the application chain to obtain cross-chain interoperability as long as it is connected to Cdot at low cost. We can see that Cdot hopes to realize the IBC protocol. Therefore, I believe that when Cdot goes online in the future, it is hoped that it will become a bridge project connecting the Cosmos ecology and Polkadot ecology.
Polkadot, as a cross-chain technology solution, will also face the problems that cross-chain itself needs to solve, including the atomicity , verifiability , data consistency, and security of cross-chain transactions. In Polkadot, these problems are mainly solved through relay chains, parachains, and ICMP mechanisms. All parachains in the Polkadot network will share the overall security of the network through the relay chain, and the verifier will transfer different messages between different parallel chains through the ICMP protocol. And there are corresponding incentives and punishment measures in the Polkadot network to increase the cost of the verifier to do evil and ensure the security of the network.
Above, we have introduced the basic structure of the Polkadot network, including all the roles of the chain and the participants in the network, as well as its consensus mechanism and incentives and punishment measures. Then, what about Polkadot as a whole, and what are the advantages and disadvantages?
- In the Polkadot network, the consensus of the network is managed by the relay chain. All parachains share security , and all parachains have the same level of security. Cross-chain communication under the shared security model makes it easier to solve data availability issues.
- Due to the shared security in Polkadot, the development of the application chain (parallel chain) does not need to maintain the security of the blockchain itself, which can reduce the development cost of the blockchain .
- Polkadot separates the consensus of block generation from the consensus of block confirmation , and adopts the mixed consensus model of BABE and GRANDPA, which can accelerate the consensus efficiency in the network.
- Developers can build an application chain based on the Substrate blockchain development framework. The blockchain will natively support cross-chain functions within the Polkadot ecosystem, and it includes various out-of-the-box modules, such as governance modules (voting systems), The pledge module and authentication module can be used to quickly build a blockchain and access the Polkadot network .
- In the Polkadot network, the world state of the network is maintained by the relay chain, and cross-chain communication is achieved between the parallel chains through ICMP. And not only can cross-chain transfers be performed between parachains, but also arbitrary information can be communicated . This means that one parachain can initiate a smart contract call to another parachain. But it hasn't materialized yet.
- The cost of adding parachains is high. According to the web3 foundation (the foundation behind Polkadot, they will do technical research and marketing on the Polkadot ecosystem). According to the explanation of parallel chain leasing, the resources on the parallel chain are limited, so the initial parallel chain will be in the form of auction. Do, the follow-up will continue to maintain in the form of lease. In order to auction or lease a parallel chain, it is necessary to use DOT to pledge. This may cause the maintenance cost of the parallel chain to be too high. Only a chain with a large number of DOTs can enter the Polkadot network.
- It is also because of the shared security of the Polkadot network that the entire network has a certain "sitability". If the Polkadot network relay chain is attacked, the entire network will be harmed.
- The ICMP protocol has not been implemented, and as of now the mainnet has not been online, so many ideas have not yet been verified.
to sum up
In summary, Polkadot is an innovative cross-chain project, which proposes concepts such as relay chains and parallel chains, and distinguishes the generation of blocks from the consensus determination. At the same time, it released the Substrate framework to build a blockchain platform. And through ICMP to achieve cross-chain communication between parallel chains . Through our study and research on Polkadot during this time, we found that for the cross-chain mechanism ICMP, it is still in a relatively early stage. It was recently learned in the community that the official is about to release ICMP-related information. From the implementation point of view, the paper is also in a state of being unfinished. But at the same time we also saw many projects migrating to the Substrate framework, such as: Shift . You can see that Substrate's code base is updated daily with huge amounts of code, and Substrate also has a more active developer community. Therefore, we believe that Substrate is a promising blockchain development framework. Regarding the outlook of ICMP in the Polkadot ecosystem, we are relatively conservative, but we will continue to pay attention to its development trends.
Interconnection is the general trend. If any ecology chooses to develop in isolation, it will be squeezed by the huge network effect generated by the blockchain Internet and eventually be eliminated. In general, Polkadot greatly reduces the development cost of the application chain. Modules such as consensus do not need to be implemented by themselves. They can directly rely on the relay chain. As long as the parallel chain is online in the Polkadot network, it can enjoy equal level of security with all the parallel chains Grade, it looks like this would be a very attractive point. However, the limited parachain resources in Polkadot and the way to enter the auction will inevitably discourage participants with small DOT holdings, which increases the entry threshold for the Polkadot network. In short, we should maintain an open mind. In the era of cross-chain solutions, there is a possibility of anything happening. We should further understand the technology itself, understand its advantages and disadvantages, and architecture methods.
- ICMP : Inter-chain Message Passage, is a protocol used to solve cross-chain communication in Polkadot.
- Relay chain : A chain in the Polkadot network, which is mainly responsible for the consensus of the Polkadot network and the communication between the parallel chains.
- Parachain: A blockchain running in the Polkadot network. It implements some specific application scenarios, but does not have consensus capabilities. It is an application chain.
- Transition bridge : acting as an intermediary between a relay chain and an external blockchain (for example: Ethereum) in the Polkadot network, through the transition bridge, the external blockchain can be used as a "virtual parallel chain" to access the relay Chain to enable network communication between the external blockchain and the chains in the Polkadot network.
- Collator : It is a node that maintains the nodes of the parachain by collecting transactions on the parachain and generating state transition proofs for the verifier.
- Validator : It is a node that maintains the relay chain by pledged DOT to verify the state transition proof from the collector on the parallel chain and determine consensus with other validators.
- Fisherman : They are responsible for monitoring the validators and collectors in the network. As long as they do evil, the phishers can report by pledged a small amount of DOT, but if they really find out that they have done evil, they can get a lot Return on revenue.
- Epoch : epoch is a period of time used for generating blocks in the BABE protocol. It is divided into different slots. Each slot is a smaller time interval. In Polkadot, it defaults to 6 seconds. There is a block generated.
- Ewasm : WebAssembly for Ethereum, Ethereum's next-generation virtual machine.
- Bonding : It is a process of “freezing” tokens. Only by “freezing” tokens can parallel links be added to the relay chain.
- PolkadotPolkadot wiki
- ParachainsPolkadot wiki
- BridgesPolkadot wiki
- Polkadot ConsensusPolkadot wiki
- Polkadot ConsensusPolkadot wiki
- Polkadot Network
- Mortgages · Polkadot Wiki
- Deep differences between Cosmos and Polkadot
- ChainX: Crypto Asset Gateway for Polkadot Ecosystem
- Darwinia Network-Darwinia Network