Room-House.com Russia
  • SkyPirl (Pirl)
    • О SkyPirl
    • Создать кошелек SkyPirl 2.0
    • Как стать номинатором (Stake)
    • Запустить валидатор
    • как вывести средства со стейка
    • Как работает выплата
    • Как проголосовать за Совет
    • Как установить личность
    • косая черта
    • Refund of slashed
    • ХАРАКТЕРИСТИКИ МОНЕТ
    • Правительство и казначейство
    • Telemetry
    • Source Code
  • PIRLmeet
    • О PIRLmeet.com
    • Бесплатная пробная версия
    • CINEMA
    • Microphone On-Off
    • Демонстрация экрана
      • Поделитесь или не делитесь своим аудио
      • Учебное пособие по записи видео + камера + загрузка видео в формате mp4
    • Руки вверх
    • Изменить мелодию звонка при поднятии руки
    • Потоковое видео в формате MP4
    • Потоковое видео mp4 в браузере Firefox
    • Замок шкафа
      • Учетная запись блокировки кабинета
      • Как я могу «запереть шкаф» и не дать посторонним войти в комнату?
      • Как я могу добавить людей в комнату, когда комната заблокирована?
    • Подключить кошелек SkyPirl к PIRLmeet
    • Изменить обложку
    • Название видео
    • Настройка собственного PIRLmeet
    • Как скачать видео на ютуб, фейсбук и конвертировать в мп4 файлы
    • Используйте приложение для улучшения камеры во время прямой трансляции
    • PIRLmeet может организовывать встречи, которые длятся 24/7 и 365 дней в году.
    • Как PIRLmeet защищает продукты?
    • Получите монету Pirl при воспроизведении видео на PIRLmeet
    • Source Code
  • SkyPirl Light Wallet
  • Сообщество SkyPirl
  • Бизнес-парадигма R-H
  • Дорожная карта
  • Команда SkyPirl
  • хТер . Технологии
    • О xTER SafeContainer
    • xTer Экосистема
    • xTer SkyPirl
    • xTer Room-House
      • Как Room-House
    • xTer Room-House Plus
      • Как xTer room-House plus
    • xTer TrueAD
    • xTer SmartFilter
  • Белая бумага
  • Блог
    • Новости
      • ------ Что такое Web 1.0, 2.0, 3.0?------
      • Первый в мире децентрализованный аудиочат Room-House
      • Что такого особенного в децентрализованных аудиочатах?
      • Особенности, которые делают децентрализованные чаты Room-House.com конкурентоспособными с гигантами
      • Вы когда-нибудь слышали о децентрализованном благотворительном фонде?
      • Что такое онлайн-встреча? 4 самых эффективных решения для онлайн-конференций
      • Что такое онлайн-встреча? Легко или сложно организовать?
      • Каков стандарт профессиональной онлайн-комнаты для совещаний?
      • История первого в мире программного обеспечения для онлайн-конференций
      • Децентрализованное приложение Room-House.com (Daap)
      • В каком году родился интернет? И рождение проекта SkyPirl
      • Сотрудничество между Room-House и Российским государственным социальным университетом
    • Технические
      • Что такое биткойн? Как создаются биткойны?
      • Export Your Private Key from Third-Party Wallets
      • Что такое стейблкоин?
      • Что такое обернутый биткойн?
      • 7 способов получения пассивного дохода с помощью криптовалюты
      • Что такое децентрализованная социальная сеть?
      • Сколько биткойнов можно добыть за день?
      • Сколько биткойнов в мире?
      • Что такое децентрализованная биржа? отличается от централизованного этажа?
      • Что такое стейкинг? 5 вещей, которые следует учитывать при инвестировании в стейкинг
      • Что такое блокчейн-мосты?
      • Сравните горячий кошелек и холодный кошелек, какой из них вам следует использовать?
      • Что такое НФТ?
      • Создание децентрализованного интернета в космосе
      • Веб 3.0 Парадокс
      • Споры о будущем Интернета
      • Виртуальная вселенная метавселенной может произвести революцию в Интернете
      • «Блокчейн — самая влиятельная технология со времен Интернета»
      • Web3 - Ожидания от децентрализованного Интернета
      • Что такое дапп? Понятие Dapp и их классификация
      • Как децентрализованные веб-браузеры обеспечивают непревзойденную конфиденциальность
      • Web 3.0 раскручен?
      • Что такое узлы? Типы узлов в блокчейне
      • Блокчейн можно взломать или нет?
      • Что такое закрытый ключ и открытый ключ в биткойнах?
      • Что такое одноразовый номер в блокчейне?
      • Что такое децентрализованный автономный кооператив (DAC)?
      • Что такое Генезис Блок?
      • Что такое Веб3? Объяснение децентрализованного Интернета будущего
  • FAQ?
    • General
      • Getting Started
      • Claims
      • Redenomination of DOT
      • Grants
      • Polkadot Ambassador Programme
      • Research Pages
      • Community
      • Contributing
      • Contributors
      • Glossary
      • Adding accounts to an ENS domain
      • Ledger Application
      • How to Protect Yourself from Scams
      • How to Do Your Own Research
      • Thousand Validators Programme
      • Frequently Asked Questions (FAQs)
      • Miscellaneous
      • Programmes
        • Grants
        • Bug Bounty
        • Substrate Builders Program
        • Thousand Validators Programme
        • Thousand Contributors Programme
    • Learn
      • Basics
        • Token and Assets
          • Assets
          • DOT
          • NFTs
          • Statemint
          • Teleporting Assets
        • Components
          • Architecture
          • Collator
          • Consensus
          • Governance
          • Identity
          • Network Security
          • Nominator
          • Polkadot Host
          • PolkadotJS
          • W3F Registrar
          • Runtime Upgrades
          • Transaction Fees
          • Treasury
          • Validator
        • Staking
          • Staking Concepts
          • Staking FAQ
          • Nomination Pools
        • Account
          • Account Generation
          • Backing up and Restoring Accounts
          • Balance Transfers
      • Advanced
        • Availability and Validity
        • Cross-Consensus Message Format (XCM)
        • Sequential Phragmén Method
        • Proxy Accounts
        • Randomness
        • Simple Payouts
        • SPREE
        • WebAssembly (Wasm)
      • Cryptography
        • Cryptography Explainer
        • Keys
      • Paraobjects
        • Parachains
          • Common Good Parachains
          • Parachain Slots Auction
          • Parachain Crowdloans
          • Teleporting Assets
        • Parathreads
        • Bridges
      • Polkadot Comparisons
        • Polkadot and Kusama
        • Other Comparisons
        • Ethereum 2.0
        • Cosmos
      • Polkadot Lauch Phased
      • Video Tutorials
    • Build
      • Builder's Guides
      • Development Guide
        • Builders Starter's Guide
        • Parachain Development
        • Decentralized Storage Systems
        • Smart Contracts
        • Oracles
        • Data Analytics
        • Wallets
        • Substrate Connect
        • SS58 Registry
        • Opening HRMP Channels
      • Integration Guide
        • Polkadot Integration Guide
        • Polkadot Protocol Information
        • Integration Assets
        • Node Management
        • Node Interaction
        • Transaction Construction and Signing
      • Tool
      • Resources
    • Maintain
      • Network Maintainers
      • Parameters
      • Node Endpoints
      • Node And Dapps
        • Set up a Full Node
        • Networks
        • Set up Secure WebSocket for Remote Connections
        • Resolving Errors
      • Nominated Guides
        • Nominate
        • Unbonding and Rebonding
      • Validator Guides
        • How to run a Validator on Polkadot
        • Validator Payout Overview
        • Using systemd for a Validator Node
        • Secure Validator
        • How to use Polkadot Validator setup
        • Set Up a Validator with NGINX Reverse Proxy
        • How to Upgrade Your Validator
        • Monitor your node
        • How to Chill
        • How to Stop Validating
        • Validator Community Overview
      • Governance Guides
        • Participate in Democracy
        • Join the Council
        • Voting for Councillors
  • Agency policy
    • Information privacy policy
