Recently, Ethereum founder Vitalik Buterin said in an interview with Fintech media:

Common applications between different blockchains are bound to emerge. Because blockchain is an open system where everything is cryptographically authenticated, it’s actually quite easy to develop applications that allow events on one blockchain to correlate with changes on another. There are many ways to achieve this effect, such as hash locking and relaying. There have been many experiments in cross-chain cryptocurrency transactions over the past few years. I think this technology can be applied to other areas as well. At present, the biggest challenge is still the few practical applications of blockchain and the people who use it. It is not the time to start implementing cross-chain applications except in a few areas. But I think within a year or two, we’re going to see a massive increase in the use of this.

1

What is cross-chain technology?

Cross-chain technology can be understood as a bridge connecting various blockchains, and its main application is to realize atomic transactions, asset conversion, internal information exchange between blockchains, or solve problems of Oracle, etc.

Today’s blockchain technology is a jumble of disparate technologies, unable to exchange value and data with each other. Although many blockchain advocates claim that blockchain is the next generation of the Internet, because each chain is an independent, vertical, closed system, the current “Internet” is made up of many blockchain “islands” cut off from each other, or the current blockchain looks more like an Intranet.

Bitcoin and Ethereum, for example, are trust mechanisms based on consensus across the web and brute force solutions. This authentication is performed by each node by synchronizing the entire network block. However, blockchains that use decentralized Ledger Technology (DLT), such as XRP and IOTA, are also isolated from each other. What is even more unacceptable is that the exchange of value between purportedly decentralized blockchains relies mainly on centralized exchanges, and the value of the assets on the chain cannot be properly assessed.

The application and development of blockchain technology are greatly restricted by the disconnection between blockchains and the large fluctuation of asset value. Therefore, more and more attention is paid to the inter-chain operation, and the demand for cross-chain comes from this. However, cross-chain is a complex process, which requires both independent verification capability for nodes in the chain and decentralized input, and more importantly, acquisition and verification of information in the world outside the chain. At present, there are three main implementation modes of cross **** chain technology:

1) Notary Schemes;

2) Sidechains/Relays;

3) Hash-locking.

2

Application of cross-chain technology

2.1 Notary model

The easiest way to interoperate between chains is to use the notary pattern. ** In notary mode, one or a group of trusted parties is used to declare to chain X that an event has occurred on chain Y, or to determine that the claim is correct. These communities can either listen for and respond to events automatically or when requested.

The notary model has received a lot of attention in the licensing sub-ledger arena because it can provide a major competitor with flexible consensus without costly proof of work or complex proof of interest mechanisms. The notary model is represented by Corda.

Corda

**Corda is a financial alliance “blockchain-like” technology architecture launched by R3 Consortium. **Corda is also a ledger of transactions, but there are no blocks, which is quite different from the traditional blockchain structure. ** transactions are transmitted only between participants and notary parties. ** notary is chosen by both sides of the transaction and has the characteristics of high credibility. The notary is responsible for verifying the validity and uniqueness of the data.

Because Corda chooses the notary mode with the highest security, it is relatively simple to handle cross-account messages: you only need to select the cross-notary of different books or forcibly point to the same notary and let it synchronize the books to verify the cross-account messages safely.

2.2 Trunk/Side chain mode

** If A chain B can have all the functions of another chain A, chain B is called the side chain of chain A, and chain A is the main chain of chain B. ** Where main chain A does not know the existence of side chain B, and side chain B knows the existence of main chain A.

Assuming that A blockchain has A block Header and A Body, and that the Header contains Merkle and other proof information, the block of chain A can be written into the block of chain B. Chain B uses the same consensus verification methods as chain A, such as PoW verification difficulty and length, PBFT verification vote, etc. After waiting for the block header sequence of chain A, chain B can prove the data and operations of chain A through the proof information of the Merkle branch.

Chains A and B cannot directly verify the state of each other’s blocks, as this would form A loop, but it is feasible to include only light nodes in each other. This logic of blockchain verification can be implemented by the chain protocol itself or by application contracts. This process is shown in Figure 1 below.

Figure 1 Asset transfer flow in trunk/side chain mode

Figure 2 Sending and receiving interfaces for events in relay/side chain mode

