IBC Go

How IBC-go interacts with the Avalanche IBC light client

See original documentation here.

The IBC-go library is a Go implementation of the IBC protocol and provides a set of interfaces and functions to handle the different components of the IBC protocol. To interact with the IBC light client for Avalanche, you can use the IBC-go library to implement the necessary functionality to receive and send packets over the IBC protocol.

Here are the general steps for using IBC-go to interact with the IBC light client for Avalanche:

  1. Install and configure the IBC-go library. You can follow the installation instructions provided in the Github repository to set up the library and configure it for your specific use case.

  2. Create an instance of the IBC light client for Landslide. You can use the Landslide-specific implementation of the IBC light client to connect to the AVAX subnet and receive and send packets over the IBC protocol.

  3. Implement the necessary functions to handle incoming packets from other chains. These functions should validate and verify the packets and then trigger the appropriate action within the Landslide network based on the contents of the packet.

  4. Implement the necessary functions to send packets to other chains. These functions should prepare the packet data and send it through the IBC light client to the appropriate destination chain.

  5. Set up the relayer to relay packets between different chains. The relayer is responsible for forwarding packets between different chains and ensuring that the packets are received in the correct order.

Here are some specific functions and interfaces in the IBC-go library that can be used to interact with the Avalanche IBC light client:

  • IBCClient: This interface defines the basic functionality for an IBC client, including sending and receiving packets, creating and updating connections, and handling events.

  • ConnState: This interface defines the possible states of a connection and provides functions for updating the connection state.

  • ChannelState: This interface defines the possible states of a channel and provides functions for updating the channel state.

  • Packet: This struct represents a packet of data that is sent over the IBC protocol. It contains information such as the source and destination chains, sequence number, and packet data.

  • IBCReceiver: This interface defines the necessary functions for handling incoming packets from other chains. These functions should validate and verify the packet and trigger the appropriate action within the Landslide network.

  • IBCSender: This interface defines the necessary functions for sending packets to other chains. These functions should prepare the packet data and send it through the IBC light client to the appropriate destination chain.

By using these functions and interfaces from the IBC-go library, the Avalanche IBC light client for Landslide implements the necessary functionality to send and receive packets over the IBC protocol.

Last updated

©2023 Gaia Labs LTD