As we mentioned in the last article, 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. MAP provide P2P sub-module to ensure that, this article will describe MAP-P2P sub-module in detail.
Before we introduce MAP-P2P, let’s briefly introduce Libp2p. If you are constantly following the development of Polkadot, Ethereum 2.0 or Substrate, you should have heard of libp2p.
Libp2p is not only the infrastructure of IPFS and Filecoin, but also the infrastructure of all P2P, blockchain and IoT in the future. Libp2p is a P2P network, which is divided into network layer, routing layer and switching layer.
One node using Libp2p can communicate with another node, and can use a variety of different transmission modes. The Libp2p module is mainly responsible for the data transmission function in IPFS, that is, routing, network, switching and so on. Libp2p brings together a variety of transport protocols and P2P protocols, making it easy for developers to build large, powerful P2P networks.
MAP-P2P sub-module is encapsulated on top of the Libp2p protocol, so that different blockchain systems can run together on a large P2P network.
In our MAP ecology, the nodes on each blockchain are in a small P2P network, and some of them can access to other chain’s P2P network at the same time.
In this way, once there is a cross-chain reading or writing operation, you can connect the full nodes through these nodes in both two networks.
All blockchains in the MAP ecosystem support the Libp2p protocol, so they can interconnect and transfer data to each other. As we have already mentioned, ethernet 2.0, Polkadot and other projects also support the Libp2p protocol, so it is theoretically possible to connect and transmit data with these networks in the future.
· MAP Protocol Medium (For the latest articles)
· MAP Protocol GitHub (For the complete codes)
For more information, visit maplabs.io