The code in Figure 2 needs to exist on both chains using the relay/side chain mode, but the coins or objects on both chains need to be issued in unlimited quantities, so that the verification process can be guaranteed without errors, so as to achieve the asset transfer operation. The representative projects of Relay/side chain mode are BTC-relay, RootStock, Polkadot, Cosmos, etc. Each project will be described in turn below.

BTC-Relay

Btc-relay is a smart contract based on the Ethereum blockchain that connects the Ethereum network to the Bitcoin network in a secure and decentralized manner. Btc-relay allows users to verify bitcoin transactions on the Ethereum blockchain by using Ethereum’s smart contract capabilities.

Btc-relay uses block headers to create a small version of the Bitcoin blockchain, and Ethereum DApp developers can make API calls from smart contracts to BTC-Relay to verify bitcoin network activity. Btc-relay has made a meaningful attempt to communicate across blockchains, opening the channels for different blockchains to communicate. The BTCRelay certification process is shown in Figure 3 below.

Figure 3 BTC Relay transaction authentication process

Among them, members of the BTC Relay community are called Relayers. Anyone can join the Ethereum network and become a Relayer, and it doesn’t cost hardware or electricity

RootStock

**RootStock is a distributed platform for smart contracts built on the Bitcoin blockchain. RootStock adopts “hybrid” security mode, including PoW mechanism and private network mode at the same time, and security joint proof of work mining mechanism based on joint threshold signature scheme. ** Its goal is to implement complex smart contracts as a side chain that adds value and functionality to the core Bitcoin network.

RootStock implements the Root Chain Virtual Machine (RVM), an improved version of the Ethereum VIRTUAL machine that will act as a side chain for Bitcoin, using a token that can be converted into Bitcoin (root coin, RTC) as the “fuel” for smart contracts. RootStock is a two-way anchor to Bitcoin. The trade authentication process for RootStock is shown in Figure 4 below.


Figure 4 RootSock transaction authentication process

Polkadot

Polkadot is a cross-chain protocol open source project of the Web3 Foundation. ** Gavin Wood of the Parity team led development. **Polkadot claims to be one of the infrastructures of the future Web3.0 era and is the foundation protocol for a future “blockchain Internet”. ** The Polkadot protocol addresses the scalability and isolation issues of current blockchain technology, with the goal of providing untrusted, decentralized, universal access and interoperability between many heterogeneous blockchain systems.

The core idea of Polkadot is to distinguish between the way transactions are initiated and executed by counterparties and the way transactions are uniformly recorded by counterparties. Polkadot provides the basic relay-chain on which many verifiable, globally dynamically synchronized data architectures are built, either parallel or side chains. Blockchain applications can fork Ethereum, tailor it to their own needs, connect to the Ethereum public chain via Polkadot, or set up different functions for different chains for greater scalability and efficiency. The following figure shows the schematic diagram of Polkadot.

Figure 5 Schematic diagram of Polkadot

The process shown in Figure 5 is roughly as follows: The collector collects and broadcasts the user’s transactions, and also broadcasts candidate blocks to the phishers and verifier. A user submits a transaction, which is transferred outside the parallel chain, then through the relay chain to another parallel chain, and becomes a transaction that can be executed by an account on the parallel chain.

Cosmos

Cosmos is a cross-chain open source project of the Interchain Foundation. Cosmos is dedicated to **** note addressing the transfer of assets across blockchain networks.

The network consists of two main parts: Cosmos Hub and several zones.

Each Zone can be viewed as a separate blockchain space. Each Zone keeps state synchronization with the Hub. The Hub ensures security through a decentralized verifier group, which has a fine custody mechanism. It is the only multi-asset central ledger and is responsible for ensuring that the total amount of assets remains unchanged when all kinds of assets are transferred in different zones.

A Hub is both a relay chain. The cross-chain communication between zones is implemented through the IBC protocol between hubs. When Zone1 sends a cross-chain message to Zone2, Zone1 creates a message packet and publishes its proof on the Hub. Then the Hub will generate the proof of Zone1’s cross-chain message packet on the Hub and publishes it on Zone2. Next, Zone2 receives the message packet and publishes the proof on the Hub. Hub will issue the proof of receipt certificate of Zone2 to Zone2 to complete the whole cross-chain message transmission.

