Analysis of Polkadot Technology Architecture: combination with IPFs or revolutionary blockchain system

Time:2020-6-10

preface


Blockchain technology has entered the next stage. The substract framework developed by the former Ethereum CTO team allows developers to build their own blockchain, “one key chain” is no longer a dream. Polkadot blockchain network based on this framework has become the most expected cross chain solution, and Polkadot is also known as Tianwang project. Under the background that a new round of changes in Internet technology is quietly starting, what are substrateand Polkadot, and whether their technical architecture is really against the sky? Why and what problems do they solve? How will the integration with IPFs technology allow blockchain technology to evolve?

From Ethereum to create another miracle

When it comes to Ethereum, many people think of vitalik buterin. In fact, Gavin wood, who is the soul of Ethereum, is a doctor of computer science and a hidden God in the real world. He co founded the Ethereum project with V God and served as CTO technical director. Gavin wood invented the solidity language to write smart contracts, which is also the biggest difference between Ethereum and bitcoin. The introduction of smart contracts made TaiFang explode completely.

Analysis of Polkadot Technology Architecture: combination with IPFs or revolutionary blockchain system

Picture: Gavin wood has 13000 followers on GitHub

Leaving Ethereum, Gavin wood co founded parity tech with partners such as Dr. Jutta Steiner, director of safety and audit. They have developed the substrate project, a powerful blockchain cross chain development framework, to help developers build their own blockchain using the next generation technology.

Key problems in existing blockchain Technology

Including the existing three main blockchain systems: bitcoin, Ethereum, EOS, etc., each blockchain project, user, miner, DAPP, etc. forms an independent ecological Kingdom, which is separated from each other. In a sense, they violate the promise of blockchain decentralization and make the Internet more closed and isolated, which seriously restricts the development of blockchain technology.

There are five key problems in the current blockchain technology stack: firstly, the lack of scalability, interoperability and developability, the limited development of DAPP decentralized application, and the difficulty of large-scale application. Secondly, governance sacrifices the interests of most people, computing power monopoly and super node monopoly, and the interests of most decentralized users / miners are actually abandoned. Finally, the isolation between blockchain networks has existed for a long time from the beginning to now.

Cross chain to open the value exchange channel of blockchain

Cross chain is the technology of value exchange in different blockchain networks. Why is interworking between blockchain networks so important? Because it can break the isolation of the existing network and establish the asset exchange on the chain of multiple networks. Crossing the chain is like digging the Panama Canal to let two strange waters quickly connect and merge.

In many aspects, the challenge of blockchain interoperability and scalability is mutual correlation. Cross chain enables two blockchain networks to function successively. Each platform realizes interoperability and improves the total throughput to enhance scalability.

It seems beautiful, but cross chain solutions also have technical difficulties:

First, how to ensure the atomicity of cross chain transactions?

Second: how to confirm the transaction of another chain?

Third: how to maintain the invariance of total assets in cross chain transactions?

Fourth: how to ensure the network security of the two chains?

Fifthly, how to realize cross chain interconnection among multiple chains?

In order to solve the above technical problems, there are many solutions in the blockchain industry.

1. Transaction atomicity

HTLC (hash time lock contract) is an implementation of atomic exchange protocol, which guarantees the atomicity of transactions through hash locking and time locking mechanisms.

2. Transaction confirmation

Blockchain is closed and independent, and there is no direct communication channel. How do cross chain transactions confirm that transactions in the sending chain do occur and are confirmed? The answer is “middleman”. The role of “middleman” is used to exchange information. The “middleman” can be a node or a group, a centralized organization or a distributed group. The existing solutions mainly include the following contents: notarization mode, relay mode and side chain mode.

  • A kind of Notarization mode: the “intermediary” of notarization mode not only collects data, but also confirms and verifies transactions. According to the way of verifying transactions, it can also be divided into the following types: centralized notarization scheme, multi signal notarization scheme and distributed signature notarization scheme.
  • A kind of Relay mode: the “intermediary” of relay mode only acts as a data collector and forwards the collected data to the target chain. The target chain validates transactions based on the collected data. Verification methods vary according to the system structure, such as relying on SPV authentication, or depending on the number of signatures of verification nodes. Relay mode is a relatively decentralized and loosely coupled mode, which has higher scalability. There are many cross chain implementation schemes for relay mode, such as cosmos hub, relay chain in Polkadot (described in detail below), relay in BTC relay, etc., which all act as relay.
  • ▶ Side chain mode: side chain mode is a strong coupling design. These two chains collect each other’s data through “middlemen” and embed the data directly into their own block or storage space in some way. In cross chain transaction, transaction verification can be directly completed by the original chain data stored in its system.

3. Total assets remain unchanged

