cosmos-sdk/docs/spec/ibc/specification.md

2.4 KiB

IBC Protocol Specification

v0.4.0 / Feb. 13, 2018

Ethan Frey

Abstract

This paper specifies the IBC (inter blockchain communication) protocol, which was first described in the Cosmos white paper [1] in June 2016. The IBC protocol uses authenticated message passing to simultaneously solve two problems: transferring value (and state) between two distinct chains, as well as sharding one chain securely. IBC follows the message-passing paradigm and assumes the participating chains are independent.

Each chain maintains a local partial order, while inter-chain messages track any cross-chain causality relations. Once two chains have registered a trust relationship, cryptographically provable packets can be securely sent between the chains, using Tendermint's instant finality for quick and efficient transmission.

We currently use this protocol for secure value transfer in the Cosmos Hub, but the protocol can support arbitrary application logic. Details of how Cosmos Hub uses IBC to securely route and transfer value are provided in a separate paper, along with a framework for expressing global invariants. Designing secure communication logic for other types of applications is still an area of research.

The protocol makes no assumptions of block times or network delays in the transmission of the packets between chains and requires cryptographic proofs for every message, and thus is highly robust in a heterogeneous environment with Byzantine actors. This paper explains the requirements and structure of the Cosmos IBC protocol. It aims to provide enough detail to fully understand and analyze the security of the protocol.

Contents

  1. Overview
    1. Definitions
    2. Threat Models
  2. Proofs
    1. Establishing a Root of Trust
    2. Following Block Headers
  3. Messaging Queue
    1. Merkle Proofs for Queues
    2. Naming Queues
    3. Message Contents
    4. Sending a Packet
    5. Receipts
    6. Relay Process
  4. Optimizations
    1. Cleanup
    2. Timeout
    3. Handling Byzantine Failures
  5. Conclusion

Appendix A: Encoding Libraries

Appendix B: IBC Queue Format

Appendix C: Merkle Proof Format

Appendix D: Universal IBC Packets

Appendix E: Tendermint Header Proofs