Skip to main content

Interchain Confirmation Facility (ICCF)

This documentation is specifically designed for Dapp developers who want to use ICCF (Interchain Confirmation Facility). This guide will provide you with an understanding of what ICCF is and how to integrate it into your blockchain infrastructure to facilitate secure cross-chain transaction confirmation. ICCF allows you to verify the occurrence of transactions on a source chain and present this proof to a target chain for further action.

ICCF is a powerful facility designed to enable the verification of transactions across different chains within and across clusters. It ensures that transactions have occurred on the source chain and have been anchored in both the cluster anchoring chain and the system anchoring chain. This verification process guarantees the integrity and validity of cross-chain transactions.

Implementing ICCF in your blockchain

To integrate ICCF into your blockchain, follow these steps:

  1. Add ICCF GTX module: Include the ICCF GTX module in your blockchain configuration. Add the following lines to your configuration file:

    - "net.postchain.d1.iccf.IccfGTXModule"
  2. Install ICCF library: Install the ICCF library by following the instructions provided in the ICCF library repository.

Using the ICCF library

The ICCF library provides a single function, check_iccf_proof, which verifies transaction proofs. Here are the details of this function:

  • check_iccf_proof(blockchain_rid: byte_array, tx_hash: byte_array, require_intra_network_iccf_op: boolean = false): boolean

    • blockchain_rid: The blockchain Resource ID (RID) where the transaction occurred.
    • tx_hash: The hash of the transaction that needs to be verified.
    • require_intra_network_iccf_op (optional): Set to true to exclude optimized intra-cluster proofs.

The function returns true if the transaction has been successfully verified and can be trusted.

Creating proof with the client

ICCF support is available in the Kotlin client and Javascript/Typescript client. For more information, see the client's documentation.