The inter-blockchain communication of Cosmos above is shown in Figure 6 below.

Figure 6. Cosmos inter-blockchain communication

2.3 Hash locking mode

The hash locking mode is designed to know as little about each other as possible between chain A and chain B, and is used as A means to eliminate the trust of notary public. The basic process of this mode is shown in Figure 7 below.

Figure 7 Flow chart of hashing locking mode

The basic process shown in Figure 7 is as follows:

  • 1) A generates A random number S and sends hash(S) to B.

  • 2) A locks the currency on chain LA and sets A condition: if Chain LA receives S within (current time +2X=TA), the money will be transferred to B; otherwise, it will be returned to A.

  • 3) After B receives hash(S) and sees the locking and time setting of A, it locks the currency on chain LB and sets conditions: if chain LB receives S within TA-x time, it transfers the money to A; otherwise, it returns to B.

  • 4) After A sees the lock of B, it sends S to chain LB within ta-x time to obtain the currency of chain LB.

  • 5) After B receives S, it sends S to chain LA within TA time to obtain the currency of chain LA

The representative projects of hash locking mode include Interledger, lightning network, etc.

Interledger

Interledger is an open protocol for cross-ledger value transfer initiated by Ripple.Interledger is not a blockchain. It is a payment standard and unified protocol that connects all kinds of ledgers. InterledgerFocus on the area of cross-book fund flows.

**Interledger itself is not a ledger, and it does not seek any consensus. **** instead provides a top-level cryptographic hosting system that allows money to move between ledgers with the help of intermediaries called “connectors” **. In addition, Interledger has no native tokens, so individual ledgers operating on the protocol can still use their own native tokens, an interoperability that solves the problem of specific payment networks. The relationship between Interledger’s encrypted third party and the sender and receiver of the transaction is shown in Figure 8 below.

Figure 8. The relationship between the encrypted third party of Interledger and the sender and receiver of the transaction

Lightning network

Chain lightning network aims to implement and securely under the deal, its essence is to use a hash time lock intelligence to safely 0 to confirm a mechanism, by setting the clever “smart” contract, allowing users in lightning unconfirmed online transactions, and gold is just as safe (or is just as safe as the currency).

The first step in using the Lightning network is to enable A two-way payment channel between user A and user B. This channel is outside the main chain, as shown in Figure 9 below.

Figure 9 Lightning network structure diagram

Before enabling the lightning transaction function, both parties will first write the data required by the opening state into the main blockchain to establish the lightning transaction contract, such as the locking period, contract rules and other data.

When the Lightning network fails, it will be processed on the main blockchain in accordance with the rules of the contract and the evidence party’s data. The establishment of each state channel is similar to the construction of a multi-signature system, which guarantees the principle of good faith of both parties in the transaction. It is more than multi-signature in contract processing. Failure to keep faith will result in penalties on the main network. Penalties can be appealed within a period of time, such as 1000 block periods, and this appeal is algorithmically maintained, not based on human factors.

In the channel is the blockchain data stream signed by the private keys of both parties. All transaction details of both parties are reflected in this data stream and stored in the form of an independent chain. It is to prove whether a channel complies with algorithm rules. When a status channel ends, both parties cash the contract according to the final status data output by the lightning network, which is equivalent to a transaction book, which records the transaction results of participants, and then reallocate the property.

3

The birth of the Pallet

The cross-chain projects mentioned above are still a chain in essence, which is difficult to be extended and not universal. Both of them are using a new chain to do cross-chain work, requiring anchoring between chains. Polkadot, for example, borrowed architecture from many other projects, so his design was quite different from other projects. However, Polkadot is a heterogeneous multi-chain framework, a system of multiple parallel chains connected by a single relay chain. Although multiple chains can be attached, Polkadot itself is still a chain.

Pallet is making agreement – a consensus agreement of multiple related parties, all the chains can be participants, there is no need for “chain to chain” anchoring. Pallet agreement and system do not produce separate chains, instead, the jury system is adopted to randomly select jurors, and then all jury nodes are connected to the bottom chains for storage, so as to maximize the use of existing chains and resources.