In order to ensure that the total assets remain unchanged, it is necessary to ensure that the asset transfer process is accurately calculated in two chains. In other words, it is necessary to ensure: 1) the atomicity of cross chain transactions, whether or not they occur. 2) Cross chain transaction is real and effective in both chains, and the transaction is confirmed by the whole network, and the possibility of fork is very small. Therefore, under normal circumstances, as long as difficulty 1 and 2 are solved, difficulty 3 is solved.

4. Independent safety

There are basic security and independence considerations in different cross chain implementation schemes. Generally, each scheme has its own characteristics.

5. Cross chain interconnection

This problem contains two potential problems: first, how to realize interconnection and interoperability of existing blockchain systems. Second, how to prepare and pave the way for the interconnection of blockchains to be developed in the future.

Blockchain framework of one key chain substrate

Substrate is the next generation blockchain technology framework. Gavin wood once said, “in the future, trusting an institution with our interests will be as archaic a concept as accepting on an abacus is today.” If we want to break the barriers, get rid of the old, and establish cross chain communication, a strong technical framework design is essential.

The main technical features of substrate are as follows:

● create a perfect customized blockchain for the enterprise

  • ○ create a blockchain with a strict level of privacy
  • Light client priority design for mobile applications and the Internet of things
  • The network is almost unbranched and can be upgraded

Among them, light client allows to access the blockchain in a decentralized way and interact with the network without synchronizing the complete blockchain. Its purpose is to simplify transaction verification, that is, it does not need to download every transaction and every block, but only need to download data such as block header, such as hash value, time stamp, proof random number, root hash value of the previous block header, etc.

● based on next generation technology

  • ○ on industry standard web assembly architecture
  • Highly scalable libp2p network
  • ○ integrated fast and reliable features based on Rust
  • Support JavaScript secondary development
  • ○ wasm webassembly interpreter written by rust

Web assembly (abbreviated as wasm) is a project jointly developed by Mozilla, Google, Microsoft and apple. It can use non JavaScript programming language to write code and run on the browser. It can be seen as an enhancement of JavaScript (not a substitute for it at present) to make up for the shortcomings of JavaScript in execution efficiency. It performs low-level binary syntax through the web, and compiles high-level languages (C, C + +, and rust) into webassembly, so as to have the opportunity to run in the browser. It is characterized by geometric level performance improvement, fast and flexible, and portability. In 2015, the four major browser manufacturers (chrome, Firefox, edge, Safari) all support web assembly by default, and this technology later flourished in the field of front-end high-performance development.

● security and scalability breakthroughs

  • ○ webassembly intelligent assembly
  • ○ multi level authority
  • ○ dual encryption of transaction and status
  • ○ restrict asynchronous call options
  • ○ account level locking
  • ○ governance tools and methods (e.g. voting system)

● overview of technical components

Network libp2p

Consensus algorithm hybrid pbft / aurand

Random beacon collective coin flipping

Verification algorithm Edwards curve ed25519

Hash algorithm blake2b

Address format versioned base-58 + blake2b verification

Among them, substrate has a very powerful algorithm blake2b hash algorithm. What are its advantages? In the past, most cryptocurrencies such as bitcoin used SHA-1 hash function as the running algorithm, but this algorithm was found to have security problems by cryptology experts, so later, blake2b algorithm was gradually used to replace SHA-1 algorithm in cryptocurrencies.

Analysis of Polkadot Technology Architecture: combination with IPFs or revolutionary blockchain system

Speed comparison of blake2 hash algorithm

Blake2b is considered to be the hash function with the highest safety factor at present. The algorithm was released in 2012, and then the blake2 hash algorithm was used by package managers of OpenSSL, WhatsApp and FreeBSD.

Polkadot: the king of cross chain

The open source substrate itself is a framework and platform that everyone can use. In order to better support the connectivity between blockchain networks, it is necessary to build a new blockchain network. Polkadot is a cross chain solution to solve the above problems. It uses the typical cross link technology mentioned above, namely relay technology. Polkadot was developed by Gavin wood’s team based on the substrate framework.

In Polkadot’s architecture, the construction technology is mainly divided into parallel chain, relay chain and transfer bridge.

Parallel chain: application based customization chain

Parallel chains are block chains parallel to the poca network. Each parallel chain can independently design its own architecture according to different business requirements. Flat necklaces can also be used for concurrent transactions to improve scalability, which ensures their security by connecting trunk chains.

Trunking: connecting and verifying parallel chains

The relay chain can connect the wave card network and the parallel chain, and ensure the communication security before the two. The communication can be transaction or any form of data.

Bridge: connecting heterogeneous external chains

Bridges is a special kind of parallel chain, which allows the wave card network to communicate with the external independent blockchain, such as BTC, ETH, using the security mechanism of the external chain itself instead of the security verification of the relay chain.

