This documentation is specifically designed for Dapp developers who want to use ICCF (Inter-Chain Confirmation Framework). 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:
Add ICCF GTX Module: Include the ICCF GTX module in your blockchain configuration. Add the following lines to your configuration file:
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
trueto exclude optimized intra-cluster proofs.
The function returns
true if the transaction has been successfully verified and can be trusted.