Pallets can hang applications on multiple chains, avoid network congestion, and users have large choices, so that various DApp applications can be deployed on different chains, forming healthy competition. More users can participate, developers can choose existing chains more flexibly when developing applications according to business needs. Or easily migrate from an existing deployed chain to a better, newer chain, allowing the existing application ecosystem to break through its own architectural, performance, or functional limitations of the original deployment blockchain.

4

Pallet trans-chain system

Pallets can butt horizontally with different underlying blockchains, as shown in Figure 10 below. Pallet does not replicate the bottom chain completely, but uses the participant mechanism, which is a lightweight agreement.

Picture 10 Pallet trans-chain system

Pallets are built on blockchain or DLT (Distributed Ledger Technology) with extensible “meta layers”, and pallets are ready for “interoperability”. Pallet layer is the IP agreement on the mutual chain layer.

Pallet Chooses a jury according to the smart contract for different applications. The jury is to verify the implementation of the smart contract. Pallets take pallets tokens as incentives to pay the jury. The jury’s role in Pallets is similar to that of miners on other pallets. Pallet also adds a punishment mechanism. Ordinary pallets want to become registered jurors, so they need some of their own funds to pledge, and if they get old again, Old Pallets will confiscate their collateral funds.

5

Pallet and Cross-chain technology application scenario comparison

Pallet as a cross-chain agreement, it connects the chains. Pallet is different from other trans-chain technologies in application scenarios, the specific differences are shown in the following table.

Because Pallets are not chains, they communicate with the bottom chain through specific functions and pallets, so pallets have a wide range of application scenarios, and their implementation is also in medium difficulty.

6

Pallet performance comparison with other cross-chain items

Because Pallets are not one chain, their smart contract implementation mechanism, mining mechanism, reward mechanism and application areas are very different from the cross-chain items in Chapter 2. The specific differences are shown in the following table.

The cross-chain projects in Chapter 2 are designed to address the exchange of information between specific blockchains or are designed for different application domains, so these cross-chain projects are not very versatile. But Pallet because it is agreement, so he can do wan Chain interconnection, multi-benefit related parties mutual benefit and win-win, so as to boost the realization of “mutual chain network of value”.

7

Summary and references

summary

The existing blockchain is tied up with applications, smart contracts, common ledgers and consensus networks. Each chain forms an independent vertical closed system. When an application is tied to a chain, it is difficult to adopt new technologies and migrate to a new chain with original data and assets.

Pallet is a distributed, inclusive transaction execution environment, not another cryptocurrency. Pallet and underlying blockchain, contract writing language and execution platform are decouple, allowing users to exchange assets on and off the chain at the same time.

As a result, it can execute smart contracts written in different languages on different blockchains on different platforms. New Pallets make use of the existing LLVM and WASM tools, it is easy for Pallets to provide secure and smart contract implementation. At the same time, the high performance of Pallets makes it possible to encrypt the privacy of the contract.

reference

[1] Chain Interoperability

[2] Thinking and Realization of Multi-chain and Cross-chain Alliance Chain (I)

[3] Blockchain Interpretation 22- Cross-chain Technology

[4] “Introduction to Cross-chain Technology connecting Different Blockchains”

[5] ** [Compilation 2] Cross-chain Technology of blockchain

[6] “Polkadot Cross-chain Technology”

[7] Ripple Launches Interledger, Aims to Connect Banking ledgers and blockchain

[8] White papers on all of the above

Source: Blockchain News

[Course Recommendation – Online Courses]

Course: Enterprise-class blockchain application landing: Super ledger development practice sharing

For those who really want to seize the edge of blockchain, both entrepreneurs and developers are thinking about the application of blockchain.

Ethereum’s smart contract technology provides the technical foundation for the implementation of blockchain, and super ledger can be seen as a typical implementation of blockchain enterprise services.

Super ledger is essentially an open source distributed ledger platform for enterprise application scenarios. So what problems can super ledger technology solve, compared with the current commercial ledger, what advantages does it have, and how to develop a super ledger?

In this block chain class, Mr. Hu Huajie of Ping An explained the super ledger development skills through his own practical experience, and shared his insights on the application of block chain technology in enterprise-level services.

Time: 20:00 — 21:30, April 6, 2018

One hour to share, half an hour to discuss and answer questions

This course is shared online and free of charge

How to register: Scan the QR code in the picture below, add a small assistant, verify and enter “002” to register and join the course group.