lib/ibc.sh
What it does
Key generation
If no keystore exists, the script generates a new secp256k1 signing key and stores it atibc/local/.ibc-attestor/ibc-attestor-keystore. The Ethereum address can be retrieved at any time:
Config rendering
The script renders two config files from templates:ibc/attestor-config.toml.tmplintoibc/local/attestor-config.tomlfor the EVM watcheribc/attestor-cosmos-config.toml.tmplintoibc/local/attestor-cosmos-config.tomlfor the Cosmos watcher
ICS26_ROUTER_ADDR from the deploy step.
See below for the configuration reference for both the EVM and Cosmos attestors.
Starting the containers
ibc/local/.ibc-attestor/ and listen on port 9101 within the Docker network.
Configuration
EVM attestor
Below is an example of the EVM attestor config for this demo:adapter.finality_offset determines at which block height the attestor reads and signs chain state. If omitted, the attestor uses the chain’s native finalized block tag. If set to N, it attests latest - N. This value must match finality_offset in the relayer config. See Finality offset for more details.Cosmos attestor
The Cosmos attestor only requires the CometBFT RPC endpoint:Config field reference
| Field | Required | Description |
|---|---|---|
server.listen_addr | Yes | gRPC address the Proof API connects to |
server.health_addr | Yes | HTTP health endpoint (GET /healthz) |
adapter.url | Yes | Chain RPC endpoint: EVM JSON-RPC or CometBFT RPC |
adapter.router_address | EVM only | Address of the ICS26Router contract from the deploy step |
adapter.finality_offset | No | Blocks to subtract from latest when determining finality — must match the relayer’s finality_offset (see Finality offset) |
signer.keystore_path | Yes | Path to the keystore file |