Darwinia facilitates any parachain that wants to send messages to Ethereum or an EVM-compatible chain, thus need to store those messages in a way that can be verified trustlessly on Ethereum. This can be done by creating a custom messages commitment on Darwinia. The commitment can be verified easily and cheaply.

MessagesCommitment is a two-layer Merkle tree composed of all messages in different chains and channels. As shown below

message commitment.png

MessageRoot is the root hash of bridged_chain_message_merkle_tree, the leaves of bridged_chain_message_merkle_tree are message_roots of different chains, they form the first level Merkle tree,

chain_id/chain_position is the leaf position index of bridged_chain_message_merkle_tree, which starts from 0.

brided_chain_message_root is the root hash of lane_message_merkle_tree, and the leaves of brided_chain_message_root are different lane commitments of the target chain, and they form the second-level Merkle tree.

lane_id/lane_position is the leaf position index of lane_message_merkle_tree, which starts from 0.