Cross-chain interoperation needs that one block chain (active chain) can read and write to another block chain (passive chain).
Read Operation and MAP-ULVP
The read operation means that the active chain can obtain any state or any transaction from the passive chain. MAP protocol implements cross-chain reading operation through ULVP sub-module. Based on the latest Flyclient technology, ULVP sub-module does not need to be based on a trusted third-party, and does not need a large amount of local storage.
MAP-ULVP sub-module is characterized by simplicity, security and versatility.
Write Operation and Map-feeder
In this article, we mainly introduce the write operation, which is implemented by the MAP-feeder sub-module of MAP protocol. The write operation means that the active chain can write the state into the passive chain. The specific implementation is as follows.
The writing operation can be achieved in two ways: the first way is active writing, in which the active chain needs to send a transaction that meets the standards of the passive chain and broadcast to the passive chain network. Once the transaction is confirmed by the consensus of the passive chain, the write operation is completed.
A legal transaction is made up of a transaction and a signature. Therefore, our MAP-feeder sub-module on the active chain needs to have the function of assembling a transaction that conforms to the passive chain specification and broadcasting this transaction.
We provide a standardized contract paradigm. There are currently two standardized contracts, the first is the assembly transaction contract, which is used to splice the transaction and the signature. The second is the broadcast contract, which broadcasts the transaction to a specific network.
At present, we only support direct stitching of transaction content and pre-authorized signatures in the active chain. In the future, we will design a more general scheme to ensure that users can directly call the signature algorithm of the passive chain for signature authorization.
In addition, broadcast cross-chain transactions need to ensure that the nodes of the active chain can be connected to the P2P network of the passive chain. We provide P2P sub-module to ensure that, which will be described in detail in our MAP white paper.
The second way to achieve writing operation is passive writing, which requires that the intelligent contract of the passive chain can obtain active chain information, and can modify the state according to the information directly.
Of course, this requires a transaction on the passive chain to trigger the execution of the contract.
In the process of passive writing, our MAP-feeder sub-module on the passive chain provides a Reference contract, which obtains the information on the active chain through the interface provided by MAP-ULVP.
In this way, any intelligent contract on the passive chain can obtain the information on the active chain by calling the Reference contract, and carry out its own subsequent operations accordingly. Thus, the write operation is achieved.
We introduced write operations in cross-chain interoperation, and two ways to implement write operations: active writing and passive writing.
We focused on our Map-feeder submodule and how to implement write operations through Map-feeder submodule.
With the comprehensive use of MAP-feeder sub-module and MAP-ULVP sub-module, two block chains can verify the state and transaction of each other, and they also have the ability to change the state of each other. Thus, we complete cross-chain interoperation.
· MAP Protocol Medium (For the latest articles)
· MAP Protocol GitHub (For the complete codes)
For more information, visit maplabs.io