forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge PR cosmos#34: ICS 4: Channel & Packet Semantics
- Loading branch information
Showing
18 changed files
with
978 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
ics: 23 | ||
title: Vector Commitments | ||
stage: draft | ||
required-by: 2, 3, 4 | ||
category: ibc-core | ||
author: Christopher Goes <[email protected]> | ||
created: 2019-04-16 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ title: Host State Machine Requirements | |
stage: draft | ||
category: ibc-core | ||
requires: 2 | ||
required-by: 2, 3, 18 | ||
required-by: 2, 3, 4, 18 | ||
author: Christopher Goes <[email protected]> | ||
created: 2019-04-16 | ||
modified: 2019-05-11 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ title: Connection Semantics | |
stage: draft | ||
category: ibc-core | ||
requires: 2, 23, 24 | ||
required-by: 4 | ||
author: Christopher Goes <[email protected]>, Juwoon Yun <[email protected]> | ||
created: 2019-03-07 | ||
modified: 2019-05-17 | ||
|
@@ -15,15 +16,15 @@ This standards document describes the abstraction of an IBC *connection*: two st | |
|
||
### Motivation | ||
|
||
The core IBC protocol provides *authorization* and *ordering* semantics for packets: guarantees, respectively, that packets have been committed on the sending blockchain (and according state transitions executed, such as escrowing tokens), and that they have been committed exactly once in a particular order and can be delivered exactly once in that same order. The *connection* abstraction specified in this standard, in conjunction with the *client* abstraction specified in [ICS 2](../spec-ics-2-consensus-verification), defines the *authorization* semantics of IBC. Ordering semantics are described in [ICS 4](../spec/ics-4-channel-packet-semantics)). | ||
The core IBC protocol provides *authorization* and *ordering* semantics for packets: guarantees, respectively, that packets have been committed on the sending blockchain (and according state transitions executed, such as escrowing tokens), and that they have been committed exactly once in a particular order and can be delivered exactly once in that same order. The *connection* abstraction specified in this standard, in conjunction with the *client* abstraction specified in [ICS 2](../ics-2-consensus-verification), defines the *authorization* semantics of IBC. Ordering semantics are described in [ICS 4](../ics-4-channel-and-packet-semantics)). | ||
|
||
### Definitions | ||
|
||
`ConsensusState`, `Header`, and `updateConsensusState` are as defined in [ICS 2](../spec/ics-2-consensus-verification). | ||
`ConsensusState`, `Header`, and `updateConsensusState` are as defined in [ICS 2](../ics-2-consensus-verification). | ||
|
||
`CommitmentProof`, `verifyMembership`, and `verifyNonMembership` are as defined in [ICS 23](../spec/ics-23-vector-commitments). | ||
`CommitmentProof`, `verifyMembership`, and `verifyNonMembership` are as defined in [ICS 23](../ics-23-vector-commitments). | ||
|
||
`Identifier` and other host state machine requirements are as defined in [ICS 24](../spec/ics-24-host-requirements). The identifier is not necessarily intended to be a human-readable name (and likely should not be, to discourage squatting or racing for identifiers). | ||
`Identifier` and other host state machine requirements are as defined in [ICS 24](../ics-24-host-requirements). The identifier is not necessarily intended to be a human-readable name (and likely should not be, to discourage squatting or racing for identifiers). | ||
|
||
The opening handshake protocol allows each chain to verify the identifier used to reference the connection on the other chain, enabling modules on each chain to reason about the reference on the other chain. | ||
|
||
|
@@ -87,7 +88,7 @@ interface Connection { | |
|
||
### Subprotocols | ||
|
||
This ICS defines two subprotocols: opening handshake and closing handshake. Header tracking and closing-by-equivocation are defined in [ICS 2](../spec/ics-2-consensus-verification). Datagrams defined herein are handled as external messages by the IBC relayer module defined in ICS 26. | ||
This ICS defines two subprotocols: opening handshake and closing handshake. Header tracking and closing-by-equivocation are defined in [ICS 2](../ics-2-consensus-verification). Datagrams defined herein are handled as external messages by the IBC relayer module defined in ICS 26. | ||
|
||
![State Machine Diagram](state.png) | ||
|
||
|
@@ -274,7 +275,7 @@ function connOpenTimeout(identifier: Identifier, proofTimeout: CommitmentProof, | |
#### Header Tracking | ||
Headers are tracked at the client level. See [ICS 2](../spec/ics-2-consensus-verification). | ||
Headers are tracked at the client level. See [ICS 2](../ics-2-consensus-verification). | ||
#### Closing Handshake | ||
|
@@ -406,7 +407,7 @@ function connCloseTimeout(identifier: Identifier, proofTimeout: CommitmentProof, | |
#### Freezing by Equivocation | ||
The equivocation detection subprotocol is defined in [ICS 2](../spec/ics-2-consensus-verification). If a client is frozen by equivocation, all associated connections are immediately frozen as well. | ||
The equivocation detection subprotocol is defined in [ICS 2](../ics-2-consensus-verification). If a client is frozen by equivocation, all associated connections are immediately frozen as well. | ||
Implementing chains may want to allow applications to register handlers to take action upon discovery of an equivocation. Further discussion is deferred to ICS 12. | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
all: $(addsuffix .png, $(basename $(wildcard *.tex))) cleanup | ||
|
||
%.png : %.tex | ||
pdflatex "\input{$<}" | ||
convert -resize 50% -chop 26x0 -density 400 $(basename $<).pdf -quality 100 $@ | ||
|
||
cleanup: | ||
rm -f *.log | ||
rm -f *.aux | ||
rm -f *.pdf | ||
|
||
clean: | ||
rm -f *.png | ||
|
||
.PHONY: all clean cleanup |
Oops, something went wrong.