Skip to content

Commit

Permalink
Reformat per #84
Browse files Browse the repository at this point in the history
  • Loading branch information
cwgoes committed May 15, 2019
1 parent 65b437d commit 6750543
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions spec/ics-4-channel-and-packet-semantics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,17 @@ created: 2019-03-07
modified: 2019-05-12
---

# Synopsis
## Synopsis

The "channel" abstraction provides message delivery semantics to the interblockchain communication protocol, in three categories: ordering, exactly-once delivery, and module permissioning. A channel serves as a conduit for packets passing between a module on one chain and a module on another, ensuring that packets are executed only once, delivered in the order in which they were sent (if necessary), and delivered only to the corresponding module owning the other end of the channel on the destination chain. Each channel is associated with a particular connection, and a connection may have any number of associated channels, allowing the use of common identifiers and amortizing the cost of header verification across all the channels utilizing a connection & light client.

Channels are payload-agnostic. The module which receives an IBC packet on chain `B` decides how to act upon the incoming data, and must utilize its own application logic to determine which state transactions to apply according to what data the packet contains. Both chains must only agree that the packet has been received.

# Specification

## Motivation
### Motivation

The interblockchain communication protocol uses a cross-chain message passing model which makes no assumptions about network synchrony. IBC *packets* are relayed from one blockchain to the other by external relayer processes. Chain `A` and chain `B` confirm new blocks independently, and packets from one chain to the other may be delayed, censored, or re-ordered arbitrarily. Packets are public and can be read from a blockchain by any relayer and submitted to any other blockchain. In order to provide the desired ordering, exactly-once delivery, and module permissioning semantics to the application layer, the interblockchain communication protocol must implement an abstraction to enforce these semantics — channels are this abstraction.

## Definitions
### Definitions

`Connection` is as defined in ICS 3.

Expand Down Expand Up @@ -99,27 +97,27 @@ struct Packet {
}
```

## Desired Properties
### Desired Properties

- The speed of packet transmission and confirmation should be limited only by the speed of the underlying chains.
- Exactly-once packet delivery, without assumptions of network synchrony and even if one or both of the chains should halt (no-more-than-once delivery in that case).
- Ordering, for ordered channels, whereby if packet *x* is sent before packet *y* on chain `A`, packet *x* must be received before packet *y* on chain `B`.

### Exactly-once delivery
#### Exactly-once delivery

either ordering or accumulator

### Ordering
#### Ordering

IBC channels implement a vector clock for the restricted case of two processes (in our case, blockchains). Given *x**y* means *x* is causally before *y*, chains `A` and `B`, and *a**b* means *a* implies *b*:

Every transaction on the same chain already has a well-defined causality relation (order in history). IBC provides an ordering guarantee across two chains which can be used to reason about the combined state of both chains as a whole.

For example, an application may wish to allow a single tokenized asset to be transferred between and held on multiple blockchains while preserving fungibility and conservation of supply. The application can mint asset vouchers on chain `B` when a particular IBC packet is committed to chain `B`, and require outgoing sends of that packet on chain `A` to escrow an equal amount of the asset on chain `A` until the vouchers are later redeemed back to chain `A` with an IBC packet in the reverse direction. This ordering guarantee along with correct application logic can ensure that total supply is preserved across both chains and that any vouchers minted on chain `B` can later be redeemed back to chain `A`.

### Permissioning
#### Permissioning

## Technical Specification
## Specification

### Channel opening handshake

Expand Down Expand Up @@ -304,10 +302,10 @@ Coming soon.

Coming soon.

# History
## History

12 May 2019 - Draft submitted

# Copyright
## Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).

0 comments on commit 6750543

Please sign in to comment.