ckb-ics
is a validation utility set providing IBC-compatible objects and messages for CKB. objects
are payloads of cross-chain commands, and their hash digests are located in the cells’ data
field and the raw bytes are set in the witnesses to optimize on-chain capacity requirement. messages
can be recognized as cross-chain commands, instructing the relayer on how to process them to complete the relay operations, such as establishing connection and handling packet.
In the case of ibc-ckb-contracts, the responsibility of ckb-ics
is to verify whether an object in objects
is valid under a specified IBC message in messages
, by calling the corresponding handler in handlers. In the case of Forcerelay, ckb-ics
just provides structures in objects to help complete the assembly of CKB transactions, which can modify the status of on-chain IBC cells.
In general, project ckb-ics
is the core validation library for ibc-ckb-contracts
and Forcerelay, which validates parameters associated with Cosmos-IBC protocol for CKB.
To integrate ckb-ics
into your project, add the following line to your Cargo.toml
file:
ckb-ics-axon = { git = "https://github.com/synapseweb3/ckb-ics", branch = "main" }
IBC commitments are encoded with protobuf etc., compatible with ibc-solidity or ibc-go.
IBC objects (whose hash are stored in ibc cells) are encoded with RLP due to historical implementation choices.
The primary responsibility of an IBC light client is to validate counterparty commitments. In the case of Axon → CKB
, Axon’s light client on CKB network follows the following steps to complete a verification process:
- Verify the validity of an Axon
block
by referencing the metadata cells directly maintained by Axon itself. - Verify the account MPT proof of the IBC handler to get its storage trie root.
- Verify the storage MPT proof for the commitment path and value.