Powered by GitBook
On this page
  • Overview of XCM: A Format, Not a Protocol​
  • Cross-Consensus Protocols​
  • XCVM (Cross-Consensus Virtual Machine)​
  • How To Make Cross-Chain Transfers​
  • Resources​
  1. FAQ?
  2. Learn
  3. Advanced

Cross-Consensus Message Format (XCM)

PreviousAvailability and ValidityNextSequential Phragmén Method

Last updated 2 years ago

What started as an approach to cross-chain communication, has evolved into a format for Cross-Consensus Communication that is not only conducted between chains, but also smart contracts, pallets, bridges, and even sharded enclaves like .

Overview of XCM: A Format, Not a Protocol

XCM is related to cross-chain in the same way that REST is related RESTful. XCM cannot actually send messages between systems. It is a format for how message transfer should be performed, similar to how RESTful services use REST as an architectural style of deployment.

XCM aims to be a language communicating ideas between consensus systems, hence, "Cross-Consensus" with the following properties:

  • Generic and extensible for use with fee-free and gas-metered smart contract platforms, community parachains, trusted interactions between system parachains and their relay chain, and more.

  • Interacting with a system whose transaction format is unknown.

    • XCM is well-versioned, abstract and general and can be used as a means of providing a long-lasting transaction format for wallets to use to create many common transactions. It is extensible and, in turn, future-proof and forwards-compatible.

  • Highly efficient to operate in a tightly constrained and metered environment, as is the case with many chains.

