zerokn0wledge

Polkadot XCM and XCMP: cross-consensus messaging explained

Quote586 words
ExplainerL1/L2PolkadotXCMXCMPSPREEMoonriverRMRK$DOT$RMRK

Explains the XCM message format, SPREE shared-logic modules, UMP and DMP vertical passing and XCMP between parachains, including the relay chain fallback and why only message hashes are stored on the relay chain.

Key claims
XCMP validators move messages between parachain queues and store only metadata hashes on the relay chain
Gossip between shared nodes is used first, relay chain is the fallback
XCMP avoids dApps competing for shared compute as on general purpose chains
0/ So hyped to see more cross-chain use cases like this. XCMP is a powerful @polkadot feature enabling trustless cross-chain communication that @gavofyork & his team came up with. Cross-chain tokens like $RMRK are just the beginning A $DOT 馃Уon XCM/XCMP (0/18)馃憞 1/ "Cross-consensus message format" (XCM) is a form of cross-consensus communication that can not only be conducted between chains, but also smart contracts, pallets, bridges & sharded enclaves like SPREE 2/ Since many of you prob have never heard of SPREE, a few words on that: SPREE refers to "sharded protected runtime execution enclaves" 3/ SPREE modules are fragments of logic (blobs of WebAssembly code) that are uploaded to Polkadot through governance or by parachains 4/ SPREE modules have the following properties and functions: 5/ But why are SPREE modules important? In XCMP, sending messages across parachains ensures delivery, but does not specify how the code will be executed, or how the message will be interpreted by the receiving parachain 6/ SPREE are a way to ensure that the same logic (for interpreting messages) is shared between parachains via the SPREE modules. This can be important as XCM becomes more adopted/important 7/ But back to XCM. In conclusion, XCM basically aims to be a language or communication format, that allows for messages to be shared across consensus systems and hence enable cross-chain consensus 8/ With the XCM format established, common patterns for protocols to transport these messages are needed to allow parachain communication 9/ With $DOT, there are two kinds of "vertical message-passing" protocols: - UMP (upward message passing): allows parachains to send messages up to the relay chain - DMP (downward message passing): allows the relay chain to pass messages down to one of their parachains 10/ Cross-chain message passing (XCMP), which is basically a combination of UMP & DMP, allows parachains to exchange messages with other parachains on the same relay chain 11/ It is the task of the validators on the relay chain to move transactions from the output queue of parachain A into the input queue of the parachain B, while only the associated metadata is stored as a hash in the relay chain 12/ But recall that the simplest way to send messages is via a gossip protocol. In $DOT peers constantly communicate with each other about their view on the network. If two networks share common nodes, messages will be gossiped from one parachain network to another directly 13/ If there are no common nodes across the networks that want to share a message, a fallback mechanism via the relay chain is initiated 14/ It's important to understand that the relay chain defines the history for all parachains and hence needs to play a role in authenticating cross-chain messages anyway. Storing only the hash as described earlier, comes with efficiency benefits though 15/ XCMP enables a world in which competition between dApps for underlying computing resources, as common on general purpose chains like $ETH, will no longer exist 16/ XCMP is one core feature that makes @Polkadot the leader of heterogeneous sharding. Parachains with varying structures & functions can communicate via XCMP, enabling new levels of interoperability among an ecosystem of highly specialized, interconnected blockchains 17/ By enabling endless opportunities to arrange and combine applications on various specialized L1s, XCMP is likely to create amplification effect, that will drive a level of application innovation never seen before 18/ For more details on XCMP, check out wiki.polkadot.network/docs/learn-crosschain Or this post by the @Web3foundation: medium.com/web3foundation/polkadots-messaging-scheme-b1ec560908b7 $DOT will be so big馃殌
QUOTING @theAlbertoV19
In roughly 24 hours, around 190k @RmrkApp tokens have moved to @MoonriverNW as xcRMRK - We've seen also xcRMRK pools in EVM DEXs such as @Solarbeamio and @ZenlinkPro - Think about it, Substrate assets listed on EVM powered DEXs, seamlessly 馃く @MoonbeamNetwork #Kusama #Polkadot

3 images on X

Open on X
zerokn0wledge avatar
Working together

Research, advisory and builds for deep-tech teams.