MAPO light client
The light client deployed on the Map Relay chain synchronizes information from other chains.
The light client deployed on other chains synchronizes information from the MAPO chain.
MAPO Chain's Light Client
The MAPO chain's light client is a light client contract deployed on other chains, used to synchronize information and verify proofs from the Map relay chain. The light client has the following functions
As a contract deployed on other chains to synchronize MAPO chain information, the light client completes information synchronization and verification through the following steps
After the MAPO light client is deployed, it initializes itself. It can initialize from any epoch on MAPO instead of from the genesis block. Initialization fetches the current epoch size, validator threshold, validator address set, and G1 public keys.
After initialization, the light client receives the last block header of the current epoch from an off-chain program called the maintainer. After verifying the block header, the light client gets validator info for the next epoch from the extraData field in the block header and stores it. The epoch is updated to the next epoch.
By querying the light client, the verifiable block range can be checked. Within the verifiable range, the block header ECDSA signature is verified, the block header BLS signature is verified through aggregate G2 public keys, and the MPT built from all receipts in the block is verified. If these all pass, the data is proven valid. For specific verification details, refer to MAPO EVM Chain Light Client,With the same core verification process, the MAPO chain light client not only supports deployment on some EVM-compatible chains, but now also supports light client synchronization and verification of the MAPO chain by these heterogeneous chains. See MAPO Near Chain Light Client
Other Chains' Light Clients
Other chains' light clients are light client contracts deployed on the Map Relay chain to synchronize information and verify proofs from the corresponding chain. The light clients need to implement the following functions
All light client contracts on the Map Relay chain are registered with the LightClientManager contract, which is responsible for their unified management. The LightClientManager is a managing contract that depends on the contract addresses of other light clients registered by the owner on the Map Relay chain. Detailed verification logic and block data updates still reside within their respective light client contracts. The LightClientManager is primarily designed to provide a more convenient way to update blocks and perform proof verification. Now, let's take a look at the method interfaces of the LightClientManager. With these common methods, synchronizing blocks and verifying transactions on the Map Relay chain will become more convenient and efficient.
Specific details regarding the updating of block headers and proof verification for the corresponding chain can be found in
Last updated