mukan-ibc/docs/versioned_docs/version-v8.5.x/03-light-clients/01-developer-guide/08-genesis.md
Mukan Erkin Törük 6852832fe8
Some checks failed
CodeQL / Analyze (push) Waiting to run
Docker Build & Push Simapp (main) / docker-build (push) Waiting to run
golangci-lint / lint (push) Waiting to run
Tests / Code Coverage / build (amd64) (push) Waiting to run
Tests / Code Coverage / build (arm64) (push) Waiting to run
Tests / Code Coverage / unit-tests (map[additional-args:-tags="test_e2e" name:e2e path:./e2e]) (push) Waiting to run
Tests / Code Coverage / unit-tests (map[name:08-wasm path:./modules/light-clients/08-wasm]) (push) Waiting to run
Tests / Code Coverage / unit-tests (map[name:ibc-go path:.]) (push) Waiting to run
Deploy to GitHub Pages / Deploy to GitHub Pages (push) Has been cancelled
Buf-Push / push (push) Has been cancelled
initial: sovereign Mukan Network fork
2026-05-11 03:18:28 +03:00

2 KiB

title sidebar_label sidebar_position slug
Handling Genesis Handling Genesis 8 /ibc/light-clients/genesis

Genesis metadata

:::note Synopsis Learn how to implement the ExportMetadata interface :::

:::note

Pre-requisite readings

:::

ClientState instances are provided their own isolated and namespaced client store upon initialisation. ClientState implementations may choose to store any amount of arbitrary metadata in order to verify counterparty consensus state and perform light client updates correctly.

The ExportMetadata method of the ClientState interface provides light client modules with the ability to persist metadata in genesis exports.

ExportMetadata(clientStore sdk.KVStore) []GenesisMetadata

ExportMetadata is provided the client store and returns an array of GenesisMetadata. For maximum flexibility, GenesisMetadata is defined as a simple interface containing two distinct Key and Value accessor methods.

type GenesisMetadata interface {
  // return store key that contains metadata without clientID-prefix
  GetKey() []byte
  // returns metadata value
  GetValue() []byte
}

This allows ClientState instances to retrieve and export any number of key-value pairs which are maintained within the store in their raw []byte form.

When a chain is started with a genesis.json file which contains ClientState metadata (for example, when performing manual upgrades using an exported genesis.json) the 02-client submodule of core IBC will handle setting the key-value pairs within their respective client stores. See 02-client InitGenesis.

Please refer to the Tendermint light client implementation for an example.