-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge PR #152: Update relayer module & handler interface; closure han…
…dling; proto3 schemas
- Loading branch information
Showing
10 changed files
with
668 additions
and
229 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ category: ibc-core | |
requires: 2, 3, 5, 23, 24 | ||
author: Christopher Goes <[email protected]> | ||
created: 2019-03-07 | ||
modified: 2019-06-05 | ||
modified: 2019-06-29 | ||
--- | ||
|
||
## Synopsis | ||
|
@@ -367,13 +367,12 @@ function chanOpenTimeout( | |
|
||
##### Closing handshake | ||
|
||
The `chanClose` function is called by either module to close their end of the channel. | ||
The `chanCloseInit` function is called by either module to close their end of the channel. | ||
|
||
Calling modules MAY atomically execute appropriate application logic in conjunction with calling `chanClose`. | ||
Calling modules MAY atomically execute appropriate application logic in conjunction with calling `chanCloseInit`. | ||
|
||
```typescript | ||
function chanClose( | ||
portIdentifier: Identifier, channelIdentifier: Identifier) { | ||
function chanCloseInit(portIdentifier: Identifier, channelIdentifier: Identifier) { | ||
channel = get(channelKey(portIdentifier, channelIdentifier)) | ||
assert(channel.state === OPEN) | ||
connection = get(connectionKey(channel.connectionHops[0])) | ||
|
@@ -391,7 +390,7 @@ Calling modules MAY atomically execute appropriate application logic in conjunct | |
```typescript | ||
function chanCloseConfirm( | ||
portIdentifier: Identifier, channelIdentifier: Identifier, | ||
proof: CommitmentProof, proofHeight: uint64) { | ||
proofInit: CommitmentProof, proofHeight: uint64) { | ||
channel = get(channelKey(portIdentifier, channelIdentifier)) | ||
assert(channel.state === OPEN) | ||
connection = get(connectionKey(channel.connectionHops[0])) | ||
|
@@ -566,7 +565,7 @@ function timeoutPacketOrdered(packet: Packet, proof: CommitmentProof, proofHeigh | |
assert(packet.destChannel === channel.counterpartyChannelIdentifier) | ||
|
||
connection = get(connectionKey(packet.connectionHops[0])) | ||
assert(connection.state === OPEN) | ||
// note: the connection may have been closed | ||
assert(packet.destPort === channel.counterpartyPortIdentifier) | ||
assert(packet.connectionHops === channel.connectionHops) | ||
|
||
|
@@ -614,7 +613,7 @@ function timeoutPacketUnordered(packet: Packet, proof: CommitmentProof, proofHei | |
assert(packet.destChannel === channel.counterpartyChannelIdentifier) | ||
|
||
connection = get(connectionKey(packet.connectionHops[0])) | ||
assert(connection.state === OPEN) | ||
// note: the connection may have been closed | ||
assert(packet.destPort === channel.counterpartyPortIdentifier) | ||
assert(packet.connectionHops === channel.connectionHops) | ||
|
||
|
@@ -656,7 +655,7 @@ function timeoutClose(packet: Packet, proof: CommitmentProof, proofHeight: uint6 | |
assert(packet.sourceChannel === channel.counterpartyChannelIdentifier) | ||
|
||
connection = get(connectionKey(channel.connectionHops[0])) | ||
assert(connection.state === OPEN) | ||
// note: the connection may have been closed | ||
assert(packet.sourcePort === channel.counterpartyPortIdentifier) | ||
assert(packet.connectionHops === channel.connectionHops) | ||
|
||
|
@@ -693,7 +692,7 @@ function cleanupPacketOrdered(packet: Packet, proof: CommitmentProof, proofHeigh | |
assert(packet.destChannel === channel.counterpartyChannelIdentifier) | ||
|
||
connection = get(connectionKey(packet.connectionHops[0])) | ||
assert(connection.state === OPEN) | ||
// note: the connection may have been closed | ||
assert(packet.destPort === channel.counterpartyPortIdentifier) | ||
assert(packet.connectionHops === channel.connectionHops) | ||
|
||
|
@@ -730,7 +729,7 @@ function cleanupPacketUnordered(packet: Packet, proof: CommitmentProof, proofHei | |
assert(packet.destChannel === channel.counterpartyChannelIdentifier) | ||
|
||
connection = get(connectionKey(packet.connectionHops[0])) | ||
assert(connection.state === OPEN) | ||
// note: the connection may have been closed | ||
assert(packet.destPort === channel.counterpartyPortIdentifier) | ||
assert(packet.connectionHops === channel.connectionHops) | ||
|
||
|
@@ -784,6 +783,7 @@ Coming soon. | |
5 June 2019 - Draft submitted | ||
4 July 2019 - Modifications for unordered channels & acknowledgements | ||
16 July 2019 - Alterations for multi-hop routing future compatibility | ||
29 July 2019 - Revisions to handle timeouts after connection closure | ||
|
||
## Copyright | ||
|
||
|
Oops, something went wrong.