The essence of blockchain across the chain
It is unrealistic to move the entire real world to a block chain. The real society itself is also a value-creating project for economic princess shoes sub-industries, and exchanges of value in different industries and in different economic fields are realized through the market. Each independent blockchain maintains its own independent value economy. Cross-link blockchain is the hub connecting independent blockchain, which carries the function of exchange of value of blockchain with different value systems. The commodity needs to be interactive The price and the price come from the value of the commodity itself and depend on the supply and demand. The relationship between supply and demand is set up by the market. Therefore, in order to realize the exchange of value of the “commodities” in different blockchains, various kinds In the value trading market, every value trading market in a cross-linked block chain is a cross-linked contract service. The value will not be created in the air will not disappear out of thin air, cross-chain design must also follow the economic laws of mankind since ancient times. The essence of cross-linking is the shameful exchange of values, and any design that goes against this basic principle will eventually fail.
Block Chain Cross-Link Architecture
The architecture model of the independent blockchain in the following figure has been described above. If all independent blockchain needs to support the cross-link value transfer or exchange, it needs the existence of the outer-chain contract service. The outer-link contract service and the ordinary contractual service do not have The essential difference is also a contract service protocol, the difference is that the contract makers will provide a public statement of the cross-chain transaction public key address, the need for cross-chain transactions can be owned by the body of a certain number of value bodies Transfer to the designated public key address of the cross-linked contract service, and specify the cross-link transaction content, if you want to exchange a certain number of value bodies on another blockchain, and transfer the value body after exchange to yourself in another block On the public key address on the chain.
It is assumed here that there are two independent blockchains A and B, there are both the principal X and the principal Y, and they both have private key addresses on both chains, and subject X is the value producer on blockchain A, Body Y is the value producer on blockchain B, such as a factory producing industrial goods, and subject Y wants to buy products or services on blockchain A, such as grain.
There are mainly two types of chains in the chain block chain, one is the main chain, there is only one cross-chain main chain, one is the adapter sub-chain, there are at least two adapter sub-chains, which are connected by the cross-chain main chain Each adapter chain, there is no trust between the various sub-chain, but through the main chain of trust transfer. Adapter chain and the main chain in accordance with the set protocol to interact, in order to achieve the purpose of trust transfer and transaction delivery. Cross-link blockchain itself also needs to have the same blockchain platform services as independent blockchain, such as contractual compliance, security control, chain consensus, chain service management, chain out of chain management, development and operation and maintenance The figure has been omitted. For the consensus on the chain, the main chain and sub-chain need to adopt more efficient algorithms than PoW to achieve cross-chain transaction interaction. For example, BFT consensus algorithm is adopted. At present, both cross-chain platforms (Cosmos and Polkadot) are designed with the consensus of PoS + BFT algorithm.
Cross-linked blockchain itself is also a blockchain, so the independent blockchain has the business contract ability, but based on cross -chain blockchain business contract will support more complex business, to achieve with different value areas Block chain connection, the value of exchange. Each cross-linked business contract will form a trading market. Different value chains of different blockchain will get their own pricing and trading in this market. It is very likely to form each based on the main chain tokens or the sovereign encrypted currency A unified quote and marketplace for blockchain values. More advanced through the cross-link contract process, you can achieve a combination of all blockchain virtual social relations of production, assuming that each independent blockchain is an independent economic area, cross-linked contract process can be concatenated independent economic areas become A complete industrial chain. Cross-linked blockchain itself is also interconnected, through the cross-link blockchain, on the series of industry, agriculture, services and other industries, which constitute the entire social relations of production. Production and production are all linked to the blockchain virtual community. Based on the contractual services provided by the blockchain and the machine-driven business process provided by the blockchain, combining IoT and artificial intelligence, value production, transfer and circulation will be faster and easier. The relations of production will be further optimized and coordinated, and the productive forces will be further liberated. The blockchain and the cross-chain link together the whole of humankind equally, removing any information asymmetry and various barriers in the real world, showing fairness and justice, the individual subject is the participant in the virtual social relations and also the defender Beneficiaries.
Cross-chain value equivalent exchange process
Combined with the cross-chain architecture in the previous section, we explain the cross-chain value exchange process. Here, we only take the barter market as an example. The main body X is the value producer on the block chain A. The main body Y is the value producer on the block chain B. If the main body X wants to obtain the value body on the block chain B, You need to take the value of block A on the chain of value through cross-value exchange contract services with the main Y to achieve the equivalent exchange of objects.
First, the principal X needs to join the A-chain contract service and accept the contract rules and legal provisions stipulated in the contract service. The B-party X also needs to join a C-contract service. For example, a cross-A Chain Contract Services, Receiving Contract Rules and Legal Terms for Cross-Strait Trading Market. Then subject X will transfer the value of a certain number of A chains owned by itself to the public key address designated by the contract service of the outside chain according to the contract rules of the contract service on the A chain and specify the content of the cross-link transaction, for example, We want to exchange a set number of values on another blockchain B and transfer the exchanged value to our own public key address on another blockchain. Follow-up process is as follows:
Input ① LCV-based chain of transaction perception
Client Side Validation (LCV) of the adapter chain will continually synchronize with the block header of block chain A, which is sensitive to the public key address exposed by the link chain service on block chain A. Once a transaction with a public key address is found , Think there is a request for cross-chain transactions.
Input ② generate and package cross-chain transactions
The chain adaptation code generates a sub-item of the content of the cross-linked transaction specified by the body X on the block chain A (a certain number of value bodies on the chain A is exchanged with a certain number of value bodies on the chain B to the specified public key address) Chain trading, and packaging sub-chain block.
Input ③ the existence of sub-chain cross-chain transaction certificate, launched the main chain cross-chain service calls
The chain adaptation code is based on the Merkle tree to prove the existence of a cross-chain transaction request on the sub-chain and encapsulate the cross-chain service call to the main chain according to the cross-chain protocol.
Input ④ chain execution chain of transaction code
The cross-link service bus of the main chain verifies the existence proof of the transaction on the sub-chain, analyzes the content of the cross-chain transaction request of the main body X, and routes the cross-link service call to a specific cross-value exchange contract. The same cross-chain transaction request of process body Y (with an unspecified number of value bodies on chain B to the designated public key address) is also sent to the same cross-chain whistleblower exchange contract.
Input ⑤ transaction log, update the status of the books
Cross-chain value exchange contract code implementation, will be all A <-> B transaction matching, the formation of a value of the A chain with B chain value of the depth of the trading market, once the subject X and subject Y can match the transaction request, A matching transaction is formed to encapsulate the result of the exchange of values between A and B chains between entities X and Y. Cross-chain value exchange contract is essentially an exchange floor.
Output ① sub-chain routing, the existence of cross-chain transaction to prove the existence of the main chain, to the adapter chain initiated a chain of contracts service calls
Cross-chain value exchange contract implementation code, will provide a transaction subject X and Y cross-linked matching transactions in the main chain of the existence of proof, respectively, to the chain A and chain B adapter sub-chain transfer orders to send a transaction, an indication to A A specified number of value bodies are transferred from the public key address specified by the chain Y body, and a certain number of value bodies are transferred from a public key address designated by the X body to the B chain.
Output ② generate and package cross-chain transactions
The two adapter chains respectively log their transaction instructions and red packets into their respective subchain blocks.
Output ③ initiated foreign chain service contract calls
The chain adaptation code initiates the transfer order transaction to the chain contract service on their respective independent blockchain. The adapter chain of the A chain sends a transfer transaction to the chain contract service of the A chain, and the adapter chain of the A chain sends a transfer transaction to the chain contract service of the A chain. The adapter chain of the A chain sends a transfer transaction to the chain contract service of the A chain, instructing the transfer of a certain number of value bodies from the public address of the contract to the public key address designated by the Y entity. The adapter chain of the B chain also sends a transfer transaction to the chain contract service of the B chain, instructing the transfer of a certain number of value bodies from the public address of the contract to the public key address designated by the X principal.
Output ④ implementation of the chain of contract code
The chain A contract service will execute the contract code to generate the transaction and transfer a certain number of value bodies required by the transfer instruction to the specified public key address of the Y entity under contract control. The chain contract service of chain B executes the contract code to generate the transaction and transfers a certain number of value bodies required by the contract-controlled transfer instructions to the X-entity’s designated public key address.
Output ⑤ generate transaction log, update the status of the books
Once the transaction is packed into the block, according to the confirmation characteristics of the transaction of the chain, finally the subject X obtains the value control of the B chain, and the subject Y obtains the value body control of the A chain.
Cross-linked blockchain also provides user UI interface and API interface. All transactions performed on the cross-linked blockchain contract service by the user can obtain the current execution status via cross-link user interface and API interface, that is, Pending order status and the trading market trading depth, and even allows users based on private key market supply and demand in accordance with the re-pending. Cross-linked blockchain can provide a mortgage mechanism based on the outbound link contract service on the independent blockchain, in the corresponding adaptation subchain, in exchange for the same number of value-body illusion or chips of the mortgage blockchain, the main business The value-body illusion on the sub-chain of the mortgage participates in the business contract process of the main chain. The cross-chain production relationship is based on the value bodies (which may also be the real-world value anchors) on the respective blockchain of each subject mortgage, Production materials, carry out contract production, and finally distribute the value of production products. Cross-linked blockchain If you have your own endogenous token, you can also convert the value of endogenous tokens based on the marketplace (contract), with the principal holding cross-linked tokens to join the cross-linked contract process or cross-linked contract services The virtual production relations of production and value exchange.