Adding the Module
Opening a connection from a CometBFT-based chain is a straightforward process. Until the recent release of wasm light clients, the traditional way of having a light client on a Cosmos-SDK chain was to implement a light client with Go and bundling it with the chain which meant modifying the light client code requires a binary upgrade to the chain. After IBC proved its capability to be extended into other platforms, the wasm light client module was introduced for chains to easily, deploy and modify light clients. Union supports a native, Golang-based light client, and a modular and flexible wasm light client.
Add the 08-wasm
Module
Firstly, your chain needs to support wasm clients. The official docs have an extensive guide on enabling this integration. Before diving into this
documentation, note that the 08-wasm
module requires your chain to be on IBC-go
v7 or v8. And also note that adding this module will also add the dependency to libwasmvm
to your chain which is already there if you are already using CosmWasm.
Upload the CometBLS Client
By default, the wasm light client module is gated through governance. Storing a contract requires you to submit a store-code
proposal:
- Download the latest
CometBLS
light client:
This will create a file locally, called ‘cometbls-light-client.wasm’, which is the compiled binary for the CometBLS light client.
- Submit a proposal to store the
CometBLS
light client:
- Add a deposit for the proposal:
- Vote
yes
on the proposal:
After the proposal passes, query for the stored light client’s checksum:
Read more in the official docs.