Interoperability, the cross-chain approach of blockchain

Blockchain has received widespread attention and love due to its decentralized framework and powerful performance, and accordingly a large number of different blockchain projects have been produced. Each of these projects basically has its own independent chain. How to achieve data docking and interconnection in different chains has become an important link in the blockchain that needs to be considered.

The cross-chain process of blockchain is actually not complicated. The core is that the target chain can respond to and verify transactions or data initiated in the source chain. There are currently three mainstream cross-chain methods, namely notary, relay mode, and hash time lock. Below we learn more about the advantages and disadvantages of these three cross-chain methods.

notary public

This method is to use a trusted third-party notary to verify the data that needs to be cross-chain. To put it simply, the notary collects and verifies the validity and authenticity of the data when the data is cross-chain. After completion, the notary uses digital signatures to initiate transactions in the target chain, thereby realizing cross-chain.

There are two different ways for notaries to sign when signing: single signature and multi-signature, but they both need to rely on the credibility of the notary. This cross-chain method is relatively efficient, but it does not rule out the risk of the notary doing evil. Especially in the single signature model, the degree of centralization is higher and the corresponding risks are also higher.

relay mode

The relay mode establishes an additional relay chain between the source chain and the target chain to complete the verification and execution of cross-chain transactions. The nodes in the relay chain are deployed in various blockchain networks and initiate cross-chain transaction information synchronously at all times. After the user initiates a cross-chain transaction in the source chain, the relay node will forward this information to the relay chain and verify the transaction data. After the verification is completed, the corresponding transaction will be constructed through the consensus node in the relay chain , and complete the signature, and finally move it to the target chain through the relay node.

The relay mode is a very excellent cross-chain method. It forms a huge network through the relay chain and a large number of blockchains, making the cross-chain blockchain more efficient. The relay chain itself is also a blockchain. It has various advantages of blockchain and provides guarantee for data security. But similarly, the construction of the relay chain is also very complex and highly challenging.

Hash time lock

This is a way to use smart contracts to achieve cross-chain transactions. Smart contracts are codes that exist in the blockchain and can deploy protocols by themselves, and can be automatically executed according to pre-deployed protocols.

The specific process of the cross-chain solution of hash time lock is: the cross-chain transaction initiator selects a random number, uses hash transcoding to obtain the hash value of the random number, and then transfers the hash value to the target chain; in addition, initiates The author and the target chain also use smart contracts to lock cross-chain transaction data in both chains. The lock uses the transcoded hash value, and the unlocking key is a random number selected by the initiator. ; After completing the cross-chain preparation, the initiator only needs to publish the random number to unlock the data assets in the target chain, and the target chain will unlock the data assets in the source chain based on the random number published by the initiator. Through this process, both parties can achieve cross-chain transaction data.

It is worth noting that the hash time lock scheme requires that the hash functions used by the source chain and the target chain are of the same type. If the hash encryption methods are different, cross-chain will fail. Currently, most blockchains use mainstream hash encryption methods such as SHA256 and Keccak-256. Before adopting this cross-chain method, you also need to pay attention to the encryption methods of the two chains.

Guess you like

Origin blog.csdn.net/xfilesystem/article/details/125455687