Overview
By default, blockchains in the Chromia ecosystem cannot transact directly with one another. To enable this functionality, developers must implement proprietary libraries known as ICMF and ICCF. These libraries facilitate communication for dapps within the same cluster and between dapps in different clusters.
- ICMF enables cross-chain communication between blockchains within the dapp cluster.
- ICCF enables cross-chain communication between blockchains in different dapp clusters.
Inter-Chain Messaging Facility (ICMF)
ICMF operates as an event-based service within a dapp cluster. In this model,
dapp_#1
subscribes to a set of topics and waits for dapp_#2
to emit events. Events represent transactions, while
topics contain the embedded data in those transactions. dapp_#1
constantly queries dapp_#2
for events, while
dapp_#2
generates the events.
For instance, when a user in dapp_#2
wants to transfer assets to an account in dapp_#1
, the process unfolds as
follows:
- A user submits an asset transfer request in
dapp_#2
. - The system validates the transaction in
dapp_#2
and records it in the ledger. - The account balance in
dapp_#2
updates accordingly. dapp_#1
queriesdapp_#2
to find the asset transfer event directed todapp_#1
.dapp_#1
verifies the authenticity of the asset transfer that occurred indapp_#2
.- With the verified asset transfer data,
dapp_#1
submits a transaction to update the account balance in its blockchain. - The account balance in
dapp_#1
updates.
Inter-Chain Confirmation Facility (ICCF)
ICCF facilitates communication between dapps in different dapp clusters. ICCF
acts as a client application that serves as an intermediary between two blockchains located in separate dapp clusters.
The client submits a transaction on the source_chain
and provides proof of the validated transaction to the
destination_chain
.
In a simplified scenario where a user wants to transfer assets from the source_chain
to the destination_chain
, the
process looks like this:
- The client application submits a transaction on the
source_chain
for asset transfer. - The
source_chain
validates the transaction. - The client submits a transaction to the
destination_chain
, including proof of the validated transaction. - The
destination_chain
validates the transaction and updates the account balance.