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#156: Add data structures in proto3 (wip)
- Loading branch information
Showing
11 changed files
with
71 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
check_proto: | ||
/bin/bash -c 'TEMP=$$(mktemp); protoc data-structures.proto -o $$TEMP; rm -f $$TEMP' | ||
|
||
.PHONY: check_proto |
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,14 @@ | ||
syntax = 'proto3'; | ||
|
||
message ConsensusState { | ||
uint64 height = 1; | ||
bytes validityPredicate = 2; // TODO | ||
bytes equivocationPredicate = 3; // TODO | ||
} | ||
|
||
message Header { | ||
uint64 height = 1; | ||
bytes proof = 2; | ||
bytes predicate = 3; | ||
bytes commitmentRoot = 4; | ||
} |
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,16 @@ | ||
syntax = 'proto3'; | ||
|
||
enum ConnectionState { | ||
INIT = 0; | ||
TRYOPEN = 1; | ||
OPEN = 2; | ||
CLOSED = 3; | ||
} | ||
|
||
message ConnectionEnd { | ||
ConnectionState state = 1; | ||
string counterpartyConnectionIdentifier = 2; | ||
string clientIdentifier = 3; | ||
string counterpartyClientIdentifier = 4; | ||
uint64 nextTimeoutHeight = 5; | ||
} |
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
22 changes: 22 additions & 0 deletions
22
spec/ics-004-channel-and-packet-semantics/data-structures.proto
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,22 @@ | ||
syntax = 'proto3'; | ||
|
||
enum ChannelOrder { | ||
ORDERED = 0; | ||
UNORDERED = 1; | ||
} | ||
|
||
enum ChannelState { | ||
INIT = 0; | ||
OPENTRY = 1; | ||
OPEN = 2; | ||
CLOSED = 3; | ||
} | ||
|
||
message ChannelEnd { | ||
ChannelState state = 1; | ||
ChannelOrder ordering = 2; | ||
string counterpartyPortIdentifier = 3; | ||
string counterpartyChannelIdentifier = 4; | ||
repeated string connectionHops = 5; | ||
uint64 nextTimeoutHeight = 6; | ||
} |