-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* migrated channel genesis types to proto * connection genesis types migrated to proto * client proto migration * failing tests due to tendermint part incomplete * add genesis test * x/ibc: ClientState Any * add genesis test * suite NotPanics * comment tests * update export logic * refactor * update test * fix non-determinism * castrepeated * x/ibc: migrate simulations to protobuf * add proto genesis * add UnpackInterfaces func to genclientstate * add unpackinterfaces for consensus states * formatting * fix genesis tests * add modified genesis test * update comments * remove localhost register codec * use app registry * fix bug * Update simapp/app.go * Update x/ibc/02-client/types/genesis.go * unmarshaler interface Co-authored-by: Colin Axner <colinaxner@berkeley.edu> Co-authored-by: Federico Kunze <federico.kunze94@gmail.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
- Loading branch information
1 parent
89097a0
commit ceba0cb
Showing
27 changed files
with
3,202 additions
and
182 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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
syntax = "proto3"; | ||
package ibc.channel; | ||
|
||
option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/04-channel/types"; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "ibc/channel/channel.proto"; | ||
|
||
// GenesisState defines the ibc channel submodule's genesis state. | ||
message GenesisState { | ||
repeated IdentifiedChannel channels = 1 [ | ||
(gogoproto.casttype) = "IdentifiedChannel", | ||
(gogoproto.nullable) = false | ||
]; | ||
repeated PacketAckCommitment acknowledgements = 2 [ | ||
(gogoproto.casttype) = "PacketAckCommitment", | ||
(gogoproto.nullable) = false | ||
]; | ||
repeated PacketAckCommitment commitments = 3 [(gogoproto.nullable) = false]; | ||
repeated PacketSequence send_sequences = 4 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.moretags) = "yaml:\"send_sequences\"" | ||
]; | ||
repeated PacketSequence recv_sequences = 5 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.moretags) = "yaml:\"recv_sequences\"" | ||
]; | ||
repeated PacketSequence ack_sequences = 6 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.moretags) = "yaml:\"ack_sequences\"" | ||
]; | ||
} | ||
|
||
// PacketSequence defines the genesis type necessary to retrieve and store | ||
// next send and receive sequences. | ||
message PacketSequence { | ||
string port_id = 1 [ | ||
(gogoproto.customname) = "PortID", | ||
(gogoproto.moretags) = "yaml:\"port_id\"" | ||
]; | ||
string channel_id = 2 [ | ||
(gogoproto.customname) = "ChannelID", | ||
(gogoproto.moretags) = "yaml:\"channel_id\"" | ||
]; | ||
uint64 sequence = 3; | ||
} |
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,41 @@ | ||
syntax = "proto3"; | ||
package ibc.client; | ||
|
||
option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/02-client/types"; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "google/protobuf/any.proto"; | ||
|
||
// GenesisClientState defines an identified ClientState as protobuf Any format. | ||
message GenesisClientState { | ||
string client_id = 1 [ | ||
(gogoproto.customname) = "ClientID", | ||
(gogoproto.moretags) = "yaml:\"client_id\"" | ||
]; | ||
google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; | ||
} | ||
|
||
// ClientConsensusStates defines all the stored consensus states for a given client. | ||
message ClientConsensusStates { | ||
string client_id = 1 [ | ||
(gogoproto.customname) = "ClientID" | ||
]; | ||
repeated google.protobuf.Any consensus_states = 2 [ | ||
(gogoproto.moretags) = "yaml:\"consensus_states\"" | ||
]; | ||
} | ||
|
||
// GenesisState defines the ibc client submodule's genesis state. | ||
message GenesisState { | ||
repeated GenesisClientState clients = 1 [ | ||
(gogoproto.nullable) = false | ||
]; | ||
repeated ClientConsensusStates clients_consensus = 2 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.castrepeated) = "ClientsConsensusStates", | ||
(gogoproto.moretags) = "yaml:\"clients_consensus\"" | ||
]; | ||
bool create_localhost = 3 [ | ||
(gogoproto.moretags) = "yaml:\"create_localhost\"" | ||
]; | ||
} |
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,19 @@ | ||
syntax = "proto3"; | ||
package ibc.connection; | ||
|
||
option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/03-connection/types"; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "ibc/connection/connection.proto"; | ||
|
||
|
||
// GenesisState defines the ibc connection submodule's genesis state. | ||
message GenesisState { | ||
repeated IdentifiedConnection connections = 1 [ | ||
(gogoproto.nullable) = false | ||
]; | ||
repeated ConnectionPaths client_connection_paths = 2 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.moretags) = "yaml:\"client_connection_paths\"" | ||
]; | ||
} |
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,28 @@ | ||
syntax = "proto3"; | ||
package ibc.types; | ||
|
||
option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/types"; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "ibc/client/genesis.proto"; | ||
import "ibc/connection/genesis.proto"; | ||
import "ibc/channel/genesis.proto"; | ||
|
||
// GenesisState defines the ibc module's genesis state. | ||
message GenesisState { | ||
// ICS002 - Clients genesis state | ||
ibc.client.GenesisState client_genesis = 1 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.moretags) = "yaml:\"client_genesis\"" | ||
]; | ||
// ICS003 - Connections genesis state | ||
ibc.connection.GenesisState connection_genesis = 2 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.moretags) = "yaml:\"connection_genesis\"" | ||
]; | ||
// ICS004 - Channel genesis state | ||
ibc.channel.GenesisState channel_genesis = 3 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.moretags) = "yaml:\"channel_genesis\"" | ||
]; | ||
} |
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
Oops, something went wrong.