Polkadot’s Cross-Chain Solution
Analysis of Polkadot cross-chain solution
With the development of web3.0, blockchain technology has also entered the next stage. In order to break down the barriers between various blockchains and better expand the boundaries of the blockchains, cross-chain technology has attracted everyone’s attention and has developed well. PolkaDot is one of the highly anticipated Cross chain bridge development solutions, currently being developed by a team led by former Ethereum CTO Gavin Wood. So what is Polkadot in the context of a new round of changes in Internet technology that quietly begins? What problem does it solve? And how is it solved? We will try to answer in this article.
Polkadot overview
basic introduction
Polkadot is a heterogeneous multi-chain technology mainly composed of relay chains, parachains and transfer bridges . It is built to connect public chains, consortium chains, private chains, and all technologies that may appear in the web3.0 ecosystem in the future. It hopes to enable individual blockchain networks to exchange information and trustless transactions through Polkadot’s relay chain. Aims to achieve the 3 goals that blockchain has been striving to achieve: interoperability , scalability , 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 protocol (such as the TCP/IP protocol). Polkadot also verifies the messages in the message transmission between the various chains. order and validity of the message.
Vision
Polkadot hopes to connect various blockchain networks, mainly focusing on solving the following three levels of problems:
interoperability
- In the current blockchain ecosystem, each blockchain network exists in isolation, and there is no possibility of communication and interoperability between them. In the future blockchain world, there will also be various blockchains 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 down 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 transact with data or assets on other chains.
Scalability
- In most current blockchains, transactions are processed one by one in the nodes, so when the transaction volume gradually increases, it is easy to encounter performance bottlenecks due to network limitations.
- Polkadot provides the ability to run multiple parallel chains, and each parallel chain can process multiple transactions in parallel. In this case, the Polkadot network is equivalent to gaining unlimited scalability. In the test, a parachain in the Polkadot network can process about 1,000 transactions per second. By creating a parachain, the number of transactions per second can be doubled, so that the Polkadot network has high performance.
shared security
- There is a competition for computing power between blockchains based on PoW consensus, which will not only cause a waste of computing power and other resources, but also some blockchains with less computing power will be very vulnerable to attacks, so each blockchain has the security Sex is not the same.
- And if each blockchain wants to communicate with each other, the different computing power of each blockchain will lead to the fact that each blockchain cannot trust each other equally, which is not conducive to information such as assets. Cross-chain communication.
- In the Polkadot network, the relay chain will be responsible for the security of the entire network as a whole , and each parachain joining the Polkadot network has the same level of security, so they can fully trust each other’s Parachain. And because Polkadot concentrates the security of the network on the relay chain, it is very difficult to attack the entire Polkadot network .
the overall architecture of the Polkadot network, from which we can see that the relay chain (Relay chain) is at the center of the network, which handles the overall consensus and security in the network; there are many parachains (Parachain) Connect to the Polkadot network by connecting the relay chain; you can also see that there is a bridge at the bottom of the figure , which is also how the Polkadot network is connected to an independent blockchain (eg: Ethereum) . In addition, Bridge Smart Contract Development Services you can see many participants, such as: Collator, Validator, Fisherman, etc. Then we will introduce the main chain roles and different participants in the Polkadot network respectively.
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 stake DOT tokens on the relay chain to participate in the governance of the Polkadot network.
- Since most business-related operations in the Polkadot network will be implemented by each parachain, only a small number of transaction types such as network governance and parachain auctions will occur on the relay chain. Therefore, the transaction procedures on the relay chain Fees are usually higher than transaction fees on parachains.
Parachain
- Most of the computing work in the entire Polkadot network will be delegated to each parachain for processing, and the parachain will be responsible for the implementation of specific business scenarios . Polkadot does not impose any restrictions on the functions of parachains. Parachains can be used as application chains to realize any application scenarios, but they do not have the consensus capability of blocks themselves. They transfer the responsibility of consensus to the relay chain. Share security guarantees from the relay chain. Parachains can communicate with each other through ICMP (Interchain Message Passing), and they are also subject to block verification by the validators assigned to it.
- However, a parachain may not be a specific chain. It is defined in Polkadot as: a parachain is a data structure specific to certain applications, which is globally consistent and can be performed by the validator of the Polkadot relay chain. verify. Some parachains may be Dapp-specific chains, or they may be parachains focused on specific functions such as privacy or scalability, and there may be some experimental parachains. In short, parachains are not necessarily essential in nature. is the blockchain.
Bridge
- Bridges play an important role in the inter-chain communication of blockchains. There are still many places to be determined about the specific implementation of the transfer bridge in Polkadot, and there should be more specific updates in the official follow-up. Up to now, the transfer bridge in Polkadot mainly has three different meanings:
- Bridge Contracts : By deploying smart contracts on Polkadot’s parallel chains and external blockchains (such as Ethereum) to achieve the effect of bridges, to achieve cross-chain value transfer.
- Cross-Parachain Communication : Since parachains can communicate between chains through ICMP, there is no need for smart contracts to undertake the function of bridging. And ICMP-based inter-chain communication will be a solution natively supported by Polkadot.
- In-built Bridging Modules : In the Polkadot network, receiving messages on parachains from non-parachains is likely to be done in Polkadot’s built-in modules. In this way, there is no need to deploy smart contracts in non-parallel chains to act as “virtual parachains”, and collectors can directly collect and sort out the transactions on the blockchain and submit them to the relay chain, just like for all parachains. do that. The current built-in bridge module may be considered for development based on a specific chain (for example: Bitcoin, Ethereum), which means that as long as the blockchain supported by the built-in handover module can be directly bridged to the Polkadot network, and No need to bridge through smart contracts. However, for blockchains that are not currently supported by built-in bridges, the method of transferring bridge contracts must be used.
The main participants
It can be seen from Figure 2 that there are 4 main participants in the Polkadot network, namely validators , collectors , fishers and nominators . In a nutshell, their responsibilities are as follows: the collector will collect transaction information from each parachain and package it into blocks to be verified, and then a group of validators will verify the blocks on the parachain; at the same time, in the network The phisher will monitor the behavior of the validator, and if the phisher finds illegal behavior, he will report it to other validators; and the nominee will participate in network governance by staking tokens to the validator he trusts. Then the similarities and differences between them are analyzed as follows:
Validator
- The validator will be responsible for the block production of the Polkadot network, and it will run a relay chain node to verify the blocks produced by its nominated parachain in each round of block production. After the blocks produced by the parachains are determined by their validator set, the validator set will assemble the block headers of all parachains into the blocks of the relay chain and reach a consensus.
- In the Polkadot network, validators exist in the form of groups. They do not come from parachains, but a pool of validators managed by the relay chain and assigned to parachains through random grouping.
Collator
- The collector will help the validator to collect, validate and submit candidate parachain blocks, and it will maintain a full node of the parachain.
Fisherman
- Phishers mainly rely on reporting illegal transactions or blocks to obtain profits. In Polkadot, Phisher is a software process that monitors the Polkadot network for illegal behavior and reports illegal transactions to the Polkadot network if found. Phishers also need to pledge tokens when reporting illegal transactions, and the reported transactions also have to go through the consensus process. As long as they pass the verification of 2/3 or more of other validators, they will be packaged into the block. The transaction is valid, Build a cross chain bridge and the fisherman will receive the corresponding reward. If the fisherman is found to have made a false report, the token he pledged will be confiscated as a punishment. Similarly, the punishment and reward for fishermen are also blockchain transactions.
Nominator
- The nominee is the party who owns the token, and he hopes to benefit by staking the token. But it is either due to the low token share or lack of expertise in maintaining relay chain nodes, so he does not directly act as a validator.
- But the system also provides another way to participate in network governance. It does not have to maintain a relay chain node, but it can choose up to 16 validators it trusts, and pledge its stake through that validator, so as to to share the benefits of validators.
Interchain Communication — ICMP
Between the parachains of the Polkadot network, they communicate with each other via ICMP. ICMP means Inter-Chain Message Passing, that is, inter-chain message passing. Taking parachain A sending a transaction to parachain B as an example, the process is briefly described as follows:
- Parachain A puts the transactions that need to be cross-chain into its own message output queue (egress).
- The collector of parachain A will get the cross-chain transaction at the same time when collecting the transaction, and submit it to a group of validators of parachain A.
- If this group of validators of parachain A is successfully verified, the block header information of this parachain A and the information in the egress queue in parachain A will be submitted to the relay chain.
- The relay chain will run the consensus algorithm for block confirmation and cross-chain transaction routing , and the validator on the relay chain will move the corresponding transaction of parachain A from the egress queue of parachain A to the message input queue of parachain B ( ingress).
- Parachain B will execute the block, execute the corresponding transaction in the ingress queue and modify its own ledger.
The above are the main steps of cross-chain transactions based on ICMP in Polkadot.
ICMP is a protocol in the Polkadot network that defines a way to pass messages between parachains and/or relay chains without additional trust. It is very dependent on the existence of the relay chain in the Polkadot network, without the relay chain ICMP, Build a token bridge it is meaningless. Likewise, ICMP is not a standard for messages or formats .
0