-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1 parent
ee6b992
commit d968b6d
Showing
14 changed files
with
561 additions
and
18 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
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,43 @@ | ||
syntax = "proto3"; | ||
|
||
package ibc.core.channel.v1; | ||
|
||
option go_package = "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types"; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "ibc/core/channel/v1/channel.proto"; | ||
|
||
// Upgrade is a verifiable type which contains the relevant information | ||
// for an attempted upgrade. It provides the proposed changes to the channel | ||
// end, the timeout for this upgrade attempt and the next packet sequence | ||
// which allows the counterparty to efficiently know the highest sequence it has received. | ||
// The next sequence send is used for pruning and upgrading from unordered to ordered channels. | ||
message Upgrade { | ||
option (gogoproto.goproto_getters) = false; | ||
|
||
UpgradeFields fields = 1 [(gogoproto.nullable) = false]; | ||
Timeout timeout = 2 [(gogoproto.nullable) = false]; | ||
uint64 next_sequence_send = 3; | ||
} | ||
|
||
// UpgradeFields are the fields in a channel end which may be changed | ||
// during a channel upgrade. | ||
message UpgradeFields { | ||
option (gogoproto.goproto_getters) = false; | ||
|
||
Order ordering = 1; | ||
repeated string connection_hops = 2; | ||
string version = 3; | ||
} | ||
|
||
// ErrorReceipt defines a type which encapsulates the upgrade sequence and error associated with the | ||
// upgrade handshake failure. When a channel upgrade handshake is aborted both chains are expected to increment to the | ||
// next sequence. | ||
message ErrorReceipt { | ||
option (gogoproto.goproto_getters) = false; | ||
|
||
// the channel upgrade sequence | ||
uint64 sequence = 1; | ||
// the error message detailing the cause of failure | ||
string message = 2; | ||
} |
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,20 @@ | ||
|
||
syntax = "proto3"; | ||
package ibc.lightclients.wasm.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
|
||
option go_package = "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"; | ||
|
||
// GenesisState defines 08-wasm's keeper genesis state | ||
message GenesisState { | ||
// uploaded light client wasm contracts | ||
repeated Contract contracts = 1 [(gogoproto.nullable) = false]; | ||
} | ||
|
||
// Contract stores contract code | ||
message Contract { | ||
option (gogoproto.goproto_getters) = false; | ||
// contract byte code | ||
bytes code_bytes = 1; | ||
} |
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.lightclients.wasm.v1; | ||
|
||
import "google/api/annotations.proto"; | ||
import "cosmos/base/query/v1beta1/pagination.proto"; | ||
|
||
option go_package = "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"; | ||
|
||
// Query service for wasm module | ||
service Query { | ||
// Get all Wasm checksums | ||
rpc Checksums(QueryChecksumsRequest) returns (QueryChecksumsResponse) { | ||
option (google.api.http).get = "/ibc/lightclients/wasm/v1/checksums"; | ||
} | ||
|
||
// Get Wasm code for given checksum | ||
rpc Code(QueryCodeRequest) returns (QueryCodeResponse) { | ||
option (google.api.http).get = "/ibc/lightclients/wasm/v1/checksums/{checksum}/code"; | ||
} | ||
} | ||
|
||
// QueryChecksumsRequest is the request type for the Query/Checksums RPC method. | ||
message QueryChecksumsRequest { | ||
// pagination defines an optional pagination for the request. | ||
cosmos.base.query.v1beta1.PageRequest pagination = 1; | ||
} | ||
|
||
// QueryChecksumsResponse is the response type for the Query/Checksums RPC method. | ||
message QueryChecksumsResponse { | ||
// checksums is a list of the hex encoded checksums of all wasm codes stored. | ||
repeated string checksums = 1; | ||
|
||
// pagination defines the pagination in the response. | ||
cosmos.base.query.v1beta1.PageResponse pagination = 2; | ||
} | ||
|
||
// QueryCodeRequest is the request type for the Query/Code RPC method. | ||
message QueryCodeRequest { | ||
// checksum is a hex encoded string of the code stored. | ||
string checksum = 1; | ||
} | ||
|
||
// QueryCodeResponse is the response type for the Query/Code RPC method. | ||
message QueryCodeResponse { | ||
bytes data = 1; | ||
} |
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,66 @@ | ||
syntax = "proto3"; | ||
package ibc.lightclients.wasm.v1; | ||
|
||
option go_package = "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"; | ||
|
||
import "cosmos/msg/v1/msg.proto"; | ||
|
||
// Msg defines the ibc/08-wasm Msg service. | ||
service Msg { | ||
option (cosmos.msg.v1.service) = true; | ||
|
||
// StoreCode defines a rpc handler method for MsgStoreCode. | ||
rpc StoreCode(MsgStoreCode) returns (MsgStoreCodeResponse); | ||
|
||
// RemoveChecksum defines a rpc handler method for MsgRemoveChecksum. | ||
rpc RemoveChecksum(MsgRemoveChecksum) returns (MsgRemoveChecksumResponse); | ||
|
||
// MigrateContract defines a rpc handler method for MsgMigrateContract. | ||
rpc MigrateContract(MsgMigrateContract) returns (MsgMigrateContractResponse); | ||
} | ||
|
||
// MsgStoreCode defines the request type for the StoreCode rpc. | ||
message MsgStoreCode { | ||
option (cosmos.msg.v1.signer) = "signer"; | ||
|
||
// signer address | ||
string signer = 1; | ||
// wasm byte code of light client contract. It can be raw or gzip compressed | ||
bytes wasm_byte_code = 2; | ||
} | ||
|
||
// MsgStoreCodeResponse defines the response type for the StoreCode rpc | ||
message MsgStoreCodeResponse { | ||
// checksum is the sha256 hash of the stored code | ||
bytes checksum = 1; | ||
} | ||
|
||
// MsgRemoveChecksum defines the request type for the MsgRemoveChecksum rpc. | ||
message MsgRemoveChecksum { | ||
option (cosmos.msg.v1.signer) = "signer"; | ||
|
||
// signer address | ||
string signer = 1; | ||
// checksum is the sha256 hash to be removed from the store | ||
bytes checksum = 2; | ||
} | ||
|
||
// MsgStoreChecksumResponse defines the response type for the StoreCode rpc | ||
message MsgRemoveChecksumResponse {} | ||
|
||
// MsgMigrateContract defines the request type for the MigrateContract rpc. | ||
message MsgMigrateContract { | ||
option (cosmos.msg.v1.signer) = "signer"; | ||
|
||
// signer address | ||
string signer = 1; | ||
// the client id of the contract | ||
string client_id = 2; | ||
// checksum is the sha256 hash of the new wasm byte code for the contract | ||
bytes checksum = 3; | ||
// the json encoded message to be passed to the contract on migration | ||
bytes msg = 4; | ||
} | ||
|
||
// MsgMigrateContractResponse defines the response type for the MigrateContract rpc | ||
message MsgMigrateContractResponse {} |
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,43 @@ | ||
|
||
syntax = "proto3"; | ||
package ibc.lightclients.wasm.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "ibc/core/client/v1/client.proto"; | ||
|
||
option go_package = "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"; | ||
|
||
// Wasm light client's Client state | ||
message ClientState { | ||
option (gogoproto.goproto_getters) = false; | ||
// bytes encoding the client state of the underlying light client | ||
// implemented as a Wasm contract. | ||
bytes data = 1; | ||
bytes checksum = 2; | ||
ibc.core.client.v1.Height latest_height = 3 [(gogoproto.nullable) = false]; | ||
} | ||
|
||
// Wasm light client's ConsensusState | ||
message ConsensusState { | ||
option (gogoproto.goproto_getters) = false; | ||
// bytes encoding the consensus state of the underlying light client | ||
// implemented as a Wasm contract. | ||
bytes data = 1; | ||
} | ||
|
||
// Wasm light client message (either header(s) or misbehaviour) | ||
message ClientMessage { | ||
option (gogoproto.goproto_getters) = false; | ||
|
||
bytes data = 1; | ||
} | ||
|
||
// Checksums defines a list of all checksums that are stored | ||
// | ||
// Deprecated: This message is deprecated in favor of storing the checksums | ||
// using a Collections.KeySet. | ||
message Checksums { | ||
option deprecated = true; | ||
|
||
repeated bytes checksums = 1; | ||
} |