INFO

XCM is not designed in that every system supporting the format is expected to be able to interpret any possible XCM message. Practically speaking, one can imagine that some messages will not have reasonable interpretations under some systems or will be intentionally unsupported.

Example Use-Cases

  • Request for specific operations to occur on the recipient system.

  • Optionally include payment of fees on a target network for requested operation.

  • Provide methods for various token transfer models:

    • Remote Transfers: control an account on a remote chain, allowing the local chain to have an address on the remote chain for receiving funds and to eventually transfer those funds it controls into other accounts on that remote chain.

    • Teleporting: movement of an asset happens by destroying it on one side and creating a clone on the other side.

    • Reverse-Based Transfer: there may be two chains that want to nominate a third chain, where one includes a native asset that can be used as a reserve for that asset. Then, the derivative form of the asset on each of those chains would be fully backed, allowing the derivative asset to be exchanged for the underlying asset on the reserve chain backing it.

XCM Tech Stack

XCM can be used to express the meaning of the messages over each of these three communication channels.

With the XCM format established, common patterns for protocols these messages are needed. Polkadot implements two for acting on XCM messages between its constituent parachains.

There are two kinds of vertical message-passing transport protocols:

  • UMP (Upward Message Passing): allows parachains to send messages to their relay chain.

  • DMP (Downward Message Passing): allows the relay chain to pass messages down to one of their parachains.

Messages that are passed via DMP may originate from a parachain. In which case, first UMP is used to communicate the message to the Relay Chain and DMP is used to move it down to another parachain.

XCMP allows the parachains to exchange messages with other parachains on the same Relay Chain.

Cross-chain transactions are resolved using a simple queuing mechanism based around a Merkle tree to ensure fidelity. It is the task of the Relay Chain validators to move transactions on the output queue of one parachain into the input queue of the destination parachain. However, only the associated metadata is stored as a hash in the Relay Chain storage.

The input and output queue are sometimes referred to in the Polkadot codebase and associated documentation as ingress and egress messages, respectively.

