Home

Awesome

An IBC Celo-Cosmos bridge

Overview

This is a bridge connecting a Celo blockchain to a Cosmos-SDK based blockchain. Specifically it connects celo light client running inside cosmos chain to celo chain and cosmos light client running inside celo chain to cosmos chain (the latter is still under construction).

Architecture

The cosmos-celo bridge, comprises three major components, with two light clients as subcomponents:

Integration tests

A single Makefile orchiestrates setup of all compontents. You should run the following commands in to execute selected integration test:

# Setup Celo geth node
$ make build-geth
$ make start-geth

# Setup cosmos node with the ChorusOne fork of cosmos-sdk (adds wasm-manager functionality)
$ make build-simd
$ make start-simd

# Build and upload Celo Light Client to cosmos node (via wasm-manager interface)
$ make build-clc
$ make start-clc

# Build and upload Tendermint Light Client to celo node (via truffle)
$ make build-tlc
$ make start-tlc

# Setup Quantum Tunnel relayer (pick your integration test at this step)
$ make build-qt
$ TEST_MODE=... make start-qt

Why don't you use docker-compose?

While docker is great for setting up reproducable work envirionment, it's not the fastest solution ever. In practice it's much easier to use a single Makefile for development work, without the need to care about isolated volumes or lengthly build times.

Live

Both chains are live. To run this variant you need to execute TEST_MODE=live_config_celo_cosmos make start-qt in project directory.

Simulated celo

Celo chain is simulated with a text file and headers are fed into celo light client running in cosmos chain. To run this variant you need to execute TEST_MODE=simulated_celo_chain_config make start-qt. If the test is successful, make will exit with zero exit code.

Faulty simulated celo

Same as simulated celo but with faulty data to test failure scenario. To run this variant you need to execute TEST_MODE=faulty_simulated_celo_chain_config make start-qt. If the test is successful, make will exit with zero exit code.

Credit and Attribution

Demo

asciicast