Analysis of Polkadot Technology Architecture: combination with IPFs or revolutionary blockchain system

Parallel chain can be regarded as a high expansion solution in Polkadot network. Parallel chain does not have the ability to confirm blocks and needs to be verified by relay chain. As a trust agent, the relay chain participates in the communication between the Polkadot network and the parallel chain to ensure the communication security and realize the risk isolation. The transfer bridge serves other external blockchain networks with independent security verification mechanisms. These chains have their own consensus and block out mechanisms, such as BTC or eth networks, which directly communicate with Polkadot networks through the transfer bridge.

In addition, Polkadot defines several roles necessary for protocol operation:

1. Validator

Verify and finalize the parallel chain candidate block, add it to the block of the relay chain, and accept token rewards;

2. Collectors:

Collect parallel chain transactions, put them into the candidate blocks of validity certification, and collect transaction fees;

3. Fishermen:

It is to act as an inspector, fish for all kinds of improper behaviors in the network, and collect part of the deposit of all kinds of malicious operators as rewards;

4. Nominator:

Have the right to vote, nominate who will become the verifier, and ensure the safety of the verifier.

Analysis of Polkadot Technology Architecture: combination with IPFs or revolutionary blockchain system

Polkadot is a network protocol that can transfer any data (not limited to tokens) to all blockchains. This means that it is a real Multi Chain application environment, making cross chain registration and cross chain computing and other similar operations possible. Polkadot can deliver data to public, open, public blockchains and private or federated chains. This makes it possible to build applications that obtain license data from the private chain and use it on the public chain.

In Polkadot, parallel chain is the key component technology, which refers to the use of chain relay to achieve the interaction between blockchains. Polkadot has shared security to avoid other cross chain double flower transactions. Parallel chain also has generality, it has no unnecessary restrictions and constraints. Here, due to the role of parallel chains, the blockchain is like an Internet.

The emergence of parallel chain parachain is regarded as the direction of the next generation blockchain technology evolution.

Polkadot + IPFs = unlimited possibilities

Markov, a famous Russian mathematician, has a famous saying: “any progressive system is also open.” There are no isolated technologies or engineers in the world. Otherwise, the possibility of its development will be lost.

Polkadot has become the king of cross chain in many solutions, largely due to its openness. Its basic substrate framework is open-source, and is also applied to the next generation Internet Protocol IPFs at the bottom. The interstellar file system is a point-to-point, distributed hypermedia transmission protocol for the decentralized network. Polkadot network (and substrate framework) uses libp2p protocol, which is the core of IPFs.
Analysis of Polkadot Technology Architecture: combination with IPFs or revolutionary blockchain system

Libp2p is a modular P2P protocol stack, which is positioned as the standard of future decentralized applications. It is a flexible cross platform network framework for point-to-point applications. It can handle discovery and communication of peers in the Polkadot ecosystem. Now libp2p technology is used in many networks. For example, EOS, Ethereum 2.0 (in progress), substitute (Polkadot), agoric, filecoin (IPFs incentive layer).

For the development of science and technology, we can never talk about technology in isolation from specific application scenarios. In the application retrieval layer of IPFs, IPSE network can integrate the parallel chain technology of Polkadot. The main chain of IPSE is responsible for value settlement based on dpos, while the parallel chain is mainly responsible for value transaction. All transactions between parallel chains can be executed immediately without worrying about conflicts.

For example, now there are 10 parallel chains, which can obtain the same security and perform 10 times of work tasks. IPSE is a search engine based on IPFs, and filecoin is the storage layer as well as the official incentive layer. IPSE is primarily responsible for search, while filecoin is responsible for storage. The underlying storage of both depends on the IPFs interstellar file system. The introduction of parallel chain enables IPSE to obtain the most efficient solution in data storage and transaction operation with filecoin.

Analysis of Polkadot Technology Architecture: combination with IPFs or revolutionary blockchain system

Polkadot’s vision is to provide the most powerful platform for interoperability, security, scalability and innovation. According to the official road map, the network will increase to about 100 parallel chains. As a point-to-point distributed hypermedia transmission protocol, the filecoin decentralized distributed storage network constructed by IPFs is expected to be composed of global distributed nodes, and its main network will also be online in Q3 / Q4. They represent the peak of cross chain technology and point-to-point distributed technology, and may be changing the existing blockchain technology and application.

reference material:
[1]Github: Substrate

[2]Polkadot:A scalable, interoperable & secure network protocol for the next web

[3]Medium:Cross-chain Technology and Polkadot,by LongHash-Dot

[4]Polkadot Lightpaper:A scalable, interoperable & secure network protocol for the next web

[5]IPSE:A Distributed Search Engine Based on IPFS

[6]Filecoin:A Decentralized Storage Network

[7] Polkaworld: what are relay chains, parallel chains and bridges in Polkadot?