While XCMP is still being implemented, a stop-gap protocol (see definition below) known as Horizontal Relay-routed Message Passing (HRMP) exists in its place. HRMP has the same interface and functionality as XCMP but is much more demanding on resources since it stores all messages in the Relay Chain storage. When XCMP has been implemented, HRMP is planned to be deprecated and phased out in favor of it.

NOTE

A stop-gap protocol is a temporary substitute for the functionality that is not fully complete. While XCMP proper is still in development, HRMP is a working replacement.

XCMP IS CURRENTLY UNDER DEVELOPMENT AND THE DETAILS ARE SUBJECT TO CHANGE

However, this overall architecture and design decisions are more stable:

  • Cross-chain messages will not be delivered to the Relay Chain.

  • Cross-chain messages will be constrained to a maximum size in bytes.

  • Parachains are allowed to block messages from other parachains, in which case the dispatching parachain would be aware of this block.

  • Collator nodes are responsible for routing messages between chains.

  • Collators produce a list of egress messages and will receive the ingress messages from other parachains.

  • On each block, parachains are expected to route messages from some subset of all other parachains.

  • When a collator produces a new block to hand off to a validator, it will collect the latest ingress queue information and process it.

  • Validators will check the proof that the new candidate for the next parachain block includes the processing of the expected ingress messages to that parachain.

XCMP queues must be initiated by first opening a channel between two parachains. The channel is identified by both the sender and recipient parachains, meaning that it's a one-way channel. A pair of parachains can have at most two channels between them, one for sending messages to the other chain and another for receiving messages. The channel will require a deposit in DOT to be opened, which will get returned when the channel is closed.

A smart contract that exists on parachain A will route a message to parachain B in which another smart contract is called that makes a transfer of some assets within that chain.

Charlie executes the smart contract on parachain A, which initiates a new cross-chain message for the destination of a smart contract on parachain B.

The collator node of parachain A will place this new cross-chain message into its outbound messages queue, along with a destination and a timestamp.

The collator node of parachain B routinely pings all other collator nodes asking for new messages (filtering by the destination field). When the collator of parachain B makes its next ping, it will see this new message on parachain A and add it into its own inbound queue for processing into the next block.

Validators for parachain A will also read the outbound queue and know the message. Validators for parachain B will do the same. This is so that they will be able to verify the message transmission happened.

When the collator of parachain B is building the next block in its chain, it will process the new message in its inbound queue as well as any other messages it may have found/received.

During processing, the message will execute the smart contract on parachain B and complete the asset transfer as intended.

The collator now hands this block to the validator, which itself will verify that this message was processed. If the message was processed and all other aspects of the block are valid, the validator will include this block for parachain B into the Relay Chain.

Check out our animated video below that explores how XCMP

An ultra-high level non-Turing-complete computer whose instructions are designed in a way to be roughly at the same level as transactions.

Cross-Consensus Protocols

VMP (Vertical Message Passing)

XCMP (Cross-Chain Message Passing)

XCMP-Lite (HRMP)

XCMP Design

XCMP Message Format

For an updated and complete description of the XCMP message format please see the .

The Anatomy of an XCMP Interaction

XCVM (Cross-Consensus Virtual Machine)

A message in XCM is simply just a programme that runs on the XCVM: in other words, one or more XCM instructions. To learn more about the XCVM and the XCM Format, see the latest by Dr. Gavin Wood.

How To Make Cross-Chain Transfers

A tutorial on downward, upward, and lateral transfers can be found .

Resources

- Detailed blog post by Dr. Gavin Wood about the XCM Format.

- Description of the high-level XCM format sent via XCMP.

- Full technical description of cross-chain communication on the Web3 Foundation research wiki.

- An overview of the messaging schemes from the Parachain Implementor's guide.

SPREE
​
​
​
​
​
​
​
​
xcm-format repository on GitHub
​
https://storage.googleapis.com/w3f-tech-ed-contents/XCMP.mp4
​
blog post
​
here
​
XCM: The Cross-Consensus Message Format
XCM Format
XCMP Scheme
Messaging Overview