-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trimmed the proto file, fixed commitments. Ready for review. (#130)
- Loading branch information
Showing
12 changed files
with
141 additions
and
393 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
extern crate prost_build; | ||
|
||
fn main() { | ||
prost_build::compile_protos(&["src/proto/ibc/connection/connection.proto"], &["src/proto"]).unwrap(); | ||
} | ||
prost_build::compile_protos(&["src/proto/connection.proto"], &["src/proto"]).unwrap(); | ||
} |
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
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,54 @@ | ||
syntax = "proto3"; | ||
|
||
package connection; | ||
|
||
// ICS03 - Connection Data Structures as defined in | ||
// https://github.com/cosmos/ics/tree/master/spec/ics-003-connection-semantics#data-structures | ||
|
||
// ConnectionEnd defines a stateful object on a chain connected to another separate | ||
// one. | ||
// NOTE: there must only be 2 defined ConnectionEnds to establish a connection | ||
// between two chains. | ||
message ConnectionEnd { | ||
// connection identifier. | ||
string id = 1; | ||
// client associated with this connection. | ||
string client_id = 2; | ||
// opaque string which can be utilised to determine encodings or protocols for | ||
// channels or packets utilising this connection | ||
repeated string versions = 3; | ||
// current state of the connection end. | ||
State state = 4; | ||
// counterparty chain associated with this connection. | ||
Counterparty counterparty = 5; | ||
} | ||
|
||
// State defines if a connection is in one of the following states: | ||
// INIT, TRYOPEN, OPEN or UNINITIALIZED. | ||
enum State { | ||
// Default State | ||
STATE_UNINITIALIZED_UNSPECIFIED = 0; | ||
// A connection end has just started the opening handshake. | ||
STATE_INIT = 1; | ||
// A connection end has acknowledged the handshake step on the counterparty chain. | ||
STATE_TRYOPEN = 2; | ||
// A connection end has completed the handshake. | ||
STATE_OPEN = 3; | ||
} | ||
|
||
// Counterparty defines the counterparty chain associated with a connection end. | ||
message Counterparty { | ||
// identifies the client on the counterparty chain associated with a given connection. | ||
string client_id = 1; | ||
// identifies the connection end on the counterparty chain associated with a given connection. | ||
string connection_id = 2; | ||
// commitment merkle prefix of the counterparty chain | ||
MerklePrefix prefix = 3; | ||
} | ||
|
||
|
||
// MerklePrefix is merkle path prefixed to the key. | ||
// The constructed key from the Path and the key will be append(Path.KeyPath, append(Path.KeyPrefix, key...)) | ||
message MerklePrefix { | ||
bytes key_prefix = 1; | ||
} |
Oops, something went wrong.