Add proto formatting tool (#7266)

* Add proto format option

* Add clang format options

* Fix proto format

* Fix fmt

* Fix SpacesInSquareBrackets to match with SpacesInSquareBrackets setting
This commit is contained in:
Anil Kumar Kammari 2020-09-09 03:36:54 +05:30 committed by GitHub
parent 9856327d95
commit a9547b54ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
58 changed files with 936 additions and 1190 deletions

115
.clang-format Normal file
View File

@ -0,0 +1,115 @@
---
Language: Proto
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false
IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
RawStringFormats:
- Delimiter: pb
Language: TextProto
BasedOnStyle: google
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 8
UseTab: Never
...

View File

@ -312,11 +312,14 @@ devdoc-update:
### Protobuf ### ### Protobuf ###
############################################################################### ###############################################################################
proto-all: proto-tools proto-gen proto-lint proto-check-breaking proto-swagger-gen proto-all: proto-tools proto-gen proto-lint proto-check-breaking proto-swagger-gen proto-format
proto-gen: proto-gen:
@./scripts/protocgen.sh @./scripts/protocgen.sh
proto-format:
find ./ -not -path "./third_party/*" -name *.proto -exec clang-format -i {} \;
# This generates the SDK's custom wrapper for google.protobuf.Any. It should only be run manually when needed # This generates the SDK's custom wrapper for google.protobuf.Any. It should only be run manually when needed
proto-gen-any: proto-gen-any:
@./scripts/protocgen-any.sh @./scripts/protocgen-any.sh

View File

@ -122,6 +122,14 @@ ifeq (, $(shell which protoc-gen-swagger))
else else
@echo "protoc-gen-grpc-gateway already installed; skipping..." @echo "protoc-gen-grpc-gateway already installed; skipping..."
endif endif
ifeq ($(UNAME_S),Linux)
@echo "Installing clang-format..."
sudo apt-get install clang-format
endif
ifeq ($(UNAME_S),Darwin)
@echo "Installing clang-format..."
brew install clang-format
endif
buf: buf-stamp buf: buf-stamp

View File

@ -10,8 +10,8 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types";
// for basic account functionality. Any custom account type should extend this // for basic account functionality. Any custom account type should extend this
// type for additional functionality (e.g. vesting). // type for additional functionality (e.g. vesting).
message BaseAccount { message BaseAccount {
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_stringer) = false;
option (cosmos_proto.implements_interface) = "AccountI"; option (cosmos_proto.implements_interface) = "AccountI";
bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
@ -22,13 +22,13 @@ message BaseAccount {
// ModuleAccount defines an account for modules that holds coins on a pool. // ModuleAccount defines an account for modules that holds coins on a pool.
message ModuleAccount { message ModuleAccount {
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_stringer) = false;
option (cosmos_proto.implements_interface) = "ModuleAccountI"; option (cosmos_proto.implements_interface) = "ModuleAccountI";
BaseAccount base_account = 1 [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""]; BaseAccount base_account = 1 [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""];
string name = 2; string name = 2;
repeated string permissions = 3; repeated string permissions = 3;
} }
// Params defines the parameters for the auth module. // Params defines the parameters for the auth module.
@ -43,4 +43,4 @@ message Params {
[(gogoproto.customname) = "SigVerifyCostED25519", (gogoproto.moretags) = "yaml:\"sig_verify_cost_ed25519\""]; [(gogoproto.customname) = "SigVerifyCostED25519", (gogoproto.moretags) = "yaml:\"sig_verify_cost_ed25519\""];
uint64 sig_verify_cost_secp256k1 = 5 uint64 sig_verify_cost_secp256k1 = 5
[(gogoproto.customname) = "SigVerifyCostSecp256k1", (gogoproto.moretags) = "yaml:\"sig_verify_cost_secp256k1\""]; [(gogoproto.customname) = "SigVerifyCostSecp256k1", (gogoproto.moretags) = "yaml:\"sig_verify_cost_secp256k1\""];
} }

View File

@ -10,9 +10,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types";
// GenesisState defines the auth module's genesis state. // GenesisState defines the auth module's genesis state.
message GenesisState { message GenesisState {
// params defines all the paramaters of the module. // params defines all the paramaters of the module.
Params params = 1 [ Params params = 1 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
// accounts are the accounts present at genesis. // accounts are the accounts present at genesis.
repeated google.protobuf.Any accounts = 2; repeated google.protobuf.Any accounts = 2;

View File

@ -10,35 +10,35 @@ import "cosmos_proto/cosmos.proto";
option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types";
// Query defines the gRPC querier service. // Query defines the gRPC querier service.
service Query{ service Query {
// Account returns account details based on address. // Account returns account details based on address.
rpc Account (QueryAccountRequest) returns (QueryAccountResponse) { rpc Account(QueryAccountRequest) returns (QueryAccountResponse) {
option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}"; option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}";
} }
// Params queries all parameters. // Params queries all parameters.
rpc Params (QueryParamsRequest) returns (QueryParamsResponse) { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/cosmos/auth/v1beta1/params"; option (google.api.http).get = "/cosmos/auth/v1beta1/params";
} }
} }
// QueryAccountRequest is the request type for the Query/Account RPC method. // QueryAccountRequest is the request type for the Query/Account RPC method.
message QueryAccountRequest{ message QueryAccountRequest {
// address defines the address to query for. // address defines the address to query for.
bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
} }
// QueryAccountResponse is the response type for the Query/Account RPC method. // QueryAccountResponse is the response type for the Query/Account RPC method.
message QueryAccountResponse{ message QueryAccountResponse {
// account defines the account of the corresponding address. // account defines the account of the corresponding address.
google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "AccountI"]; google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "AccountI"];
} }
// QueryParamsRequest is the request type for the Query/Params RPC method. // QueryParamsRequest is the request type for the Query/Params RPC method.
message QueryParamsRequest{ } message QueryParamsRequest {}
// QueryParamsResponse is the response type for the Query/Params RPC method. // QueryParamsResponse is the response type for the Query/Params RPC method.
message QueryParamsResponse{ message QueryParamsResponse {
// params defines the parameters of the module. // params defines the parameters of the module.
Params params = 1 [(gogoproto.nullable) = false]; Params params = 1 [(gogoproto.nullable) = false];
} }

View File

@ -52,30 +52,30 @@ message Supply {
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
} }
// DenomUnit represents a struct that describes a given // DenomUnit represents a struct that describes a given
// denomination unit of the basic token. // denomination unit of the basic token.
message DenomUnit { message DenomUnit {
// denom represents the string name of the given denom unit (e.g uatom). // denom represents the string name of the given denom unit (e.g uatom).
string denom = 1; string denom = 1;
// exponent represents power of 10 exponent that one must // exponent represents power of 10 exponent that one must
// raise the base_denom to in order to equal the given DenomUnit's denom // raise the base_denom to in order to equal the given DenomUnit's denom
// 1 denom = 1^exponent base_denom // 1 denom = 1^exponent base_denom
// (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with // (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with
// exponent = 6, thus: 1 atom = 10^6 uatom). // exponent = 6, thus: 1 atom = 10^6 uatom).
uint32 exponent = 2; uint32 exponent = 2;
// aliases is a list of string aliases for the given denom // aliases is a list of string aliases for the given denom
repeated string aliases = 3; repeated string aliases = 3;
} }
// Metadata represents a struct that describes // Metadata represents a struct that describes
// a basic token. // a basic token.
message Metadata { message Metadata {
string description = 1; string description = 1;
// denom_units represents the list of DenomUnit's for a given coin // denom_units represents the list of DenomUnit's for a given coin
repeated DenomUnit denom_units = 2; repeated DenomUnit denom_units = 2;
// base represents the base denom (should be the DenomUnit with exponent = 0). // base represents the base denom (should be the DenomUnit with exponent = 0).
string base = 3; string base = 3;
// display indicates the suggested denom that should be // display indicates the suggested denom that should be
// displayed in clients. // displayed in clients.
string display = 4; string display = 4;
} }

View File

@ -10,39 +10,28 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types";
// GenesisState defines the bank module's genesis state. // GenesisState defines the bank module's genesis state.
message GenesisState { message GenesisState {
// params defines all the paramaters of the module. // params defines all the paramaters of the module.
Params params = 1 [ Params params = 1 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
// balances is an array containing the balances of all the accounts. // balances is an array containing the balances of all the accounts.
repeated Balance balances = 2 [ repeated Balance balances = 2 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
// supply represents the total supply. // supply represents the total supply.
repeated cosmos.base.v1beta1.Coin supply = 3 [ repeated cosmos.base.v1beta1.Coin supply = 3
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
// denom_metadata defines the metadata of the differents coins. // denom_metadata defines the metadata of the differents coins.
repeated Metadata denom_metadata = 4 [ repeated Metadata denom_metadata = 4 [(gogoproto.moretags) = "yaml:\"denom_metadata\"", (gogoproto.nullable) = false];
(gogoproto.moretags) = "yaml:\"denom_metadata\"",
(gogoproto.nullable) = false
];
} }
// Balance defines an account address and balance pair used in the bank module's // Balance defines an account address and balance pair used in the bank module's
// genesis state. // genesis state.
message Balance { message Balance {
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
// address is the address of the balance holder. // address is the address of the balance holder.
bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
// coins defines the different coins this balance holds. // coins defines the different coins this balance holds.
repeated cosmos.base.v1beta1.Coin coins = 2 [ repeated cosmos.base.v1beta1.Coin coins = 2
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }

View File

@ -27,6 +27,6 @@ message MsgSend {
message MsgMultiSend { message MsgMultiSend {
option (gogoproto.equal) = true; option (gogoproto.equal) = true;
repeated Input inputs = 1 [(gogoproto.nullable) = false]; repeated Input inputs = 1 [(gogoproto.nullable) = false];
repeated Output outputs = 2 [(gogoproto.nullable) = false]; repeated Output outputs = 2 [(gogoproto.nullable) = false];
} }

View File

@ -56,7 +56,7 @@ message ABCIMessageLog {
message StringEvent { message StringEvent {
option (gogoproto.stringer) = true; option (gogoproto.stringer) = true;
string type = 1; string type = 1;
repeated Attribute attributes = 2 [(gogoproto.nullable) = false]; repeated Attribute attributes = 2 [(gogoproto.nullable) = false];
} }

View File

@ -18,14 +18,14 @@ message PublicKey {
// any_pubkey can be used for any pubkey that an app may use which is // any_pubkey can be used for any pubkey that an app may use which is
// not explicitly defined in the oneof // not explicitly defined in the oneof
google.protobuf.Any any_pubkey = 15; // 15 is largest field that occupies one byte google.protobuf.Any any_pubkey = 15; // 15 is largest field that occupies one byte
} }
} }
// PubKeyMultisigThreshold specifies a public key type which nests multiple public // PubKeyMultisigThreshold specifies a public key type which nests multiple public
// keys and a threshold // keys and a threshold
message PubKeyMultisigThreshold { message PubKeyMultisigThreshold {
uint32 threshold = 1 [(gogoproto.customname) = "K", (gogoproto.moretags) = "yaml:\"threshold\""]; uint32 threshold = 1 [(gogoproto.customname) = "K", (gogoproto.moretags) = "yaml:\"threshold\""];
repeated PublicKey public_keys = 2 [(gogoproto.customname) = "PubKeys", (gogoproto.moretags) = "yaml:\"pubkeys\""]; repeated PublicKey public_keys = 2 [(gogoproto.customname) = "PubKeys", (gogoproto.moretags) = "yaml:\"pubkeys\""];
} }
@ -34,7 +34,7 @@ message PubKeyMultisigThreshold {
// with which modes. // with which modes.
message MultiSignature { message MultiSignature {
option (gogoproto.goproto_unrecognized) = true; option (gogoproto.goproto_unrecognized) = true;
repeated bytes signatures = 1; repeated bytes signatures = 1;
} }
// CompactBitArray is an implementation of a space efficient bit array. // CompactBitArray is an implementation of a space efficient bit array.

View File

@ -11,24 +11,24 @@ option go_package = "github.com/cosmos/cosmos-sdk/types/query";
// PageRequest pagination = 2; // PageRequest pagination = 2;
// } // }
message PageRequest { message PageRequest {
// key is a value returned in PageResponse.next_key to begin // key is a value returned in PageResponse.next_key to begin
// querying the next page most efficiently. Only one of offset or key // querying the next page most efficiently. Only one of offset or key
// should be set. // should be set.
bytes key = 1; bytes key = 1;
// offset is a numeric offset that can be used when key is unavailable. // offset is a numeric offset that can be used when key is unavailable.
// It is less efficient than using key. Only one of offset or key should // It is less efficient than using key. Only one of offset or key should
// be set. // be set.
uint64 offset = 2; uint64 offset = 2;
// limit is the total number of results to be returned in the result page. // limit is the total number of results to be returned in the result page.
// If left empty it will default to a value to be set by each app. // If left empty it will default to a value to be set by each app.
uint64 limit = 3; uint64 limit = 3;
// count_total is set to true to indicate that the result set should include // count_total is set to true to indicate that the result set should include
// a count of the total number of items available for pagination in UIs. count_total // a count of the total number of items available for pagination in UIs. count_total
// is only respected when offset is used. It is ignored when key is set. // is only respected when offset is used. It is ignored when key is set.
bool count_total = 4; bool count_total = 4;
} }
// PageResponse is to be embedded in gRPC response messages where the corresponding // PageResponse is to be embedded in gRPC response messages where the corresponding
@ -39,11 +39,11 @@ message PageRequest {
// PageResponse page = 2; // PageResponse page = 2;
// } // }
message PageResponse { message PageResponse {
// next_key is the key to be passed to PageRequest.key to // next_key is the key to be passed to PageRequest.key to
// query the next page most efficiently // query the next page most efficiently
bytes next_key = 1; bytes next_key = 1;
// total is total number of results available if PageRequest.count_total // total is total number of results available if PageRequest.count_total
// was set, its value is undefined otherwise // was set, its value is undefined otherwise
uint64 total = 2; uint64 total = 2;
} }

View File

@ -7,35 +7,35 @@ option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/reflection";
// ReflectionService defines a service for interface reflection. // ReflectionService defines a service for interface reflection.
service ReflectionService { service ReflectionService {
// ListAllInterfaces lists all the interfaces registered in the interface // ListAllInterfaces lists all the interfaces registered in the interface
// registry. // registry.
rpc ListAllInterfaces(ListAllInterfacesRequest) returns (ListAllInterfacesResponse) { rpc ListAllInterfaces(ListAllInterfacesRequest) returns (ListAllInterfacesResponse) {
option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces"; option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces";
}; };
// ListImplementations list all the concrete types that implement a given // ListImplementations list all the concrete types that implement a given
// interface. // interface.
rpc ListImplementations(ListImplementationsRequest) returns (ListImplementationsResponse) { rpc ListImplementations(ListImplementationsRequest) returns (ListImplementationsResponse) {
option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces/{interface_name}/implementations"; option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces/{interface_name}/implementations";
}; };
} }
// ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. // ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC.
message ListAllInterfacesRequest { } message ListAllInterfacesRequest {}
// ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. // ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC.
message ListAllInterfacesResponse { message ListAllInterfacesResponse {
// interface_names is an array of all the registered interfaces. // interface_names is an array of all the registered interfaces.
repeated string interface_names = 1; repeated string interface_names = 1;
} }
// ListImplementationsRequest is the request type of the ListImplementations RPC. // ListImplementationsRequest is the request type of the ListImplementations RPC.
message ListImplementationsRequest { message ListImplementationsRequest {
// interface_name defines the interface to query the implementations for. // interface_name defines the interface to query the implementations for.
string interface_name = 1; string interface_name = 1;
} }
// ListImplementationsResponse is the response type of the ListImplementations RPC. // ListImplementationsResponse is the response type of the ListImplementations RPC.
message ListImplementationsResponse { message ListImplementationsResponse {
repeated string implementation_message_names = 1; repeated string implementation_message_names = 1;
} }

View File

@ -10,24 +10,24 @@ option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/simulate";
// SimulateService defines a gRPC service for simulating transactions. // SimulateService defines a gRPC service for simulating transactions.
// It may also support querying and broadcasting in the future. // It may also support querying and broadcasting in the future.
service SimulateService { service SimulateService {
// Simulate simulates executing a transaction for estimating gas usage. // Simulate simulates executing a transaction for estimating gas usage.
rpc Simulate(SimulateRequest) returns (SimulateResponse) { rpc Simulate(SimulateRequest) returns (SimulateResponse) {
option (google.api.http).post = "/cosmos/base/simulate/v1beta1/simulate"; option (google.api.http).post = "/cosmos/base/simulate/v1beta1/simulate";
} }
} }
// SimulateRequest is the request type for the SimulateServiceService.Simulate // SimulateRequest is the request type for the SimulateServiceService.Simulate
// RPC method. // RPC method.
message SimulateRequest { message SimulateRequest {
// tx is the transaction to simulate. // tx is the transaction to simulate.
cosmos.tx.v1beta1.Tx tx = 1; cosmos.tx.v1beta1.Tx tx = 1;
} }
// SimulateResponse is the response type for the // SimulateResponse is the response type for the
// SimulateServiceService.SimulateRPC method. // SimulateServiceService.SimulateRPC method.
message SimulateResponse { message SimulateResponse {
// gas_info is the information about gas used in the simulation. // gas_info is the information about gas used in the simulation.
cosmos.base.abci.v1beta1.GasInfo gas_info = 1; cosmos.base.abci.v1beta1.GasInfo gas_info = 1;
// result is the result of the simulation. // result is the result of the simulation.
cosmos.base.abci.v1beta1.Result result = 2; cosmos.base.abci.v1beta1.Result result = 2;
} }

View File

@ -8,7 +8,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/store/types";
// CommitInfo defines commit information used by the multi-store when committing // CommitInfo defines commit information used by the multi-store when committing
// a version/height. // a version/height.
message CommitInfo { message CommitInfo {
int64 version = 1; int64 version = 1;
repeated StoreInfo store_infos = 2 [(gogoproto.nullable) = false]; repeated StoreInfo store_infos = 2 [(gogoproto.nullable) = false];
} }

View File

@ -26,7 +26,5 @@ message Owner {
// CapabilityOwners defines a set of owners of a single Capability. The set of // CapabilityOwners defines a set of owners of a single Capability. The set of
// owners must be unique. // owners must be unique.
message CapabilityOwners { message CapabilityOwners {
repeated Owner owners = 1 [ repeated Owner owners = 1 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }

View File

@ -10,12 +10,9 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/capability/types";
message GenesisOwners { message GenesisOwners {
// index is the index of the capability owner. // index is the index of the capability owner.
uint64 index = 1; uint64 index = 1;
// index_owners are the owners at the given index. // index_owners are the owners at the given index.
CapabilityOwners index_owners = 2[ CapabilityOwners index_owners = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"index_owners\""];
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"index_owners\""
];
} }
// GenesisState defines the capability module's genesis state. // GenesisState defines the capability module's genesis state.
@ -25,7 +22,5 @@ message GenesisState {
// owners represents a map from index to owners of the capability index // owners represents a map from index to owners of the capability index
// index key is string to allow amino marshalling. // index key is string to allow amino marshalling.
repeated GenesisOwners owners = 2 [ repeated GenesisOwners owners = 2 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }

View File

@ -10,8 +10,6 @@ import "cosmos/base/v1beta1/coin.proto";
message GenesisState { message GenesisState {
// constant_fee is the fee used to verify the invariant in the crisis // constant_fee is the fee used to verify the invariant in the crisis
// module. // module.
cosmos.base.v1beta1.Coin constant_fee = 3 [ cosmos.base.v1beta1.Coin constant_fee = 3
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"constant_fee\""];
(gogoproto.moretags) = "yaml:\"constant_fee\""
];
} }

View File

@ -9,7 +9,7 @@ import "gogoproto/gogo.proto";
message MsgVerifyInvariant { message MsgVerifyInvariant {
option (gogoproto.equal) = true; option (gogoproto.equal) = true;
bytes sender = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; bytes sender = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
string invariant_module_name = 2 [(gogoproto.moretags) = "yaml:\"invariant_module_name\""]; string invariant_module_name = 2 [(gogoproto.moretags) = "yaml:\"invariant_module_name\""];
string invariant_route = 3 [(gogoproto.moretags) = "yaml:\"invariant_route\""]; string invariant_route = 3 [(gogoproto.moretags) = "yaml:\"invariant_route\""];
} }

View File

@ -52,20 +52,16 @@ message ValidatorHistoricalRewards {
// period for a validator kept as a running counter and incremented // period for a validator kept as a running counter and incremented
// each block as long as the validator's tokens remain constant. // each block as long as the validator's tokens remain constant.
message ValidatorCurrentRewards { message ValidatorCurrentRewards {
repeated cosmos.base.v1beta1.DecCoin rewards = 1 [ repeated cosmos.base.v1beta1.DecCoin rewards = 1
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
uint64 period = 2; uint64 period = 2;
} }
// ValidatorAccumulatedCommission represents accumulated commission // ValidatorAccumulatedCommission represents accumulated commission
// for a validator kept as a running counter, can be withdrawn at any time. // for a validator kept as a running counter, can be withdrawn at any time.
message ValidatorAccumulatedCommission { message ValidatorAccumulatedCommission {
repeated cosmos.base.v1beta1.DecCoin commission = 1 [ repeated cosmos.base.v1beta1.DecCoin commission = 1
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }
// ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards // ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards
@ -84,10 +80,7 @@ message ValidatorOutstandingRewards {
// for delegations which are withdrawn after a slash has occurred. // for delegations which are withdrawn after a slash has occurred.
message ValidatorSlashEvent { message ValidatorSlashEvent {
uint64 validator_period = 1 [(gogoproto.moretags) = "yaml:\"validator_period\""]; uint64 validator_period = 1 [(gogoproto.moretags) = "yaml:\"validator_period\""];
string fraction = 2 [ string fraction = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
} }
// ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. // ValidatorSlashEvents is a collection of ValidatorSlashEvent messages.
@ -110,15 +103,13 @@ message FeePool {
// together with how many coins are proposed to be spent, and to which // together with how many coins are proposed to be spent, and to which
// recipient account. // recipient account.
message CommunityPoolSpendProposal { message CommunityPoolSpendProposal {
option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_stringer) = false;
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
string title = 1; string title = 1;
string description = 2; string description = 2;
bytes recipient = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; bytes recipient = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
repeated cosmos.base.v1beta1.Coin amount = 4 [ repeated cosmos.base.v1beta1.Coin amount = 4
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
} }
// DelegatorStartingInfo represents the starting info for a delegator reward period. // DelegatorStartingInfo represents the starting info for a delegator reward period.
@ -135,8 +126,7 @@ message DelegatorStartingInfo {
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false (gogoproto.nullable) = false
]; ];
uint64 height = 3 uint64 height = 3 [(gogoproto.moretags) = "yaml:\"creation_height\"", (gogoproto.jsontag) = "creation_height"];
[(gogoproto.moretags) = "yaml:\"creation_height\"", (gogoproto.jsontag) = "creation_height"];
} }
// DelegationDelegatorReward represents the properties // DelegationDelegatorReward represents the properties
@ -147,20 +137,18 @@ message DelegationDelegatorReward {
(gogoproto.moretags) = "yaml:\"validator_address\"" (gogoproto.moretags) = "yaml:\"validator_address\""
]; ];
repeated cosmos.base.v1beta1.DecCoin reward = 2 [ repeated cosmos.base.v1beta1.DecCoin reward = 2
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }
// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal with a deposit // CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal with a deposit
message CommunityPoolSpendProposalWithDeposit { message CommunityPoolSpendProposalWithDeposit {
string title = 1 [(gogoproto.moretags) = "yaml:\"title\""]; string title = 1 [(gogoproto.moretags) = "yaml:\"title\""];
string description = 2 [(gogoproto.moretags) = "yaml:\"description\""]; string description = 2 [(gogoproto.moretags) = "yaml:\"description\""];
bytes recipient = 3 [ bytes recipient = 3 [
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress",
(gogoproto.moretags) = "yaml:\"recipient\"" (gogoproto.moretags) = "yaml:\"recipient\""
]; ];
string amount = 4 [(gogoproto.moretags) = "yaml:\"amount\""]; string amount = 4 [(gogoproto.moretags) = "yaml:\"amount\""];
string deposit = 5 [(gogoproto.moretags) = "yaml:\"deposit\""]; string deposit = 5 [(gogoproto.moretags) = "yaml:\"deposit\""];
} }

View File

@ -49,10 +49,8 @@ message ValidatorAccumulatedCommissionRecord {
]; ];
// accumulated is the accumulated commission of a validator. // accumulated is the accumulated commission of a validator.
ValidatorAccumulatedCommission accumulated = 2 [ ValidatorAccumulatedCommission accumulated = 2
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"accumulated\""];
(gogoproto.moretags) = "yaml:\"accumulated\""
];
} }
// ValidatorHistoricalRewardsRecord is used for import / export via genesis json. // ValidatorHistoricalRewardsRecord is used for import / export via genesis json.
@ -67,10 +65,7 @@ message ValidatorHistoricalRewardsRecord {
uint64 period = 2; uint64 period = 2;
// rewards defines the historical rewards of a validator. // rewards defines the historical rewards of a validator.
ValidatorHistoricalRewards rewards = 3[ ValidatorHistoricalRewards rewards = 3 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"rewards\""];
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"rewards\""
];
} }
// ValidatorCurrentRewardsRecord is used for import / export via genesis json. // ValidatorCurrentRewardsRecord is used for import / export via genesis json.
@ -82,10 +77,7 @@ message ValidatorCurrentRewardsRecord {
]; ];
// rewards defines the current rewards of a validator. // rewards defines the current rewards of a validator.
ValidatorCurrentRewards rewards = 2[ ValidatorCurrentRewards rewards = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"rewards\""];
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"rewards\""
];
} }
// DelegatorStartingInfoRecord used for import / export via genesis json. // DelegatorStartingInfoRecord used for import / export via genesis json.
@ -103,10 +95,8 @@ message DelegatorStartingInfoRecord {
]; ];
// starting_info defines the starting info of a delegator. // starting_info defines the starting info of a delegator.
DelegatorStartingInfo starting_info = 3 [ DelegatorStartingInfo starting_info = 3
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"starting_info\""];
(gogoproto.moretags) = "yaml:\"starting_info\""
];
} }
// ValidatorSlashEventRecord is used for import / export via genesis json. // ValidatorSlashEventRecord is used for import / export via genesis json.
@ -121,31 +111,20 @@ message ValidatorSlashEventRecord {
// period is the period of the slash event. // period is the period of the slash event.
uint64 period = 3; uint64 period = 3;
// event describes the slash event. // event describes the slash event.
ValidatorSlashEvent event = 4 [ ValidatorSlashEvent event = 4 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"event\""];
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"event\""
];
} }
// GenesisState defines the distribution module's genesis state. // GenesisState defines the distribution module's genesis state.
message GenesisState { message GenesisState {
// params defines all the paramaters of the module. // params defines all the paramaters of the module.
Params params = 1 [ Params params = 1 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"params\""];
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"params\""
];
// fee_pool defines the fee pool at genesis. // fee_pool defines the fee pool at genesis.
FeePool fee_pool = 2 [ FeePool fee_pool = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"fee_pool\""];
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"fee_pool\""
];
// fee_pool defines the delegator withdraw infos at genesis. // fee_pool defines the delegator withdraw infos at genesis.
repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3 [ repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"delegator_withdraw_infos\""];
(gogoproto.moretags) = "yaml:\"delegator_withdraw_infos\""
];
// fee_pool defines the previous proposer at genesis. // fee_pool defines the previous proposer at genesis.
bytes previous_proposer = 4 [ bytes previous_proposer = 4 [
@ -154,38 +133,26 @@ message GenesisState {
]; ];
// fee_pool defines the outstanding rewards of all validators at genesis. // fee_pool defines the outstanding rewards of all validators at genesis.
repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5 [ repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"outstanding_rewards\""];
(gogoproto.moretags) = "yaml:\"outstanding_rewards\""
];
// fee_pool defines the accumulated commisions of all validators at genesis. // fee_pool defines the accumulated commisions of all validators at genesis.
repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6 [ repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_accumulated_commissions\""];
(gogoproto.moretags) = "yaml:\"validator_accumulated_commissions\""
];
// fee_pool defines the historical rewards of all validators at genesis. // fee_pool defines the historical rewards of all validators at genesis.
repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7 [ repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_historical_rewards\""];
(gogoproto.moretags) = "yaml:\"validator_historical_rewards\""
];
// fee_pool defines the current rewards of all validators at genesis. // fee_pool defines the current rewards of all validators at genesis.
repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8 [ repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_current_rewards\""];
(gogoproto.moretags) = "yaml:\"validator_current_rewards\""
];
// fee_pool defines the delegator starting infos at genesis. // fee_pool defines the delegator starting infos at genesis.
repeated DelegatorStartingInfoRecord delegator_starting_infos = 9 [ repeated DelegatorStartingInfoRecord delegator_starting_infos = 9
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"delegator_starting_infos\""];
(gogoproto.moretags) = "yaml:\"delegator_starting_infos\""
];
// fee_pool defines the validator slash events at genesis. // fee_pool defines the validator slash events at genesis.
repeated ValidatorSlashEventRecord validator_slash_events = 10 [ repeated ValidatorSlashEventRecord validator_slash_events = 10
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_slash_events\""];
(gogoproto.moretags) = "yaml:\"validator_slash_events\""
];
} }

View File

@ -17,48 +17,50 @@ service Query {
} }
// ValidatorOutstandingRewards queries rewards of a validator address. // ValidatorOutstandingRewards queries rewards of a validator address.
rpc ValidatorOutstandingRewards(QueryValidatorOutstandingRewardsRequest) returns (QueryValidatorOutstandingRewardsResponse) { rpc ValidatorOutstandingRewards(QueryValidatorOutstandingRewardsRequest)
returns (QueryValidatorOutstandingRewardsResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards"; option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards";
} }
// ValidatorCommission queries accumulated commission for a validator. // ValidatorCommission queries accumulated commission for a validator.
rpc ValidatorCommission (QueryValidatorCommissionRequest) returns (QueryValidatorCommissionResponse) { rpc ValidatorCommission(QueryValidatorCommissionRequest) returns (QueryValidatorCommissionResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/commission"; option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/commission";
} }
// ValidatorSlashes queries slash events of a validator. // ValidatorSlashes queries slash events of a validator.
rpc ValidatorSlashes (QueryValidatorSlashesRequest) returns (QueryValidatorSlashesResponse) { rpc ValidatorSlashes(QueryValidatorSlashesRequest) returns (QueryValidatorSlashesResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/slashes"; option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/slashes";
} }
// DelegationRewards queries the total rewards accrued by a delegation. // DelegationRewards queries the total rewards accrued by a delegation.
rpc DelegationRewards (QueryDelegationRewardsRequest) returns (QueryDelegationRewardsResponse) { rpc DelegationRewards(QueryDelegationRewardsRequest) returns (QueryDelegationRewardsResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}"; option (google.api.http).get =
"/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}";
} }
// DelegationTotalRewards queries the total rewards accrued by a each validator. // DelegationTotalRewards queries the total rewards accrued by a each validator.
rpc DelegationTotalRewards (QueryDelegationTotalRewardsRequest) returns (QueryDelegationTotalRewardsResponse) { rpc DelegationTotalRewards(QueryDelegationTotalRewardsRequest) returns (QueryDelegationTotalRewardsResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards"; option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards";
} }
// DelegatorValidators queries the validators of a delegator. // DelegatorValidators queries the validators of a delegator.
rpc DelegatorValidators (QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) { rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators"; option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators";
} }
// DelegatorWithdrawAddress queries withdraw address of a delegator. // DelegatorWithdrawAddress queries withdraw address of a delegator.
rpc DelegatorWithdrawAddress (QueryDelegatorWithdrawAddressRequest) returns (QueryDelegatorWithdrawAddressResponse) { rpc DelegatorWithdrawAddress(QueryDelegatorWithdrawAddressRequest) returns (QueryDelegatorWithdrawAddressResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address"; option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address";
} }
// CommunityPool queries the community pool coins. // CommunityPool queries the community pool coins.
rpc CommunityPool (QueryCommunityPoolRequest) returns (QueryCommunityPoolResponse) { rpc CommunityPool(QueryCommunityPoolRequest) returns (QueryCommunityPoolResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/community_pool"; option (google.api.http).get = "/cosmos/distribution/v1beta1/community_pool";
} }
} }
// QueryParamsRequest is the request type for the Query/Params RPC method. // QueryParamsRequest is the request type for the Query/Params RPC method.
message QueryParamsRequest { } message QueryParamsRequest {}
// QueryParamsResponse is the response type for the Query/Params RPC method. // QueryParamsResponse is the response type for the Query/Params RPC method.
message QueryParamsResponse { message QueryParamsResponse {
@ -112,19 +114,17 @@ message QueryValidatorSlashesResponse {
// QueryDelegationRewardsRequest is the request type for the Query/DelegationRewards RPC method. // QueryDelegationRewardsRequest is the request type for the Query/DelegationRewards RPC method.
message QueryDelegationRewardsRequest { message QueryDelegationRewardsRequest {
// delegator_address defines the delegator address to query for. // delegator_address defines the delegator address to query for.
bytes delegator_address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; bytes delegator_address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
// validator_address defines the validator address to query for. // validator_address defines the validator address to query for.
bytes validator_address = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"]; bytes validator_address = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"];
} }
// QueryDelegationRewardsResponse is the response type for the Query/DelegationRewards RPC method. // QueryDelegationRewardsResponse is the response type for the Query/DelegationRewards RPC method.
message QueryDelegationRewardsResponse { message QueryDelegationRewardsResponse {
// rewards defines the rewards accrued by a delegation. // rewards defines the rewards accrued by a delegation.
repeated cosmos.base.v1beta1.DecCoin rewards = 1 [ repeated cosmos.base.v1beta1.DecCoin rewards = 1
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"];
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"
];
} }
// QueryDelegationTotalRewardsRequest is the request type for the Query/DelegationTotalRewards RPC method. // QueryDelegationTotalRewardsRequest is the request type for the Query/DelegationTotalRewards RPC method.
@ -138,10 +138,8 @@ message QueryDelegationTotalRewardsResponse {
// rewards defines all the rewards accrued by a delegator. // rewards defines all the rewards accrued by a delegator.
repeated DelegationDelegatorReward rewards = 1 [(gogoproto.nullable) = false]; repeated DelegationDelegatorReward rewards = 1 [(gogoproto.nullable) = false];
// total defines the sum of all the rewards. // total defines the sum of all the rewards.
repeated cosmos.base.v1beta1.DecCoin total = 2 [ repeated cosmos.base.v1beta1.DecCoin total = 2
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"];
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"
];
} }
// QueryDelegatorValidatorsRequest is the request type for the Query/DelegatorValidators RPC method. // QueryDelegatorValidatorsRequest is the request type for the Query/DelegatorValidators RPC method.
@ -174,8 +172,6 @@ message QueryCommunityPoolRequest {}
// QueryCommunityPoolResponse is the response type for the Query/CommunityPool RPC method. // QueryCommunityPoolResponse is the response type for the Query/CommunityPool RPC method.
message QueryCommunityPoolResponse { message QueryCommunityPoolResponse {
// pool defines community pool's coins. // pool defines community pool's coins.
repeated cosmos.base.v1beta1.DecCoin pool = 1 [ repeated cosmos.base.v1beta1.DecCoin pool = 1
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }

View File

@ -44,9 +44,7 @@ message MsgWithdrawValidatorCommission {
// MsgFundCommunityPool allows an account to directly // MsgFundCommunityPool allows an account to directly
// fund the community pool. // fund the community pool.
message MsgFundCommunityPool { message MsgFundCommunityPool {
repeated cosmos.base.v1beta1.Coin amount = 1 [ repeated cosmos.base.v1beta1.Coin amount = 1
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
bytes depositor = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; bytes depositor = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
} }

View File

@ -24,7 +24,7 @@ service Query {
// QueryEvidenceRequest is the request type for the Query/Evidence RPC method. // QueryEvidenceRequest is the request type for the Query/Evidence RPC method.
message QueryEvidenceRequest { message QueryEvidenceRequest {
// evidence_hash defines the hash of the requested evidence. // evidence_hash defines the hash of the requested evidence.
bytes evidence_hash = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; bytes evidence_hash = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"];
} }
// QueryEvidenceResponse is the response type for the Query/Evidence RPC method. // QueryEvidenceResponse is the response type for the Query/Evidence RPC method.

View File

@ -11,7 +11,7 @@ import "cosmos_proto/cosmos.proto";
// MsgSubmitEvidence represents a message that supports submitting arbitrary // MsgSubmitEvidence represents a message that supports submitting arbitrary
// Evidence of misbehavior such as equivocation or counterfactual signing. // Evidence of misbehavior such as equivocation or counterfactual signing.
message MsgSubmitEvidence { message MsgSubmitEvidence {
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
bytes submitter = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; bytes submitter = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
google.protobuf.Any evidence = 2 [(cosmos_proto.accepts_interface) = "Evidence"]; google.protobuf.Any evidence = 2 [(cosmos_proto.accepts_interface) = "Evidence"];
} }

View File

@ -10,7 +10,7 @@ message GenesisState {
// gen_txs defines the genesis transactions. // gen_txs defines the genesis transactions.
repeated bytes gen_txs = 1 [ repeated bytes gen_txs = 1 [
(gogoproto.casttype) = "encoding/json.RawMessage", (gogoproto.casttype) = "encoding/json.RawMessage",
(gogoproto.jsontag) = "gentxs", (gogoproto.jsontag) = "gentxs",
(gogoproto.moretags) = "yaml:\"gentxs\"" (gogoproto.moretags) = "yaml:\"gentxs\""
]; ];
} }

View File

@ -8,39 +8,19 @@ import "cosmos/gov/v1beta1/gov.proto";
option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types";
// GenesisState defines the gov module's genesis state. // GenesisState defines the gov module's genesis state.
message GenesisState{ message GenesisState {
// starting_proposal_id is the ID of the starting proposal. // starting_proposal_id is the ID of the starting proposal.
uint64 starting_proposal_id = 1 [ uint64 starting_proposal_id = 1 [(gogoproto.moretags) = "yaml:\"starting_proposal_id\""];
(gogoproto.moretags) = "yaml:\"starting_proposal_id\""
];
// deposits defines all the deposits present at genesis. // deposits defines all the deposits present at genesis.
repeated Deposit deposits = 2 [ repeated Deposit deposits = 2 [(gogoproto.castrepeated) = "Deposits", (gogoproto.nullable) = false];
(gogoproto.castrepeated) = "Deposits",
(gogoproto.nullable) = false
];
// votes defines all the votes present at genesis. // votes defines all the votes present at genesis.
repeated Vote votes = 3 [ repeated Vote votes = 3 [(gogoproto.castrepeated) = "Votes", (gogoproto.nullable) = false];
(gogoproto.castrepeated) = "Votes",
(gogoproto.nullable) = false
];
// proposals defines all the proposals present at genesis. // proposals defines all the proposals present at genesis.
repeated Proposal proposals = 4 [ repeated Proposal proposals = 4 [(gogoproto.castrepeated) = "Proposals", (gogoproto.nullable) = false];
(gogoproto.castrepeated) = "Proposals",
(gogoproto.nullable) = false
];
// params defines all the paramaters of related to deposit. // params defines all the paramaters of related to deposit.
DepositParams deposit_params = 5 [ DepositParams deposit_params = 5 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"deposit_params\""];
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"deposit_params\""
];
// params defines all the paramaters of related to voting. // params defines all the paramaters of related to voting.
VotingParams voting_params = 6 [ VotingParams voting_params = 6 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_params\""];
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"voting_params\""
];
// params defines all the paramaters of related to tally. // params defines all the paramaters of related to tally.
TallyParams tally_params = 7 [ TallyParams tally_params = 7 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"tally_params\""];
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"tally_params\""
];
} }

View File

@ -15,7 +15,7 @@ option (gogoproto.goproto_getters_all) = false;
// VoteOption enumerates the valid vote options for a given governance proposal. // VoteOption enumerates the valid vote options for a given governance proposal.
enum VoteOption { enum VoteOption {
option (gogoproto.goproto_enum_prefix) = false; option (gogoproto.goproto_enum_prefix) = false;
// VOTE_OPTION_UNSPECIFIED defines a no-op vote option. // VOTE_OPTION_UNSPECIFIED defines a no-op vote option.
VOTE_OPTION_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "OptionEmpty"]; VOTE_OPTION_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "OptionEmpty"];
@ -44,8 +44,8 @@ message TextProposal {
message Deposit { message Deposit {
option (gogoproto.equal) = true; option (gogoproto.equal) = true;
uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""];
bytes depositor = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; bytes depositor = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
repeated cosmos.base.v1beta1.Coin amount = 3 repeated cosmos.base.v1beta1.Coin amount = 3
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
} }
@ -54,10 +54,7 @@ message Deposit {
message Proposal { message Proposal {
option (gogoproto.equal) = true; option (gogoproto.equal) = true;
uint64 proposal_id = 1 [ uint64 proposal_id = 1 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = "yaml:\"id\""];
(gogoproto.jsontag) = "id",
(gogoproto.moretags) = "yaml:\"id\""
];
google.protobuf.Any content = 2 [(cosmos_proto.accepts_interface) = "Content"]; google.protobuf.Any content = 2 [(cosmos_proto.accepts_interface) = "Content"];
ProposalStatus status = 3 [(gogoproto.moretags) = "yaml:\"proposal_status\""]; ProposalStatus status = 3 [(gogoproto.moretags) = "yaml:\"proposal_status\""];
TallyResult final_tally_result = 4 TallyResult final_tally_result = 4
@ -79,7 +76,7 @@ message Proposal {
// ProposalStatus enumerates the valid statuses of a proposal. // ProposalStatus enumerates the valid statuses of a proposal.
enum ProposalStatus { enum ProposalStatus {
option (gogoproto.goproto_enum_prefix) = false; option (gogoproto.goproto_enum_prefix) = false;
// PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. // PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status.
PROPOSAL_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "StatusNil"]; PROPOSAL_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "StatusNil"];
@ -154,22 +151,22 @@ message TallyParams {
// Minimum percentage of total stake needed to vote for a result to be considered valid. // Minimum percentage of total stake needed to vote for a result to be considered valid.
bytes quorum = 1 [ bytes quorum = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false, (gogoproto.nullable) = false,
(gogoproto.jsontag) = "quorum,omitempty" (gogoproto.jsontag) = "quorum,omitempty"
]; ];
// Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.
bytes threshold = 2 [ bytes threshold = 2 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false, (gogoproto.nullable) = false,
(gogoproto.jsontag) = "threshold,omitempty" (gogoproto.jsontag) = "threshold,omitempty"
]; ];
// Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. // Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3.
bytes veto_threshold = 3 [ bytes veto_threshold = 3 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false, (gogoproto.nullable) = false,
(gogoproto.jsontag) = "veto_threshold,omitempty", (gogoproto.jsontag) = "veto_threshold,omitempty",
(gogoproto.moretags) = "yaml:\"veto_threshold\"" (gogoproto.moretags) = "yaml:\"veto_threshold\""
]; ];
} }

View File

@ -11,12 +11,12 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types";
// Query defines the gRPC querier service for gov module // Query defines the gRPC querier service for gov module
service Query { service Query {
// Proposal queries proposal details based on ProposalID. // Proposal queries proposal details based on ProposalID.
rpc Proposal (QueryProposalRequest) returns (QueryProposalResponse) { rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse) {
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}"; option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}";
} }
// Proposals queries all proposals based on given status. // Proposals queries all proposals based on given status.
rpc Proposals (QueryProposalsRequest) returns (QueryProposalsResponse) { rpc Proposals(QueryProposalsRequest) returns (QueryProposalsResponse) {
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals"; option (google.api.http).get = "/cosmos/gov/v1beta1/proposals";
} }
@ -26,7 +26,7 @@ service Query {
} }
// Votes queries votes of a given proposal. // Votes queries votes of a given proposal.
rpc Votes (QueryVotesRequest) returns (QueryVotesResponse) { rpc Votes(QueryVotesRequest) returns (QueryVotesResponse) {
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes"; option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes";
} }
@ -65,10 +65,10 @@ message QueryProposalResponse {
// QueryProposalsRequest is the request type for the Query/Proposals RPC method. // QueryProposalsRequest is the request type for the Query/Proposals RPC method.
message QueryProposalsRequest { message QueryProposalsRequest {
// proposal_status defines the status of the proposals. // proposal_status defines the status of the proposals.
ProposalStatus proposal_status = 1 ; ProposalStatus proposal_status = 1;
// voter defines the voter address for the proposals. // voter defines the voter address for the proposals.
bytes voter = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; bytes voter = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
// depositor defines the deposit addresses from the proposals. // depositor defines the deposit addresses from the proposals.
bytes depositor = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; bytes depositor = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
@ -89,9 +89,9 @@ message QueryProposalsResponse {
message QueryVoteRequest { message QueryVoteRequest {
// proposal_id defines the unique id of the proposal. // proposal_id defines the unique id of the proposal.
uint64 proposal_id = 1; uint64 proposal_id = 1;
// voter defines the oter address for the proposals. // voter defines the oter address for the proposals.
bytes voter = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; bytes voter = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
} }
// QueryVoteResponse is the response type for the Query/Vote RPC method. // QueryVoteResponse is the response type for the Query/Vote RPC method.
@ -119,7 +119,7 @@ message QueryVotesResponse {
} }
// QueryParamsRequest is the request type for the Query/Params RPC method. // QueryParamsRequest is the request type for the Query/Params RPC method.
message QueryParamsRequest { message QueryParamsRequest {
// params_type defines which parameters to query for, can be one of "voting", "tallying" or "deposit". // params_type defines which parameters to query for, can be one of "voting", "tallying" or "deposit".
string params_type = 1; string params_type = 1;
} }
@ -138,7 +138,7 @@ message QueryParamsResponse {
message QueryDepositRequest { message QueryDepositRequest {
// proposal_id defines the unique id of the proposal. // proposal_id defines the unique id of the proposal.
uint64 proposal_id = 1; uint64 proposal_id = 1;
// depositor defines the deposit addresses from the proposals. // depositor defines the deposit addresses from the proposals.
bytes depositor = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; bytes depositor = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
} }
@ -176,4 +176,4 @@ message QueryTallyResultRequest {
message QueryTallyResultResponse { message QueryTallyResultResponse {
// tally defines the requested tally. // tally defines the requested tally.
TallyResult tally = 1 [(gogoproto.nullable) = false]; TallyResult tally = 1 [(gogoproto.nullable) = false];
} }

View File

@ -17,7 +17,7 @@ option (gogoproto.goproto_getters_all) = false;
message MsgSubmitProposal { message MsgSubmitProposal {
option (gogoproto.equal) = true; option (gogoproto.equal) = true;
google.protobuf.Any content = 1 [(cosmos_proto.accepts_interface) = "Content"]; google.protobuf.Any content = 1 [(cosmos_proto.accepts_interface) = "Content"];
repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [ repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [
(gogoproto.nullable) = false, (gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
@ -30,23 +30,17 @@ message MsgSubmitProposal {
message MsgVote { message MsgVote {
option (gogoproto.equal) = true; option (gogoproto.equal) = true;
uint64 proposal_id = 1 [ uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""];
(gogoproto.jsontag) = "proposal_id", bytes voter = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
(gogoproto.moretags) = "yaml:\"proposal_id\"" VoteOption option = 3;
];
bytes voter = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
VoteOption option = 3;
} }
// MsgDeposit defines a message to submit a deposit to an existing proposal. // MsgDeposit defines a message to submit a deposit to an existing proposal.
message MsgDeposit { message MsgDeposit {
option (gogoproto.equal) = true; option (gogoproto.equal) = true;
uint64 proposal_id = 1 [ uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""];
(gogoproto.jsontag) = "proposal_id", bytes depositor = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
(gogoproto.moretags) = "yaml:\"proposal_id\""
];
bytes depositor = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
repeated cosmos.base.v1beta1.Coin amount = 3 repeated cosmos.base.v1beta1.Coin amount = 3
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
} }

View File

@ -9,12 +9,8 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types";
// GenesisState defines the mint module's genesis state. // GenesisState defines the mint module's genesis state.
message GenesisState { message GenesisState {
// minter is a space for holding current inflation information. // minter is a space for holding current inflation information.
Minter minter = 1 [ Minter minter = 1 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
// params defines all the paramaters of the module. // params defines all the paramaters of the module.
Params params = 2 [ Params params = 2 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }

View File

@ -10,23 +10,23 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types";
// Query provides defines the gRPC querier service. // Query provides defines the gRPC querier service.
service Query { service Query {
// Params returns the total set of minting parameters. // Params returns the total set of minting parameters.
rpc Params (QueryParamsRequest) returns (QueryParamsResponse) { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/cosmos/mint/v1beta1/params"; option (google.api.http).get = "/cosmos/mint/v1beta1/params";
} }
// Inflation returns the current minting inflation value. // Inflation returns the current minting inflation value.
rpc Inflation (QueryInflationRequest) returns (QueryInflationResponse) { rpc Inflation(QueryInflationRequest) returns (QueryInflationResponse) {
option (google.api.http).get = "/cosmos/mint/v1beta1/inflation"; option (google.api.http).get = "/cosmos/mint/v1beta1/inflation";
} }
// AnnualProvisions current minting annual provisions value. // AnnualProvisions current minting annual provisions value.
rpc AnnualProvisions (QueryAnnualProvisionsRequest) returns (QueryAnnualProvisionsResponse) { rpc AnnualProvisions(QueryAnnualProvisionsRequest) returns (QueryAnnualProvisionsResponse) {
option (google.api.http).get = "/cosmos/mint/v1beta1/annual_provisions"; option (google.api.http).get = "/cosmos/mint/v1beta1/annual_provisions";
} }
} }
// QueryParamsRequest is the request type for the Query/Params RPC method. // QueryParamsRequest is the request type for the Query/Params RPC method.
message QueryParamsRequest { } message QueryParamsRequest {}
// QueryParamsResponse is the response type for the Query/Params RPC method. // QueryParamsResponse is the response type for the Query/Params RPC method.
message QueryParamsResponse { message QueryParamsResponse {
@ -35,7 +35,7 @@ message QueryParamsResponse {
} }
// QueryInflationRequest is the request type for the Query/Inflation RPC method. // QueryInflationRequest is the request type for the Query/Inflation RPC method.
message QueryInflationRequest { } message QueryInflationRequest {}
// QueryInflationResponse is the response type for the Query/Inflation RPC method. // QueryInflationResponse is the response type for the Query/Inflation RPC method.
message QueryInflationResponse { message QueryInflationResponse {
@ -44,10 +44,11 @@ message QueryInflationResponse {
} }
// QueryAnnualProvisionsRequest is the request type for the Query/AnnualProvisions RPC method. // QueryAnnualProvisionsRequest is the request type for the Query/AnnualProvisions RPC method.
message QueryAnnualProvisionsRequest { } message QueryAnnualProvisionsRequest {}
// QueryAnnualProvisionsResponse is the response type for the Query/AnnualProvisions RPC method. // QueryAnnualProvisionsResponse is the response type for the Query/AnnualProvisions RPC method.
message QueryAnnualProvisionsResponse { message QueryAnnualProvisionsResponse {
// annual_provisions is the current minting annual provisions value. // annual_provisions is the current minting annual provisions value.
bytes annual_provisions = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; bytes annual_provisions = 1
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
} }

View File

@ -11,9 +11,9 @@ message ParameterChangeProposal {
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_stringer) = false;
string title = 1; string title = 1;
string description = 2; string description = 2;
repeated ParamChange changes = 3 [(gogoproto.nullable) = false]; repeated ParamChange changes = 3 [(gogoproto.nullable) = false];
} }
// ParamChange defines an individual parameter change, for use in ParameterChangeProposal. // ParamChange defines an individual parameter change, for use in ParameterChangeProposal.

View File

@ -8,24 +8,24 @@ import "cosmos/params/v1beta1/params.proto";
option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/proposal"; option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/proposal";
// Query defines the gRPC querier service. // Query defines the gRPC querier service.
service Query{ service Query {
// Params queries a specific parameter of a module, given its subspace and key. // Params queries a specific parameter of a module, given its subspace and key.
rpc Params (QueryParamsRequest) returns (QueryParamsResponse) { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/cosmos/params/v1beta1/params"; option (google.api.http).get = "/cosmos/params/v1beta1/params";
} }
} }
// QueryParamsRequest is request type for the Query/Params RPC method. // QueryParamsRequest is request type for the Query/Params RPC method.
message QueryParamsRequest{ message QueryParamsRequest {
// subspace defines the module to query the parameter for. // subspace defines the module to query the parameter for.
string subspace = 1; string subspace = 1;
// key defines the key of the parameter in the subspace. // key defines the key of the parameter in the subspace.
string key = 2; string key = 2;
} }
// QueryParamsResponse is response type for the Query/Params RPC method. // QueryParamsResponse is response type for the Query/Params RPC method.
message QueryParamsResponse{ message QueryParamsResponse {
// param defines the queried parameter. // param defines the queried parameter.
ParamChange param = 1 [(gogoproto.nullable) = false]; ParamChange param = 1 [(gogoproto.nullable) = false];
} }

View File

@ -1,7 +1,7 @@
syntax = "proto3"; syntax = "proto3";
package cosmos.slashing.v1beta1; package cosmos.slashing.v1beta1;
option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types";
import "gogoproto/gogo.proto"; import "gogoproto/gogo.proto";
import "cosmos/slashing/v1beta1/slashing.proto"; import "cosmos/slashing/v1beta1/slashing.proto";
@ -9,23 +9,17 @@ import "cosmos/slashing/v1beta1/slashing.proto";
// GenesisState defines the slashing module's genesis state. // GenesisState defines the slashing module's genesis state.
message GenesisState { message GenesisState {
// params defines all the paramaters of related to deposit. // params defines all the paramaters of related to deposit.
Params params = 1 [ Params params = 1 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
// signing_infos represents a map between validator addresses and their // signing_infos represents a map between validator addresses and their
// signing infos. // signing infos.
repeated SigningInfo signing_infos = 2 [ repeated SigningInfo signing_infos = 2
(gogoproto.moretags) = "yaml:\"signing_infos\"", [(gogoproto.moretags) = "yaml:\"signing_infos\"", (gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
// signing_infos represents a map between validator addresses and their // signing_infos represents a map between validator addresses and their
// missed blocks. // missed blocks.
repeated ValidatorMissedBlocks missed_blocks = 3 [ repeated ValidatorMissedBlocks missed_blocks = 3
(gogoproto.moretags) = "yaml:\"missed_blocks\"", [(gogoproto.moretags) = "yaml:\"missed_blocks\"", (gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }
// SigningInfo stores validator signing info of corresponding address. // SigningInfo stores validator signing info of corresponding address.
@ -33,10 +27,8 @@ message SigningInfo {
// address is the validator address. // address is the validator address.
string address = 1; string address = 1;
// validator_signing_info represents the signing info of this validator. // validator_signing_info represents the signing info of this validator.
ValidatorSigningInfo validator_signing_info = 2 [ ValidatorSigningInfo validator_signing_info = 2
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_signing_info\""];
(gogoproto.moretags) = "yaml:\"validator_signing_info\""
];
} }
// ValidatorMissedBlocks contains array of missed blocks of corresponding address. // ValidatorMissedBlocks contains array of missed blocks of corresponding address.
@ -44,10 +36,8 @@ message ValidatorMissedBlocks {
// address is the validator address. // address is the validator address.
string address = 1; string address = 1;
// missed_blocks is an array of missed blocks by the validator. // missed_blocks is an array of missed blocks by the validator.
repeated MissedBlock missed_blocks = 2 [ repeated MissedBlock missed_blocks = 2
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"missed_blocks\""];
(gogoproto.moretags) = "yaml:\"missed_blocks\""
];
} }
// MissedBlock contains height and missed status as boolean. // MissedBlock contains height and missed status as boolean.
@ -55,5 +45,5 @@ message MissedBlock {
// index is the height at which the block was missed. // index is the height at which the block was missed.
int64 index = 1; int64 index = 1;
// missed is the missed status. // missed is the missed status.
bool missed = 2; bool missed = 2;
} }

View File

@ -14,7 +14,7 @@ message ValidatorSigningInfo {
option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_stringer) = false;
bytes address = 1 [ bytes address = 1 [
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ConsAddress" // validator consensus address (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ConsAddress" // validator consensus address
]; ];
// height at which validator was first a candidate OR was unjailed // height at which validator was first a candidate OR was unjailed
int64 start_height = 2 [(gogoproto.moretags) = "yaml:\"start_height\""]; int64 start_height = 2 [(gogoproto.moretags) = "yaml:\"start_height\""];

View File

@ -9,9 +9,7 @@ import "cosmos/staking/v1beta1/staking.proto";
// GenesisState defines the staking module's genesis state. // GenesisState defines the staking module's genesis state.
message GenesisState { message GenesisState {
// params defines all the paramaters of related to deposit. // params defines all the paramaters of related to deposit.
Params params = 1 [ Params params = 1 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
// last_total_power tracks the total amounts of bonded tokens recorded during // last_total_power tracks the total amounts of bonded tokens recorded during
// the previous end block. // the previous end block.
@ -23,31 +21,21 @@ message GenesisState {
// last_validator_powers is a special index that provides a historical list // last_validator_powers is a special index that provides a historical list
// of the last-block's bonded validators. // of the last-block's bonded validators.
repeated LastValidatorPower last_validator_powers = 3 [ repeated LastValidatorPower last_validator_powers = 3
(gogoproto.moretags) = "yaml:\"last_validator_powers\"", [(gogoproto.moretags) = "yaml:\"last_validator_powers\"", (gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
// delegations defines the validator set at genesis. // delegations defines the validator set at genesis.
repeated Validator validators = 4 [ repeated Validator validators = 4 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
// delegations defines the delegations active at genesis. // delegations defines the delegations active at genesis.
repeated Delegation delegations = 5 [ repeated Delegation delegations = 5 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
// unbonding_delegations defines the unbonding delegations active at genesis. // unbonding_delegations defines the unbonding delegations active at genesis.
repeated UnbondingDelegation unbonding_delegations = 6 [ repeated UnbondingDelegation unbonding_delegations = 6
(gogoproto.moretags) = "yaml:\"unbonding_delegations\"", [(gogoproto.moretags) = "yaml:\"unbonding_delegations\"", (gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
// redelegations defines the redelegations active at genesis. // redelegations defines the redelegations active at genesis.
repeated Redelegation redelegations = 7 [ repeated Redelegation redelegations = 7 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
bool exported = 8; bool exported = 8;
} }
@ -55,9 +43,7 @@ message GenesisState {
// LastValidatorPower required for validator set update logic. // LastValidatorPower required for validator set update logic.
message LastValidatorPower { message LastValidatorPower {
// address is the address of the validator. // address is the address of the validator.
bytes address = 1 [ bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"];
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"
];
// power defines the power of the validator. // power defines the power of the validator.
int64 power = 2; int64 power = 2;

View File

@ -11,78 +11,81 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types";
// Query defines the gRPC querier service. // Query defines the gRPC querier service.
service Query { service Query {
// Validators queries all validators that match the given status. // Validators queries all validators that match the given status.
rpc Validators (QueryValidatorsRequest) returns (QueryValidatorsResponse) { rpc Validators(QueryValidatorsRequest) returns (QueryValidatorsResponse) {
option (google.api.http).get = "/cosmos/staking/v1beta1/validators"; option (google.api.http).get = "/cosmos/staking/v1beta1/validators";
} }
// Validator queries validator info for given validator address. // Validator queries validator info for given validator address.
rpc Validator (QueryValidatorRequest) returns (QueryValidatorResponse) { rpc Validator(QueryValidatorRequest) returns (QueryValidatorResponse) {
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}"; option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}";
} }
// ValidatorDelegations queries delegate info for given validator. // ValidatorDelegations queries delegate info for given validator.
rpc ValidatorDelegations (QueryValidatorDelegationsRequest) returns (QueryValidatorDelegationsResponse) { rpc ValidatorDelegations(QueryValidatorDelegationsRequest) returns (QueryValidatorDelegationsResponse) {
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations"; option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations";
} }
// ValidatorUnbondingDelegations queries unbonding delegations of a validator. // ValidatorUnbondingDelegations queries unbonding delegations of a validator.
rpc ValidatorUnbondingDelegations (QueryValidatorUnbondingDelegationsRequest) returns (QueryValidatorUnbondingDelegationsResponse) { rpc ValidatorUnbondingDelegations(QueryValidatorUnbondingDelegationsRequest)
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations"; returns (QueryValidatorUnbondingDelegationsResponse) {
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations";
} }
// Delegation queries delegate info for given validator delegator pair. // Delegation queries delegate info for given validator delegator pair.
rpc Delegation (QueryDelegationRequest) returns (QueryDelegationResponse) { rpc Delegation(QueryDelegationRequest) returns (QueryDelegationResponse) {
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}"; option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}";
} }
// UnbondingDelegation queries unbonding info for given validator delegator pair. // UnbondingDelegation queries unbonding info for given validator delegator pair.
rpc UnbondingDelegation (QueryUnbondingDelegationRequest) returns (QueryUnbondingDelegationResponse) { rpc UnbondingDelegation(QueryUnbondingDelegationRequest) returns (QueryUnbondingDelegationResponse) {
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation"; option (google.api.http).get =
"/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation";
} }
// DelegatorDelegations queries all delegations of a given delegator address. // DelegatorDelegations queries all delegations of a given delegator address.
rpc DelegatorDelegations (QueryDelegatorDelegationsRequest) returns (QueryDelegatorDelegationsResponse) { rpc DelegatorDelegations(QueryDelegatorDelegationsRequest) returns (QueryDelegatorDelegationsResponse) {
option (google.api.http).get = "/cosmos/staking/v1beta1/delegations/{delegator_addr}"; option (google.api.http).get = "/cosmos/staking/v1beta1/delegations/{delegator_addr}";
} }
// DelegatorUnbondingDelegations queries all unbonding delegations of a given delegator address. // DelegatorUnbondingDelegations queries all unbonding delegations of a given delegator address.
rpc DelegatorUnbondingDelegations (QueryDelegatorUnbondingDelegationsRequest) returns (QueryDelegatorUnbondingDelegationsResponse) { rpc DelegatorUnbondingDelegations(QueryDelegatorUnbondingDelegationsRequest)
option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations"; returns (QueryDelegatorUnbondingDelegationsResponse) {
option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations";
} }
// Redelegations queries redelegations of given address. // Redelegations queries redelegations of given address.
rpc Redelegations (QueryRedelegationsRequest) returns (QueryRedelegationsResponse) { rpc Redelegations(QueryRedelegationsRequest) returns (QueryRedelegationsResponse) {
option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations"; option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations";
} }
// DelegatorValidators queries all validators info for given delegator address. // DelegatorValidators queries all validators info for given delegator address.
rpc DelegatorValidators (QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) { rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) {
option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators"; option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators";
} }
// DelegatorValidator queries validator info for given delegator validator pair. // DelegatorValidator queries validator info for given delegator validator pair.
rpc DelegatorValidator (QueryDelegatorValidatorRequest) returns (QueryDelegatorValidatorResponse) { rpc DelegatorValidator(QueryDelegatorValidatorRequest) returns (QueryDelegatorValidatorResponse) {
option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}"; option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}";
} }
// HistoricalInfo queries the historical info for given height. // HistoricalInfo queries the historical info for given height.
rpc HistoricalInfo (QueryHistoricalInfoRequest) returns (QueryHistoricalInfoResponse) { rpc HistoricalInfo(QueryHistoricalInfoRequest) returns (QueryHistoricalInfoResponse) {
option (google.api.http).get = "/cosmos/staking/v1beta1/historical_info/{height}"; option (google.api.http).get = "/cosmos/staking/v1beta1/historical_info/{height}";
} }
// Pool queries the pool info. // Pool queries the pool info.
rpc Pool (QueryPoolRequest) returns (QueryPoolResponse) { rpc Pool(QueryPoolRequest) returns (QueryPoolResponse) {
option (google.api.http).get = "/cosmos/staking/v1beta1/pool"; option (google.api.http).get = "/cosmos/staking/v1beta1/pool";
} }
// Parameters queries the staking parameters. // Parameters queries the staking parameters.
rpc Params (QueryParamsRequest) returns (QueryParamsResponse) { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/cosmos/staking/v1beta1/params"; option (google.api.http).get = "/cosmos/staking/v1beta1/params";
} }
} }
// QueryValidatorsRequest is request type for Query/Validators RPC method. // QueryValidatorsRequest is request type for Query/Validators RPC method.
message QueryValidatorsRequest{ message QueryValidatorsRequest {
// status enables to query for validators matching a given status. // status enables to query for validators matching a given status.
string status = 1; string status = 1;
@ -122,7 +125,8 @@ message QueryValidatorDelegationsRequest {
// QueryValidatorDelegationsResponse is response type for the Query/ValidatorDelegations RPC method // QueryValidatorDelegationsResponse is response type for the Query/ValidatorDelegations RPC method
message QueryValidatorDelegationsResponse { message QueryValidatorDelegationsResponse {
repeated DelegationResponse delegation_responses = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "DelegationResponses"]; repeated DelegationResponse delegation_responses = 1
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "DelegationResponses"];
// pagination defines the pagination in the response. // pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2; cosmos.base.query.v1beta1.PageResponse pagination = 2;
@ -172,7 +176,7 @@ message QueryUnbondingDelegationRequest {
// QueryDelegationResponse is response type for the Query/UnbondingDelegation RPC method. // QueryDelegationResponse is response type for the Query/UnbondingDelegation RPC method.
message QueryUnbondingDelegationResponse { message QueryUnbondingDelegationResponse {
// unbond defines the unbonding information of a delegation. // unbond defines the unbonding information of a delegation.
UnbondingDelegation unbond =1 [(gogoproto.nullable) = false]; UnbondingDelegation unbond = 1 [(gogoproto.nullable) = false];
} }
// QueryDelegatorDelegationsRequest is request type for the Query/DelegatorDelegations RPC method. // QueryDelegatorDelegationsRequest is request type for the Query/DelegatorDelegations RPC method.
@ -197,7 +201,7 @@ message QueryDelegatorDelegationsResponse {
message QueryDelegatorUnbondingDelegationsRequest { message QueryDelegatorUnbondingDelegationsRequest {
// delegator_addr defines the delegator address to query for. // delegator_addr defines the delegator address to query for.
bytes delegator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; bytes delegator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
// pagination defines an optional pagination for the request. // pagination defines an optional pagination for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 2; cosmos.base.query.v1beta1.PageRequest pagination = 2;
} }
@ -279,7 +283,7 @@ message QueryHistoricalInfoResponse {
} }
// QueryPoolRequest is request type for the Query/Pool RPC method. // QueryPoolRequest is request type for the Query/Pool RPC method.
message QueryPoolRequest { } message QueryPoolRequest {}
// QueryPoolResponse is response type for the Query/Pool RPC method. // QueryPoolResponse is response type for the Query/Pool RPC method.
message QueryPoolResponse { message QueryPoolResponse {
@ -288,7 +292,7 @@ message QueryPoolResponse {
} }
// QueryParamsRequest is request type for the Query/Params RPC method. // QueryParamsRequest is request type for the Query/Params RPC method.
message QueryParamsRequest { } message QueryParamsRequest {}
// QueryParamsResponse is response type for the Query/Params RPC method. // QueryParamsResponse is response type for the Query/Params RPC method.
message QueryParamsResponse { message QueryParamsResponse {

View File

@ -14,7 +14,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types";
// (`n` is set by the staking module's `historical_entries` parameter). // (`n` is set by the staking module's `historical_entries` parameter).
message HistoricalInfo { message HistoricalInfo {
tendermint.types.Header header = 1 [(gogoproto.nullable) = false]; tendermint.types.Header header = 1 [(gogoproto.nullable) = false];
repeated Validator valset = 2 [(gogoproto.nullable) = false]; repeated Validator valset = 2 [(gogoproto.nullable) = false];
} }
// CommissionRates defines the initial commission rates to be used for creating // CommissionRates defines the initial commission rates to be used for creating
@ -23,10 +23,7 @@ message CommissionRates {
option (gogoproto.equal) = true; option (gogoproto.equal) = true;
option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_stringer) = false;
string rate = 1 [ string rate = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
string max_rate = 2 [ string max_rate = 2 [
(gogoproto.moretags) = "yaml:\"max_rate\"", (gogoproto.moretags) = "yaml:\"max_rate\"",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
@ -45,11 +42,8 @@ message Commission {
option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_stringer) = false;
CommissionRates commission_rates = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; CommissionRates commission_rates = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
google.protobuf.Timestamp update_time = 2 [ google.protobuf.Timestamp update_time = 2
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"update_time\""];
(gogoproto.stdtime) = true,
(gogoproto.moretags) = "yaml:\"update_time\""
];
} }
// Description defines a validator description. // Description defines a validator description.
@ -84,10 +78,7 @@ message Validator {
string consensus_pubkey = 2 [(gogoproto.moretags) = "yaml:\"consensus_pubkey\""]; string consensus_pubkey = 2 [(gogoproto.moretags) = "yaml:\"consensus_pubkey\""];
bool jailed = 3; bool jailed = 3;
int32 status = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.BondStatus"]; int32 status = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.BondStatus"];
string tokens = 5 [ string tokens = 5 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
string delegator_shares = 6 [ string delegator_shares = 6 [
(gogoproto.moretags) = "yaml:\"delegator_shares\"", (gogoproto.moretags) = "yaml:\"delegator_shares\"",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
@ -95,11 +86,8 @@ message Validator {
]; ];
Description description = 7 [(gogoproto.nullable) = false]; Description description = 7 [(gogoproto.nullable) = false];
int64 unbonding_height = 8 [(gogoproto.moretags) = "yaml:\"unbonding_height\""]; int64 unbonding_height = 8 [(gogoproto.moretags) = "yaml:\"unbonding_height\""];
google.protobuf.Timestamp unbonding_time = 9 [ google.protobuf.Timestamp unbonding_time = 9
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""];
(gogoproto.stdtime) = true,
(gogoproto.moretags) = "yaml:\"unbonding_time\""
];
Commission commission = 10 [(gogoproto.nullable) = false]; Commission commission = 10 [(gogoproto.nullable) = false];
string min_self_delegation = 11 [ string min_self_delegation = 11 [
(gogoproto.moretags) = "yaml:\"min_self_delegation\"", (gogoproto.moretags) = "yaml:\"min_self_delegation\"",
@ -180,10 +168,7 @@ message Delegation {
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress",
(gogoproto.moretags) = "yaml:\"validator_address\"" (gogoproto.moretags) = "yaml:\"validator_address\""
]; ];
string shares = 3 [ string shares = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
} }
// UnbondingDelegation stores all of a single delegator's unbonding bonds // UnbondingDelegation stores all of a single delegator's unbonding bonds
@ -200,8 +185,7 @@ message UnbondingDelegation {
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress",
(gogoproto.moretags) = "yaml:\"validator_address\"" (gogoproto.moretags) = "yaml:\"validator_address\""
]; ];
repeated UnbondingDelegationEntry entries = 3 repeated UnbondingDelegationEntry entries = 3 [(gogoproto.nullable) = false]; // unbonding delegation entries
[(gogoproto.nullable) = false]; // unbonding delegation entries
} }
// UnbondingDelegationEntry defines an unbonding object with relevant metadata. // UnbondingDelegationEntry defines an unbonding object with relevant metadata.
@ -210,20 +194,14 @@ message UnbondingDelegationEntry {
option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_stringer) = false;
int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""]; int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""];
google.protobuf.Timestamp completion_time = 2 [ google.protobuf.Timestamp completion_time = 2
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""];
(gogoproto.stdtime) = true,
(gogoproto.moretags) = "yaml:\"completion_time\""
];
string initial_balance = 3 [ string initial_balance = 3 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false, (gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"initial_balance\"" (gogoproto.moretags) = "yaml:\"initial_balance\""
]; ];
string balance = 4 [ string balance = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
} }
// RedelegationEntry defines a redelegation object with relevant metadata. // RedelegationEntry defines a redelegation object with relevant metadata.
@ -232,20 +210,15 @@ message RedelegationEntry {
option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_stringer) = false;
int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""]; int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""];
google.protobuf.Timestamp completion_time = 2 [ google.protobuf.Timestamp completion_time = 2
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""];
(gogoproto.stdtime) = true,
(gogoproto.moretags) = "yaml:\"completion_time\""
];
string initial_balance = 3 [ string initial_balance = 3 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false, (gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"initial_balance\"" (gogoproto.moretags) = "yaml:\"initial_balance\""
]; ];
string shares_dst = 4 [ string shares_dst = 4
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }
// Redelegation contains the list of a particular delegator's redelegating bonds // Redelegation contains the list of a particular delegator's redelegating bonds
@ -266,7 +239,7 @@ message Redelegation {
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress",
(gogoproto.moretags) = "yaml:\"validator_dst_address\"" (gogoproto.moretags) = "yaml:\"validator_dst_address\""
]; ];
repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false]; // redelegation entries repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false]; // redelegation entries
} }
// Params defines the parameters for the staking module. // Params defines the parameters for the staking module.
@ -274,11 +247,8 @@ message Params {
option (gogoproto.equal) = true; option (gogoproto.equal) = true;
option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_stringer) = false;
google.protobuf.Duration unbonding_time = 1 [ google.protobuf.Duration unbonding_time = 1
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""];
(gogoproto.stdduration) = true,
(gogoproto.moretags) = "yaml:\"unbonding_time\""
];
uint32 max_validators = 2 [(gogoproto.moretags) = "yaml:\"max_validators\""]; uint32 max_validators = 2 [(gogoproto.moretags) = "yaml:\"max_validators\""];
uint32 max_entries = 3 [(gogoproto.moretags) = "yaml:\"max_entries\""]; uint32 max_entries = 3 [(gogoproto.moretags) = "yaml:\"max_entries\""];
uint32 historical_entries = 4 [(gogoproto.moretags) = "yaml:\"historical_entries\""]; uint32 historical_entries = 4 [(gogoproto.moretags) = "yaml:\"historical_entries\""];
@ -303,10 +273,7 @@ message RedelegationEntryResponse {
option (gogoproto.equal) = true; option (gogoproto.equal) = true;
RedelegationEntry redelegation_entry = 1 [(gogoproto.nullable) = false]; RedelegationEntry redelegation_entry = 1 [(gogoproto.nullable) = false];
string balance = 4 [ string balance = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
} }
// RedelegationResponse is equivalent to a Redelegation except that its entries // RedelegationResponse is equivalent to a Redelegation except that its entries
@ -315,19 +282,23 @@ message RedelegationEntryResponse {
message RedelegationResponse { message RedelegationResponse {
option (gogoproto.equal) = true; option (gogoproto.equal) = true;
Redelegation redelegation = 1 [(gogoproto.nullable) = false]; Redelegation redelegation = 1 [(gogoproto.nullable) = false];
repeated RedelegationEntryResponse entries = 2 [(gogoproto.nullable) = false]; repeated RedelegationEntryResponse entries = 2 [(gogoproto.nullable) = false];
} }
// Pool is used for tracking bonded and not-bonded token supply of the bond denomination. // Pool is used for tracking bonded and not-bonded token supply of the bond denomination.
message Pool { message Pool {
option (gogoproto.description) = true; option (gogoproto.description) = true;
option (gogoproto.equal) = true; option (gogoproto.equal) = true;
string not_bonded_tokens = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", string not_bonded_tokens = 1 [
(gogoproto.jsontag) = "not_bonded_tokens", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false]; (gogoproto.jsontag) = "not_bonded_tokens",
string bonded_tokens = 2 [(gogoproto.jsontag) = "bonded_tokens", (gogoproto.nullable) = false
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", ];
(gogoproto.nullable) = false, string bonded_tokens = 2 [
(gogoproto.moretags) = "yaml:\"bonded_tokens\""]; (gogoproto.jsontag) = "bonded_tokens",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"bonded_tokens\""
];
} }

View File

@ -7,7 +7,6 @@ import "cosmos/staking/v1beta1/staking.proto";
option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types";
// MsgCreateValidator defines an SDK message for creating a new validator. // MsgCreateValidator defines an SDK message for creating a new validator.
message MsgCreateValidator { message MsgCreateValidator {
option (gogoproto.equal) = true; option (gogoproto.equal) = true;
@ -27,7 +26,7 @@ message MsgCreateValidator {
(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress",
(gogoproto.moretags) = "yaml:\"validator_address\"" (gogoproto.moretags) = "yaml:\"validator_address\""
]; ];
string pubkey = 6; string pubkey = 6;
cosmos.base.v1beta1.Coin value = 7 [(gogoproto.nullable) = false]; cosmos.base.v1beta1.Coin value = 7 [(gogoproto.nullable) = false];
} }
@ -56,7 +55,7 @@ message MsgEditValidator {
]; ];
} }
// MsgDelegate defines an SDK message for performing a delegation of coins // MsgDelegate defines an SDK message for performing a delegation of coins
// from a delegator to a validator. // from a delegator to a validator.
message MsgDelegate { message MsgDelegate {
option (gogoproto.equal) = true; option (gogoproto.equal) = true;
@ -72,7 +71,7 @@ message MsgDelegate {
cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false];
} }
// MsgBeginRedelegate defines an SDK message for performing a redelegation // MsgBeginRedelegate defines an SDK message for performing a redelegation
// of coins from a delegator and source validator to a destination validator. // of coins from a delegator and source validator to a destination validator.
message MsgBeginRedelegate { message MsgBeginRedelegate {
option (gogoproto.equal) = true; option (gogoproto.equal) = true;

View File

@ -7,69 +7,69 @@ option go_package = "github.com/cosmos/cosmos-sdk/types/tx/signing";
// SignMode represents a signing mode with its own security guarantees. // SignMode represents a signing mode with its own security guarantees.
enum SignMode { enum SignMode {
// SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be rejected // SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be rejected
SIGN_MODE_UNSPECIFIED = 0; SIGN_MODE_UNSPECIFIED = 0;
// SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is verified // SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is verified
// with raw bytes from Tx // with raw bytes from Tx
SIGN_MODE_DIRECT = 1; SIGN_MODE_DIRECT = 1;
// SIGN_MODE_TEXTUAL is a future signing mode that will verify some human-readable // SIGN_MODE_TEXTUAL is a future signing mode that will verify some human-readable
// textual representation on top of the binary representation from SIGN_MODE_DIRECT // textual representation on top of the binary representation from SIGN_MODE_DIRECT
SIGN_MODE_TEXTUAL = 2; SIGN_MODE_TEXTUAL = 2;
// SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses // SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses
// Amino JSON and will be removed in the future // Amino JSON and will be removed in the future
SIGN_MODE_LEGACY_AMINO_JSON = 127; SIGN_MODE_LEGACY_AMINO_JSON = 127;
} }
// SignatureDescriptors wraps multiple SignatureDescriptor's. // SignatureDescriptors wraps multiple SignatureDescriptor's.
message SignatureDescriptors { message SignatureDescriptors {
// signatures are the signature descriptors // signatures are the signature descriptors
repeated SignatureDescriptor signatures = 1; repeated SignatureDescriptor signatures = 1;
} }
// SignatureDescriptor is a convenience type which represents the full data for a // SignatureDescriptor is a convenience type which represents the full data for a
// signature including the public key of the signer, signing modes and the signature // signature including the public key of the signer, signing modes and the signature
// itself. It is primarily used for coordinating signatures between clients. // itself. It is primarily used for coordinating signatures between clients.
message SignatureDescriptor { message SignatureDescriptor {
// public_key is the public key of the signer // public_key is the public key of the signer
cosmos.base.crypto.v1beta1.PublicKey public_key = 1; cosmos.base.crypto.v1beta1.PublicKey public_key = 1;
Data data = 2; Data data = 2;
// sequence is the sequence of the account, which describes the // sequence is the sequence of the account, which describes the
// number of committed transactions signed by a given address. It is used to prevent // number of committed transactions signed by a given address. It is used to prevent
// replay attacks. // replay attacks.
uint64 sequence = 3; uint64 sequence = 3;
// Data represents signature data // Data represents signature data
message Data { message Data {
// sum is the oneof that specifies whether this represents single or multi-signature data // sum is the oneof that specifies whether this represents single or multi-signature data
oneof sum { oneof sum {
// single represents a single signer // single represents a single signer
Single single = 1; Single single = 1;
// multi represents a multisig signer // multi represents a multisig signer
Multi multi = 2; Multi multi = 2;
}
// Single is the signature data for a single signer
message Single {
// mode is the signing mode of the single signer
SignMode mode = 1;
// signature is the raw signature bytes
bytes signature = 2;
}
// Multi is the signature data for a multisig public key
message Multi {
// bitarray specifies which keys within the multisig are signing
cosmos.base.crypto.v1beta1.CompactBitArray bitarray = 1;
// signatures is the signatures of the multi-signature
repeated Data signatures = 2;
}
} }
// Single is the signature data for a single signer
message Single {
// mode is the signing mode of the single signer
SignMode mode = 1;
// signature is the raw signature bytes
bytes signature = 2;
}
// Multi is the signature data for a multisig public key
message Multi {
// bitarray specifies which keys within the multisig are signing
cosmos.base.crypto.v1beta1.CompactBitArray bitarray = 1;
// signatures is the signatures of the multi-signature
repeated Data signatures = 2;
}
}
} }

View File

@ -10,12 +10,12 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types";
service Query { service Query {
// CurrentPlan queries the current upgrade plan. // CurrentPlan queries the current upgrade plan.
rpc CurrentPlan(QueryCurrentPlanRequest) returns (QueryCurrentPlanResponse) { rpc CurrentPlan(QueryCurrentPlanRequest) returns (QueryCurrentPlanResponse) {
option (google.api.http).get = "/cosmos/upgrade/v1beta1/current_plan"; option (google.api.http).get = "/cosmos/upgrade/v1beta1/current_plan";
} }
// AppliedPlan queries a previously applied upgrade plan by its name. // AppliedPlan queries a previously applied upgrade plan by its name.
rpc AppliedPlan(QueryAppliedPlanRequest) returns (QueryAppliedPlanResponse) { rpc AppliedPlan(QueryAppliedPlanRequest) returns (QueryAppliedPlanResponse) {
option (google.api.http).get = "/cosmos/upgrade/v1beta1/applied_plan/{name}"; option (google.api.http).get = "/cosmos/upgrade/v1beta1/applied_plan/{name}";
} }
} }

View File

@ -13,8 +13,8 @@ message BaseVestingAccount {
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_stringer) = false;
cosmos.auth.v1beta1.BaseAccount base_account = 1 [(gogoproto.embed) = true]; cosmos.auth.v1beta1.BaseAccount base_account = 1 [(gogoproto.embed) = true];
repeated cosmos.base.v1beta1.Coin original_vesting = 2 [ repeated cosmos.base.v1beta1.Coin original_vesting = 2 [
(gogoproto.nullable) = false, (gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(gogoproto.moretags) = "yaml:\"original_vesting\"" (gogoproto.moretags) = "yaml:\"original_vesting\""
@ -56,11 +56,9 @@ message DelayedVestingAccount {
message Period { message Period {
option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_stringer) = false;
int64 length = 1; int64 length = 1;
repeated cosmos.base.v1beta1.Coin amount = 2 [ repeated cosmos.base.v1beta1.Coin amount = 2
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
} }
// PeriodicVestingAccount implements the VestingAccount interface. It // PeriodicVestingAccount implements the VestingAccount interface. It
@ -71,6 +69,5 @@ message PeriodicVestingAccount {
BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true];
int64 start_time = 2 [(gogoproto.moretags) = "yaml:\"start_time\""]; int64 start_time = 2 [(gogoproto.moretags) = "yaml:\"start_time\""];
repeated Period vesting_periods = 3 repeated Period vesting_periods = 3 [(gogoproto.moretags) = "yaml:\"vesting_periods\"", (gogoproto.nullable) = false];
[(gogoproto.moretags) = "yaml:\"vesting_periods\"", (gogoproto.nullable) = false];
} }

View File

@ -12,55 +12,40 @@ message MsgChannelOpenInit {
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
Channel channel = 3 [(gogoproto.nullable) = false]; Channel channel = 3 [(gogoproto.nullable) = false];
bytes signer = 4 bytes signer = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
} }
// MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel // MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel
// on Chain B. // on Chain B.
message MsgChannelOpenTry { message MsgChannelOpenTry {
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
Channel channel = 3 [(gogoproto.nullable) = false]; Channel channel = 3 [(gogoproto.nullable) = false];
string counterparty_version = 4 string counterparty_version = 4 [(gogoproto.moretags) = "yaml:\"counterparty_version\""];
[(gogoproto.moretags) = "yaml:\"counterparty_version\""]; bytes proof_init = 5 [(gogoproto.moretags) = "yaml:\"proof_init\""];
bytes proof_init = 5 [(gogoproto.moretags) = "yaml:\"proof_init\""]; ibc.client.Height proof_height = 6 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
ibc.client.Height proof_height = 6 [ bytes signer = 7 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
(gogoproto.moretags) = "yaml:\"proof_height\"",
(gogoproto.nullable) = false
];
bytes signer = 7
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
} }
// MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge // MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge
// the change of channel state to TRYOPEN on Chain B. // the change of channel state to TRYOPEN on Chain B.
message MsgChannelOpenAck { message MsgChannelOpenAck {
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
string counterparty_version = 3 string counterparty_version = 3 [(gogoproto.moretags) = "yaml:\"counterparty_version\""];
[(gogoproto.moretags) = "yaml:\"counterparty_version\""]; bytes proof_try = 4 [(gogoproto.moretags) = "yaml:\"proof_try\""];
bytes proof_try = 4 [(gogoproto.moretags) = "yaml:\"proof_try\""]; ibc.client.Height proof_height = 5 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
ibc.client.Height proof_height = 5 [ bytes signer = 6 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
(gogoproto.moretags) = "yaml:\"proof_height\"",
(gogoproto.nullable) = false
];
bytes signer = 6
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
} }
// MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to // MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to
// acknowledge the change of channel state to OPEN on Chain A. // acknowledge the change of channel state to OPEN on Chain A.
message MsgChannelOpenConfirm { message MsgChannelOpenConfirm {
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
bytes proof_ack = 3 [(gogoproto.moretags) = "yaml:\"proof_ack\""]; bytes proof_ack = 3 [(gogoproto.moretags) = "yaml:\"proof_ack\""];
ibc.client.Height proof_height = 4 [ ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
(gogoproto.moretags) = "yaml:\"proof_height\"", bytes signer = 5 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
(gogoproto.nullable) = false
];
bytes signer = 5
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
} }
// MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain A // MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain A
@ -68,76 +53,53 @@ message MsgChannelOpenConfirm {
message MsgChannelCloseInit { message MsgChannelCloseInit {
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
bytes signer = 3 bytes signer = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
} }
// MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B // MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B
// to acknowledge the change of channel state to CLOSED on Chain A. // to acknowledge the change of channel state to CLOSED on Chain A.
message MsgChannelCloseConfirm { message MsgChannelCloseConfirm {
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
bytes proof_init = 3 [(gogoproto.moretags) = "yaml:\"proof_init\""]; bytes proof_init = 3 [(gogoproto.moretags) = "yaml:\"proof_init\""];
ibc.client.Height proof_height = 4 [ ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
(gogoproto.moretags) = "yaml:\"proof_height\"", bytes signer = 5 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
(gogoproto.nullable) = false
];
bytes signer = 5
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
} }
// MsgRecvPacket receives incoming IBC packet // MsgRecvPacket receives incoming IBC packet
message MsgRecvPacket { message MsgRecvPacket {
Packet packet = 1 [(gogoproto.nullable) = false]; Packet packet = 1 [(gogoproto.nullable) = false];
bytes proof = 2; bytes proof = 2;
ibc.client.Height proof_height = 3 [ ibc.client.Height proof_height = 3 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
(gogoproto.moretags) = "yaml:\"proof_height\"", bytes signer = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
(gogoproto.nullable) = false
];
bytes signer = 4
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
} }
// MsgTimeout receives timed-out packet // MsgTimeout receives timed-out packet
message MsgTimeout { message MsgTimeout {
Packet packet = 1 [(gogoproto.nullable) = false]; Packet packet = 1 [(gogoproto.nullable) = false];
bytes proof = 2; bytes proof = 2;
ibc.client.Height proof_height = 3 [ ibc.client.Height proof_height = 3 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
(gogoproto.moretags) = "yaml:\"proof_height\"", uint64 next_sequence_recv = 4 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""];
(gogoproto.nullable) = false bytes signer = 5 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
];
uint64 next_sequence_recv = 4
[(gogoproto.moretags) = "yaml:\"next_sequence_recv\""];
bytes signer = 5
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
} }
// MsgTimeoutOnClose timed-out packet upon counterparty channel closure. // MsgTimeoutOnClose timed-out packet upon counterparty channel closure.
message MsgTimeoutOnClose { message MsgTimeoutOnClose {
Packet packet = 1 [(gogoproto.nullable) = false]; Packet packet = 1 [(gogoproto.nullable) = false];
bytes proof = 2; bytes proof = 2;
bytes proof_close = 3 [(gogoproto.moretags) = "yaml:\"proof_close\""]; bytes proof_close = 3 [(gogoproto.moretags) = "yaml:\"proof_close\""];
ibc.client.Height proof_height = 4 [ ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
(gogoproto.moretags) = "yaml:\"proof_height\"", uint64 next_sequence_recv = 5 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""];
(gogoproto.nullable) = false bytes signer = 6 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
];
uint64 next_sequence_recv = 5
[(gogoproto.moretags) = "yaml:\"next_sequence_recv\""];
bytes signer = 6
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
} }
// MsgAcknowledgement receives incoming IBC acknowledgement // MsgAcknowledgement receives incoming IBC acknowledgement
message MsgAcknowledgement { message MsgAcknowledgement {
Packet packet = 1 [(gogoproto.nullable) = false]; Packet packet = 1 [(gogoproto.nullable) = false];
bytes acknowledgement = 2; bytes acknowledgement = 2;
bytes proof = 3; bytes proof = 3;
ibc.client.Height proof_height = 4 [ ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
(gogoproto.moretags) = "yaml:\"proof_height\"", bytes signer = 5 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
(gogoproto.nullable) = false
];
bytes signer = 5
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
} }
// Channel defines pipeline for exactly-once packet delivery between specific // Channel defines pipeline for exactly-once packet delivery between specific
@ -154,8 +116,7 @@ message Channel {
Counterparty counterparty = 3 [(gogoproto.nullable) = false]; Counterparty counterparty = 3 [(gogoproto.nullable) = false];
// list of connection identifiers, in order, along which packets sent on this // list of connection identifiers, in order, along which packets sent on this
// channel will travel // channel will travel
repeated string connection_hops = 4 repeated string connection_hops = 4 [(gogoproto.moretags) = "yaml:\"connection_hops\""];
[(gogoproto.moretags) = "yaml:\"connection_hops\""];
// opaque channel version, which is agreed upon during the handshake // opaque channel version, which is agreed upon during the handshake
string version = 5; string version = 5;
} }
@ -173,8 +134,7 @@ message IdentifiedChannel {
Counterparty counterparty = 3 [(gogoproto.nullable) = false]; Counterparty counterparty = 3 [(gogoproto.nullable) = false];
// list of connection identifiers, in order, along which packets sent on this // list of connection identifiers, in order, along which packets sent on this
// channel will travel // channel will travel
repeated string connection_hops = 4 repeated string connection_hops = 4 [(gogoproto.moretags) = "yaml:\"connection_hops\""];
[(gogoproto.moretags) = "yaml:\"connection_hops\""];
// opaque channel version, which is agreed upon during the handshake // opaque channel version, which is agreed upon during the handshake
string version = 5; string version = 5;
// port identifier // port identifier
@ -189,8 +149,7 @@ enum State {
option (gogoproto.goproto_enum_prefix) = false; option (gogoproto.goproto_enum_prefix) = false;
// Default State // Default State
STATE_UNINITIALIZED_UNSPECIFIED = 0 STATE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNINITIALIZED"];
[(gogoproto.enumvalue_customname) = "UNINITIALIZED"];
// A channel has just started the opening handshake. // A channel has just started the opening handshake.
STATE_INIT = 1 [(gogoproto.enumvalue_customname) = "INIT"]; STATE_INIT = 1 [(gogoproto.enumvalue_customname) = "INIT"];
// A channel has acknowledged the handshake step on the counterparty chain. // A channel has acknowledged the handshake step on the counterparty chain.
@ -239,21 +198,15 @@ message Packet {
// identifies the channel end on the sending chain. // identifies the channel end on the sending chain.
string source_channel = 3 [(gogoproto.moretags) = "yaml:\"source_channel\""]; string source_channel = 3 [(gogoproto.moretags) = "yaml:\"source_channel\""];
// identifies the port on the receiving chain. // identifies the port on the receiving chain.
string destination_port = 4 string destination_port = 4 [(gogoproto.moretags) = "yaml:\"destination_port\""];
[(gogoproto.moretags) = "yaml:\"destination_port\""];
// identifies the channel end on the receiving chain. // identifies the channel end on the receiving chain.
string destination_channel = 5 string destination_channel = 5 [(gogoproto.moretags) = "yaml:\"destination_channel\""];
[(gogoproto.moretags) = "yaml:\"destination_channel\""];
// actual opaque bytes transferred directly to the application module // actual opaque bytes transferred directly to the application module
bytes data = 6; bytes data = 6;
// block height after which the packet times out // block height after which the packet times out
ibc.client.Height timeout_height = 7 [ ibc.client.Height timeout_height = 7 [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false];
(gogoproto.moretags) = "yaml:\"timeout_height\"",
(gogoproto.nullable) = false
];
// block timestamp (in nanoseconds) after which the packet times out // block timestamp (in nanoseconds) after which the packet times out
uint64 timeout_timestamp = 8 uint64 timeout_timestamp = 8 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""];
[(gogoproto.moretags) = "yaml:\"timeout_timestamp\""];
} }
// PacketAckCommitment defines the genesis type necessary to retrieve and store // PacketAckCommitment defines the genesis type necessary to retrieve and store

View File

@ -8,37 +8,22 @@ import "ibc/channel/channel.proto";
// GenesisState defines the ibc channel submodule's genesis state. // GenesisState defines the ibc channel submodule's genesis state.
message GenesisState { message GenesisState {
repeated IdentifiedChannel channels = 1 [ repeated IdentifiedChannel channels = 1 [(gogoproto.casttype) = "IdentifiedChannel", (gogoproto.nullable) = false];
(gogoproto.casttype) = "IdentifiedChannel", repeated PacketAckCommitment acknowledgements = 2
(gogoproto.nullable) = false [(gogoproto.casttype) = "PacketAckCommitment", (gogoproto.nullable) = false];
];
repeated PacketAckCommitment acknowledgements = 2 [
(gogoproto.casttype) = "PacketAckCommitment",
(gogoproto.nullable) = false
];
repeated PacketAckCommitment commitments = 3 [(gogoproto.nullable) = false]; repeated PacketAckCommitment commitments = 3 [(gogoproto.nullable) = false];
repeated PacketSequence send_sequences = 4 [ repeated PacketSequence send_sequences = 4
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"send_sequences\""];
(gogoproto.moretags) = "yaml:\"send_sequences\"" repeated PacketSequence recv_sequences = 5
]; [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"recv_sequences\""];
repeated PacketSequence recv_sequences = 5 [ repeated PacketSequence ack_sequences = 6
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"ack_sequences\""];
(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 // PacketSequence defines the genesis type necessary to retrieve and store
// next send and receive sequences. // next send and receive sequences.
message PacketSequence { message PacketSequence {
string port_id = 1 [ string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
(gogoproto.moretags) = "yaml:\"port_id\"" string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
]; uint64 sequence = 3;
string channel_id = 2 [
(gogoproto.moretags) = "yaml:\"channel_id\""
];
uint64 sequence = 3;
} }

View File

@ -24,55 +24,50 @@ service Query {
// ConnectionChannels queries all the channels associated with a connection // ConnectionChannels queries all the channels associated with a connection
// end. // end.
rpc ConnectionChannels(QueryConnectionChannelsRequest) rpc ConnectionChannels(QueryConnectionChannelsRequest) returns (QueryConnectionChannelsResponse) {
returns (QueryConnectionChannelsResponse) { option (google.api.http).get = "/ibc/channel/v1beta1/connections/{connection}/channels";
option (google.api.http).get = "/ibc/channel/v1beta1/connections/{connection}/channels";
} }
// ChannelClientState queries for the client state for the channel associated // ChannelClientState queries for the client state for the channel associated
// with the provided channel identifiers. // with the provided channel identifiers.
rpc ChannelClientState(QueryChannelClientStateRequest) rpc ChannelClientState(QueryChannelClientStateRequest) returns (QueryChannelClientStateResponse) {
returns (QueryChannelClientStateResponse) { option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state";
option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state";
} }
// ChannelConsensusState queries for the consensus state for the channel // ChannelConsensusState queries for the consensus state for the channel
// associated with the provided channel identifiers. // associated with the provided channel identifiers.
rpc ChannelConsensusState(QueryChannelConsensusStateRequest) rpc ChannelConsensusState(QueryChannelConsensusStateRequest) returns (QueryChannelConsensusStateResponse) {
returns (QueryChannelConsensusStateResponse) { option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/epoch/"
option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/epoch/{epoch_number}/height/{epoch_height}"; "{epoch_number}/height/{epoch_height}";
} }
// PacketCommitment queries a stored packet commitment hash. // PacketCommitment queries a stored packet commitment hash.
rpc PacketCommitment(QueryPacketCommitmentRequest) rpc PacketCommitment(QueryPacketCommitmentRequest) returns (QueryPacketCommitmentResponse) {
returns (QueryPacketCommitmentResponse) { option (google.api.http).get =
option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}"; "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}";
} }
// PacketCommitments returns the all the packet commitments hashes associated // PacketCommitments returns the all the packet commitments hashes associated
// with a channel. // with a channel.
rpc PacketCommitments(QueryPacketCommitmentsRequest) rpc PacketCommitments(QueryPacketCommitmentsRequest) returns (QueryPacketCommitmentsResponse) {
returns (QueryPacketCommitmentsResponse) { option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments";
option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments";
} }
// PacketAcknowledgement queries a stored packet acknowledgement hash. // PacketAcknowledgement queries a stored packet acknowledgement hash.
rpc PacketAcknowledgement(QueryPacketAcknowledgementRequest) rpc PacketAcknowledgement(QueryPacketAcknowledgementRequest) returns (QueryPacketAcknowledgementResponse) {
returns (QueryPacketAcknowledgementResponse) { option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}";
option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}";
} }
// UnrelayedPackets returns all the unrelayed IBC packets associated with a // UnrelayedPackets returns all the unrelayed IBC packets associated with a
// channel and sequences. // channel and sequences.
rpc UnrelayedPackets(QueryUnrelayedPacketsRequest) rpc UnrelayedPackets(QueryUnrelayedPacketsRequest) returns (QueryUnrelayedPacketsResponse) {
returns (QueryUnrelayedPacketsResponse) { option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/"
option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/packet_acks/{acknowledgements}/unrelayed_packets"; "{packet_commitment_sequences}/packet_acks/{acknowledgements}/unrelayed_packets";
} }
// NextSequenceReceive returns the next receive sequence for a given channel. // NextSequenceReceive returns the next receive sequence for a given channel.
rpc NextSequenceReceive(QueryNextSequenceReceiveRequest) rpc NextSequenceReceive(QueryNextSequenceReceiveRequest) returns (QueryNextSequenceReceiveResponse) {
returns (QueryNextSequenceReceiveResponse) { option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence";
option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence";
} }
} }
@ -95,9 +90,7 @@ message QueryChannelResponse {
// merkle proof path // merkle proof path
string proof_path = 3; string proof_path = 3;
// height at which the proof was retrieved // height at which the proof was retrieved
ibc.client.Height proof_height = 4 [ ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }
// QueryChannelsRequest is the request type for the Query/Channels RPC method // QueryChannelsRequest is the request type for the Query/Channels RPC method
@ -113,9 +106,7 @@ message QueryChannelsResponse {
// pagination response // pagination response
cosmos.base.query.v1beta1.PageResponse pagination = 2; cosmos.base.query.v1beta1.PageResponse pagination = 2;
// query block height // query block height
ibc.client.Height height = 3 [ ibc.client.Height height = 3 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }
// QueryConnectionChannelsRequest is the request type for the // QueryConnectionChannelsRequest is the request type for the
@ -135,9 +126,7 @@ message QueryConnectionChannelsResponse {
// pagination response // pagination response
cosmos.base.query.v1beta1.PageResponse pagination = 2; cosmos.base.query.v1beta1.PageResponse pagination = 2;
// query block height // query block height
ibc.client.Height height = 3 [ ibc.client.Height height = 3 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }
// QueryChannelClientStateRequest is the request type for the Query/ClientState // QueryChannelClientStateRequest is the request type for the Query/ClientState
@ -159,9 +148,7 @@ message QueryChannelClientStateResponse {
// merkle proof path // merkle proof path
string proof_path = 3; string proof_path = 3;
// height at which the proof was retrieved // height at which the proof was retrieved
ibc.client.Height proof_height = 4 [ ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }
// QueryChannelConsensusStateRequest is the request type for the // QueryChannelConsensusStateRequest is the request type for the
@ -189,9 +176,7 @@ message QueryChannelConsensusStateResponse {
// merkle proof path // merkle proof path
string proof_path = 4; string proof_path = 4;
// height at which the proof was retrieved // height at which the proof was retrieved
ibc.client.Height proof_height = 5 [ ibc.client.Height proof_height = 5 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }
// QueryPacketCommitmentRequest is the request type for the // QueryPacketCommitmentRequest is the request type for the
@ -216,9 +201,7 @@ message QueryPacketCommitmentResponse {
// merkle proof path // merkle proof path
string proof_path = 3; string proof_path = 3;
// height at which the proof was retrieved // height at which the proof was retrieved
ibc.client.Height proof_height = 4 [ ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }
// QueryPacketCommitmentsRequest is the request type for the // QueryPacketCommitmentsRequest is the request type for the
@ -239,9 +222,7 @@ message QueryPacketCommitmentsResponse {
// pagination response // pagination response
cosmos.base.query.v1beta1.PageResponse pagination = 2; cosmos.base.query.v1beta1.PageResponse pagination = 2;
// query block height // query block height
ibc.client.Height height = 3 [ ibc.client.Height height = 3 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }
// QueryPacketAcknowledgementRequest is the request type for the // QueryPacketAcknowledgementRequest is the request type for the
@ -266,9 +247,7 @@ message QueryPacketAcknowledgementResponse {
// merkle proof path // merkle proof path
string proof_path = 3; string proof_path = 3;
// height at which the proof was retrieved // height at which the proof was retrieved
ibc.client.Height proof_height = 4 [ ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }
// QueryUnrelayedPacketsRequest is the request type for the // QueryUnrelayedPacketsRequest is the request type for the
@ -291,9 +270,7 @@ message QueryUnrelayedPacketsResponse {
// list of unrelayed packet sequences // list of unrelayed packet sequences
repeated uint64 sequences = 1; repeated uint64 sequences = 1;
// query block height // query block height
ibc.client.Height height = 2 [ ibc.client.Height height = 2 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }
// QueryNextSequenceReceiveRequest is the request type for the // QueryNextSequenceReceiveRequest is the request type for the
@ -315,8 +292,5 @@ message QueryNextSequenceReceiveResponse {
// merkle proof path // merkle proof path
string proof_path = 3; string proof_path = 3;
// height at which the proof was retrieved // height at which the proof was retrieved
ibc.client.Height proof_height = 4 [ ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }

View File

@ -12,8 +12,7 @@ message IdentifiedClientState {
// client identifier // client identifier
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
// client state // client state
google.protobuf.Any client_state = 2 google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""];
[(gogoproto.moretags) = "yaml:\"client_state\""];
} }
// ClientConsensusStates defines all the stored consensus states for a given // ClientConsensusStates defines all the stored consensus states for a given
@ -22,8 +21,7 @@ message ClientConsensusStates {
// client identifier // client identifier
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
// consensus states associated with the client // consensus states associated with the client
repeated google.protobuf.Any consensus_states = 2 repeated google.protobuf.Any consensus_states = 2 [(gogoproto.moretags) = "yaml:\"consensus_states\""];
[(gogoproto.moretags) = "yaml:\"consensus_states\""];
} }
// ClientUpdateProposal is a governance proposal. If it passes, the client is // ClientUpdateProposal is a governance proposal. If it passes, the client is
@ -46,15 +44,12 @@ message MsgCreateClient {
// client unique identifier // client unique identifier
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
// light client state // light client state
google.protobuf.Any client_state = 2 google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""];
[(gogoproto.moretags) = "yaml:\"client_state\""];
// consensus state associated with the client that corresponds to a given // consensus state associated with the client that corresponds to a given
// height. // height.
google.protobuf.Any consensus_state = 3 google.protobuf.Any consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""];
[(gogoproto.moretags) = "yaml:\"consensus_state\""];
// signer address // signer address
bytes signer = 4 bytes signer = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
} }
// MsgUpdateClient defines an sdk.Msg to update a IBC client state using // MsgUpdateClient defines an sdk.Msg to update a IBC client state using
@ -65,8 +60,7 @@ message MsgUpdateClient {
// header to update the light client // header to update the light client
google.protobuf.Any header = 2; google.protobuf.Any header = 2;
// signer address // signer address
bytes signer = 3 bytes signer = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
} }
// MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for // MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for
@ -77,8 +71,7 @@ message MsgSubmitMisbehaviour {
// misbehaviour used for freezing the light client // misbehaviour used for freezing the light client
google.protobuf.Any misbehaviour = 2; google.protobuf.Any misbehaviour = 2;
// signer address // signer address
bytes signer = 3 bytes signer = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
} }
// Height is a monotonically increasing data type // Height is a monotonically increasing data type
@ -91,7 +84,7 @@ message MsgSubmitMisbehaviour {
// In these cases, the epoch number is incremented so that height continues to // In these cases, the epoch number is incremented so that height continues to
// be monitonically increasing even as the EpochHeight gets reset // be monitonically increasing even as the EpochHeight gets reset
message Height { message Height {
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_stringer) = false;
// the epoch that the client is currently on // the epoch that the client is currently on

View File

@ -23,7 +23,8 @@ service Query {
// ConsensusState queries a consensus state associated with a client state at a given height. // ConsensusState queries a consensus state associated with a client state at a given height.
rpc ConsensusState(QueryConsensusStateRequest) returns (QueryConsensusStateResponse) { rpc ConsensusState(QueryConsensusStateRequest) returns (QueryConsensusStateResponse) {
option (google.api.http).get = "/ibc/client/v1beta1/consensus_states/{client_id}/epoch/{epoch_number}/height/{epoch_height}"; option (google.api.http).get =
"/ibc/client/v1beta1/consensus_states/{client_id}/epoch/{epoch_number}/height/{epoch_height}";
} }
// ConsensusStates queries all the consensus state associated with a given client. // ConsensusStates queries all the consensus state associated with a given client.
@ -50,9 +51,7 @@ message QueryClientStateResponse {
// merkle proof path // merkle proof path
string proof_path = 3; string proof_path = 3;
// height at which the proof was retrieved // height at which the proof was retrieved
ibc.client.Height proof_height = 4 [ ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }
// QueryClientStatesRequest is the request type for the Query/ClientStates RPC // QueryClientStatesRequest is the request type for the Query/ClientStates RPC
@ -76,7 +75,7 @@ message QueryClientStatesResponse {
message QueryConsensusStateRequest { message QueryConsensusStateRequest {
// client identifier // client identifier
string client_id = 1; string client_id = 1;
// consensus state epoch number // consensus state epoch number
uint64 epoch_number = 2; uint64 epoch_number = 2;
// consensus state epoch height // consensus state epoch height
uint64 epoch_height = 3; uint64 epoch_height = 3;
@ -93,10 +92,8 @@ message QueryConsensusStateResponse {
// merkle proof path // merkle proof path
string proof_path = 3; string proof_path = 3;
// height at which the proof was retrieved // height at which the proof was retrieved
ibc.client.Height proof_height = 4 [ ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false ;
];
;
} }
// QueryConsensusStatesRequest is the request type for the Query/ConsensusStates RPC method. // QueryConsensusStatesRequest is the request type for the Query/ConsensusStates RPC method.

View File

@ -25,10 +25,7 @@ message MerklePrefix {
message MerklePath { message MerklePath {
option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_stringer) = false;
KeyPath key_path = 1 [ KeyPath key_path = 1 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"key_path\""];
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"key_path\""
];
} }
// MerkleProof is a wrapper type that contains a merkle proof. // MerkleProof is a wrapper type that contains a merkle proof.

View File

@ -11,94 +11,60 @@ import "ibc/client/client.proto";
// MsgConnectionOpenInit defines the msg sent by an account on Chain A to // MsgConnectionOpenInit defines the msg sent by an account on Chain A to
// initialize a connection with Chain B. // initialize a connection with Chain B.
message MsgConnectionOpenInit { message MsgConnectionOpenInit {
string client_id = 1 [ string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
(gogoproto.moretags) = "yaml:\"client_id\"" string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""];
]; Counterparty counterparty = 3 [(gogoproto.nullable) = false];
string connection_id = 2 [ bytes signer = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
(gogoproto.moretags) = "yaml:\"connection_id\""
];
Counterparty counterparty = 3 [(gogoproto.nullable) = false];
bytes signer = 4
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
} }
// MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a // MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a
// connection on Chain B. // connection on Chain B.
message MsgConnectionOpenTry { message MsgConnectionOpenTry {
string client_id = 1 [ string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
(gogoproto.moretags) = "yaml:\"client_id\"" string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""];
]; google.protobuf.Any client_state = 3 [(gogoproto.moretags) = "yaml:\"client_state\""];
string connection_id = 2 [ Counterparty counterparty = 4 [(gogoproto.nullable) = false];
(gogoproto.moretags) = "yaml:\"connection_id\"" repeated string counterparty_versions = 5 [(gogoproto.moretags) = "yaml:\"counterparty_versions\""];
]; ibc.client.Height proof_height = 6 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
google.protobuf.Any client_state = 3 [
(gogoproto.moretags) = "yaml:\"client_state\""
];
Counterparty counterparty = 4 [(gogoproto.nullable) = false];
repeated string counterparty_versions = 5
[(gogoproto.moretags) = "yaml:\"counterparty_versions\""];
ibc.client.Height proof_height = 6 [
(gogoproto.moretags) = "yaml:\"proof_height\"",
(gogoproto.nullable) = false
];
// proof of the initialization the connection on Chain A: `UNITIALIZED -> // proof of the initialization the connection on Chain A: `UNITIALIZED ->
// INIT` // INIT`
bytes proof_init = 7 [(gogoproto.moretags) = "yaml:\"proof_init\""]; bytes proof_init = 7 [(gogoproto.moretags) = "yaml:\"proof_init\""];
// proof of client state included in message // proof of client state included in message
bytes proof_client = 8 [(gogoproto.moretags) = "yaml:\"proof_client\""]; bytes proof_client = 8 [(gogoproto.moretags) = "yaml:\"proof_client\""];
// proof of client consensus state // proof of client consensus state
bytes proof_consensus = 9 [(gogoproto.moretags) = "yaml:\"proof_consensus\""]; bytes proof_consensus = 9 [(gogoproto.moretags) = "yaml:\"proof_consensus\""];
ibc.client.Height consensus_height = 10 [ ibc.client.Height consensus_height = 10
(gogoproto.moretags) = "yaml:\"consensus_height\"", [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false];
(gogoproto.nullable) = false bytes signer = 11 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
];
bytes signer = 11
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
} }
// MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to // MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to
// acknowledge the change of connection state to TRYOPEN on Chain B. // acknowledge the change of connection state to TRYOPEN on Chain B.
message MsgConnectionOpenAck { message MsgConnectionOpenAck {
string connection_id = 1 [ string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""];
(gogoproto.moretags) = "yaml:\"connection_id\"" string version = 2;
]; google.protobuf.Any client_state = 3 [(gogoproto.moretags) = "yaml:\"client_state\""];
string version = 2; ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
google.protobuf.Any client_state = 3 [
(gogoproto.moretags) = "yaml:\"client_state\""
];
ibc.client.Height proof_height = 4 [
(gogoproto.moretags) = "yaml:\"proof_height\"",
(gogoproto.nullable) = false
];
// proof of the initialization the connection on Chain B: `UNITIALIZED -> // proof of the initialization the connection on Chain B: `UNITIALIZED ->
// TRYOPEN` // TRYOPEN`
bytes proof_try = 5 [(gogoproto.moretags) = "yaml:\"proof_try\""]; bytes proof_try = 5 [(gogoproto.moretags) = "yaml:\"proof_try\""];
// proof of client state included in message // proof of client state included in message
bytes proof_client = 6 [(gogoproto.moretags) = "yaml:\"proof_client\""]; bytes proof_client = 6 [(gogoproto.moretags) = "yaml:\"proof_client\""];
// proof of client consensus state // proof of client consensus state
bytes proof_consensus = 7 [(gogoproto.moretags) = "yaml:\"proof_consensus\""]; bytes proof_consensus = 7 [(gogoproto.moretags) = "yaml:\"proof_consensus\""];
ibc.client.Height consensus_height = 8 [ ibc.client.Height consensus_height = 8
(gogoproto.moretags) = "yaml:\"consensus_height\"", [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false];
(gogoproto.nullable) = false bytes signer = 9 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
];
bytes signer = 9
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
} }
// MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to // MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to
// acknowledge the change of connection state to OPEN on Chain A. // acknowledge the change of connection state to OPEN on Chain A.
message MsgConnectionOpenConfirm { message MsgConnectionOpenConfirm {
string connection_id = 1 [ string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""];
(gogoproto.moretags) = "yaml:\"connection_id\""
];
// proof for the change of the connection state on Chain A: `INIT -> OPEN` // proof for the change of the connection state on Chain A: `INIT -> OPEN`
bytes proof_ack = 2 [(gogoproto.moretags) = "yaml:\"proof_ack\""]; bytes proof_ack = 2 [(gogoproto.moretags) = "yaml:\"proof_ack\""];
ibc.client.Height proof_height = 3 [ ibc.client.Height proof_height = 3 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
(gogoproto.moretags) = "yaml:\"proof_height\"", bytes signer = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
(gogoproto.nullable) = false
];
bytes signer = 4
[(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"];
} }
// ICS03 - Connection Data Structures as defined in // ICS03 - Connection Data Structures as defined in
@ -110,9 +76,7 @@ message MsgConnectionOpenConfirm {
message ConnectionEnd { message ConnectionEnd {
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
// client associated with this connection. // client associated with this connection.
string client_id = 1 [ string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
(gogoproto.moretags) = "yaml:\"client_id\""
];
// IBC version which can be utilised to determine encodings or protocols for // IBC version which can be utilised to determine encodings or protocols for
// channels or packets utilising this connection // channels or packets utilising this connection
repeated string versions = 2; repeated string versions = 2;
@ -127,12 +91,9 @@ message ConnectionEnd {
message IdentifiedConnection { message IdentifiedConnection {
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
// connection identifier. // connection identifier.
string id = 1 string id = 1 [(gogoproto.moretags) = "yaml:\"id\""];
[(gogoproto.moretags) = "yaml:\"id\""];
// client associated with this connection. // client associated with this connection.
string client_id = 2 [ string client_id = 2 [(gogoproto.moretags) = "yaml:\"client_id\""];
(gogoproto.moretags) = "yaml:\"client_id\""
];
// IBC version which can be utilised to determine encodings or protocols for // IBC version which can be utilised to determine encodings or protocols for
// channels or packets utilising this connection // channels or packets utilising this connection
repeated string versions = 3; repeated string versions = 3;
@ -148,8 +109,7 @@ enum State {
option (gogoproto.goproto_enum_prefix) = false; option (gogoproto.goproto_enum_prefix) = false;
// Default State // Default State
STATE_UNINITIALIZED_UNSPECIFIED = 0 STATE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNINITIALIZED"];
[(gogoproto.enumvalue_customname) = "UNINITIALIZED"];
// A connection end has just started the opening handshake. // A connection end has just started the opening handshake.
STATE_INIT = 1 [(gogoproto.enumvalue_customname) = "INIT"]; STATE_INIT = 1 [(gogoproto.enumvalue_customname) = "INIT"];
// A connection end has acknowledged the handshake step on the counterparty // A connection end has acknowledged the handshake step on the counterparty
@ -165,14 +125,10 @@ message Counterparty {
// identifies the client on the counterparty chain associated with a given // identifies the client on the counterparty chain associated with a given
// connection. // connection.
string client_id = 1 [ string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
(gogoproto.moretags) = "yaml:\"client_id\""
];
// identifies the connection end on the counterparty chain associated with a // identifies the connection end on the counterparty chain associated with a
// given connection. // given connection.
string connection_id = 2 [ string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""];
(gogoproto.moretags) = "yaml:\"connection_id\""
];
// commitment merkle prefix of the counterparty chain // commitment merkle prefix of the counterparty chain
ibc.commitment.MerklePrefix prefix = 3 [(gogoproto.nullable) = false]; ibc.commitment.MerklePrefix prefix = 3 [(gogoproto.nullable) = false];
} }
@ -186,9 +142,7 @@ message ClientPaths {
// ConnectionPaths define all the connection paths for a given client state. // ConnectionPaths define all the connection paths for a given client state.
message ConnectionPaths { message ConnectionPaths {
// client state unique identifier // client state unique identifier
string client_id = 1 [ string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
(gogoproto.moretags) = "yaml:\"client_id\""
];
// list of connection paths // list of connection paths
repeated string paths = 2; repeated string paths = 2;
} }

View File

@ -6,14 +6,9 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/03-connection/types";
import "gogoproto/gogo.proto"; import "gogoproto/gogo.proto";
import "ibc/connection/connection.proto"; import "ibc/connection/connection.proto";
// GenesisState defines the ibc connection submodule's genesis state. // GenesisState defines the ibc connection submodule's genesis state.
message GenesisState { message GenesisState {
repeated IdentifiedConnection connections = 1 [ repeated IdentifiedConnection connections = 1 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false repeated ConnectionPaths client_connection_paths = 2
]; [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_connection_paths\""];
repeated ConnectionPaths client_connection_paths = 2 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"client_connection_paths\""
];
} }

View File

@ -14,7 +14,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/03-connection/types";
service Query { service Query {
// Connection queries an IBC connection end. // Connection queries an IBC connection end.
rpc Connection(QueryConnectionRequest) returns (QueryConnectionResponse) { rpc Connection(QueryConnectionRequest) returns (QueryConnectionResponse) {
option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}"; option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}";
} }
// Connections queries all the IBC connections of a chain. // Connections queries all the IBC connections of a chain.
@ -24,23 +24,21 @@ service Query {
// ClientConnections queries the connection paths associated with a client // ClientConnections queries the connection paths associated with a client
// state. // state.
rpc ClientConnections(QueryClientConnectionsRequest) rpc ClientConnections(QueryClientConnectionsRequest) returns (QueryClientConnectionsResponse) {
returns (QueryClientConnectionsResponse) { option (google.api.http).get = "/ibc/connection/v1beta1/client_connections/{client_id}";
option (google.api.http).get = "/ibc/connection/v1beta1/client_connections/{client_id}";
} }
// ConnectionClientState queries the client state associated with the // ConnectionClientState queries the client state associated with the
// connection. // connection.
rpc ConnectionClientState(QueryConnectionClientStateRequest) rpc ConnectionClientState(QueryConnectionClientStateRequest) returns (QueryConnectionClientStateResponse) {
returns (QueryConnectionClientStateResponse) { option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}/client_state";
option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}/client_state";
} }
// ConnectionConsensusState queries the consensus state associated with the // ConnectionConsensusState queries the consensus state associated with the
// connection. // connection.
rpc ConnectionConsensusState(QueryConnectionConsensusStateRequest) rpc ConnectionConsensusState(QueryConnectionConsensusStateRequest) returns (QueryConnectionConsensusStateResponse) {
returns (QueryConnectionConsensusStateResponse) { option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}/consensus_state/epoch/"
option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}/consensus_state/epoch/{epoch_number}/height/{epoch_height}"; "{epoch_number}/height/{epoch_height}";
} }
} }
@ -62,9 +60,7 @@ message QueryConnectionResponse {
// merkle proof path // merkle proof path
string proof_path = 3; string proof_path = 3;
// height at which the proof was retrieved // height at which the proof was retrieved
ibc.client.Height proof_height = 4 [ ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }
// QueryConnectionsRequest is the request type for the Query/Connections RPC // QueryConnectionsRequest is the request type for the Query/Connections RPC
@ -81,9 +77,7 @@ message QueryConnectionsResponse {
// pagination response // pagination response
cosmos.base.query.v1beta1.PageResponse pagination = 2; cosmos.base.query.v1beta1.PageResponse pagination = 2;
// query block height // query block height
ibc.client.Height height = 3 [ ibc.client.Height height = 3 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }
// QueryClientConnectionsRequest is the request type for the // QueryClientConnectionsRequest is the request type for the
@ -103,18 +97,14 @@ message QueryClientConnectionsResponse {
// merkle proof path // merkle proof path
string proof_path = 3; string proof_path = 3;
// height at which the proof was generated // height at which the proof was generated
ibc.client.Height proof_height = 4 [ ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }
// QueryConnectionClientStateRequest is the request type for the // QueryConnectionClientStateRequest is the request type for the
// Query/ConnectionClientState RPC method // Query/ConnectionClientState RPC method
message QueryConnectionClientStateRequest { message QueryConnectionClientStateRequest {
// connection identifier // connection identifier
string connection_id = 1 [ string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""];
(gogoproto.moretags) = "yaml:\"connection_id\""
];
} }
// QueryConnectionClientStateResponse is the response type for the // QueryConnectionClientStateResponse is the response type for the
@ -127,20 +117,16 @@ message QueryConnectionClientStateResponse {
// merkle proof path // merkle proof path
string proof_path = 3; string proof_path = 3;
// height at which the proof was retrieved // height at which the proof was retrieved
ibc.client.Height proof_height = 4 [ ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }
// QueryConnectionConsensusStateRequest is the request type for the // QueryConnectionConsensusStateRequest is the request type for the
// Query/ConnectionConsensusState RPC method // Query/ConnectionConsensusState RPC method
message QueryConnectionConsensusStateRequest { message QueryConnectionConsensusStateRequest {
// connection identifier // connection identifier
string connection_id = 1 [ string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""];
(gogoproto.moretags) = "yaml:\"connection_id\"" uint64 epoch_number = 2;
]; uint64 epoch_height = 3;
uint64 epoch_number = 2;
uint64 epoch_height = 3;
} }
// QueryConnectionConsensusStateResponse is the response type for the // QueryConnectionConsensusStateResponse is the response type for the
@ -155,7 +141,5 @@ message QueryConnectionConsensusStateResponse {
// merkle proof path // merkle proof path
string proof_path = 4; string proof_path = 4;
// height at which the proof was retrieved // height at which the proof was retrieved
ibc.client.Height proof_height = 5 [ ibc.client.Height proof_height = 5 [(gogoproto.nullable) = false];
(gogoproto.nullable) = false
];
} }

View File

@ -18,17 +18,11 @@ message ClientState {
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
string chain_id = 1; string chain_id = 1;
Fraction trust_level = 2 [ Fraction trust_level = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"trust_level\""];
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"trust_level\""
];
// duration of the period since the LastestTimestamp during which the // duration of the period since the LastestTimestamp during which the
// submitted headers are valid for upgrade // submitted headers are valid for upgrade
google.protobuf.Duration trusting_period = 3 [ google.protobuf.Duration trusting_period = 3
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"trusting_period\""];
(gogoproto.stdduration) = true,
(gogoproto.moretags) = "yaml:\"trusting_period\""
];
// duration of the staking unbonding period // duration of the staking unbonding period
google.protobuf.Duration unbonding_period = 4 [ google.protobuf.Duration unbonding_period = 4 [
(gogoproto.nullable) = false, (gogoproto.nullable) = false,
@ -36,33 +30,21 @@ message ClientState {
(gogoproto.moretags) = "yaml:\"unbonding_period\"" (gogoproto.moretags) = "yaml:\"unbonding_period\""
]; ];
// defines how much new (untrusted) header's Time can drift into the future. // defines how much new (untrusted) header's Time can drift into the future.
google.protobuf.Duration max_clock_drift = 5 [ google.protobuf.Duration max_clock_drift = 5
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"max_clock_drift\""];
(gogoproto.stdduration) = true,
(gogoproto.moretags) = "yaml:\"max_clock_drift\""
];
// Block height when the client was frozen due to a misbehaviour // Block height when the client was frozen due to a misbehaviour
ibc.client.Height frozen_height = 6 [ ibc.client.Height frozen_height = 6 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"frozen_height\""];
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"frozen_height\""
];
// Latest height the client was updated to // Latest height the client was updated to
ibc.client.Height latest_height = 7 [ ibc.client.Height latest_height = 7 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"latest_height\""];
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"latest_height\""
];
// Proof specifications used in verifying counterparty state // Proof specifications used in verifying counterparty state
repeated ics23.ProofSpec proof_specs = 8 repeated ics23.ProofSpec proof_specs = 8 [(gogoproto.moretags) = "yaml:\"proof_specs\""];
[(gogoproto.moretags) = "yaml:\"proof_specs\""];
// This flag, when set to true, will allow governance to recover a client // This flag, when set to true, will allow governance to recover a client
// which has expired // which has expired
bool allow_update_after_expiry = 9 bool allow_update_after_expiry = 9 [(gogoproto.moretags) = "yaml:\"allow_update_after_expiry\""];
[(gogoproto.moretags) = "yaml:\"allow_update_after_expiry\""];
// This flag, when set to true, will allow governance to unfreeze a client // This flag, when set to true, will allow governance to unfreeze a client
// whose chain has experienced a misbehaviour event // whose chain has experienced a misbehaviour event
bool allow_update_after_misbehaviour = 10 bool allow_update_after_misbehaviour = 10 [(gogoproto.moretags) = "yaml:\"allow_update_after_misbehaviour\""];
[(gogoproto.moretags) = "yaml:\"allow_update_after_misbehaviour\""];
} }
// ConsensusState defines the consensus state from Tendermint. // ConsensusState defines the consensus state from Tendermint.
@ -71,15 +53,13 @@ message ConsensusState {
// timestamp that corresponds to the block height in which the ConsensusState // timestamp that corresponds to the block height in which the ConsensusState
// was stored. // was stored.
google.protobuf.Timestamp timestamp = 1 google.protobuf.Timestamp timestamp = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
// commitment root (i.e app hash) // commitment root (i.e app hash)
ibc.commitment.MerkleRoot root = 2 [(gogoproto.nullable) = false]; ibc.commitment.MerkleRoot root = 2 [(gogoproto.nullable) = false];
// height at which the consensus state was stored. // height at which the consensus state was stored.
ibc.client.Height height = 3 [(gogoproto.nullable) = false]; ibc.client.Height height = 3 [(gogoproto.nullable) = false];
bytes next_validators_hash = 4 [ bytes next_validators_hash = 4 [
(gogoproto.casttype) = (gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes",
"github.com/tendermint/tendermint/libs/bytes.HexBytes",
(gogoproto.moretags) = "yaml:\"next_validators_hash\"" (gogoproto.moretags) = "yaml:\"next_validators_hash\""
]; ];
} }
@ -92,14 +72,8 @@ message Misbehaviour {
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
string chain_id = 2 [(gogoproto.moretags) = "yaml:\"chain_id\""]; string chain_id = 2 [(gogoproto.moretags) = "yaml:\"chain_id\""];
Header header_1 = 3 [ Header header_1 = 3 [(gogoproto.customname) = "Header1", (gogoproto.moretags) = "yaml:\"header_1\""];
(gogoproto.customname) = "Header1", Header header_2 = 4 [(gogoproto.customname) = "Header2", (gogoproto.moretags) = "yaml:\"header_2\""];
(gogoproto.moretags) = "yaml:\"header_1\""
];
Header header_2 = 4 [
(gogoproto.customname) = "Header2",
(gogoproto.moretags) = "yaml:\"header_2\""
];
} }
// Header defines the Tendermint client consensus Header. // Header defines the Tendermint client consensus Header.
@ -115,19 +89,12 @@ message Misbehaviour {
// hash to TrustedConsensusState.NextValidatorsHash since that is the last // hash to TrustedConsensusState.NextValidatorsHash since that is the last
// trusted validator set at the TrustedHeight. // trusted validator set at the TrustedHeight.
message Header { message Header {
.tendermint.types.SignedHeader signed_header = 1 [ .tendermint.types.SignedHeader signed_header = 1
(gogoproto.embed) = true, [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"signed_header\""];
(gogoproto.moretags) = "yaml:\"signed_header\""
];
.tendermint.types.ValidatorSet validator_set = 2 .tendermint.types.ValidatorSet validator_set = 2 [(gogoproto.moretags) = "yaml:\"validator_set\""];
[(gogoproto.moretags) = "yaml:\"validator_set\""]; ibc.client.Height trusted_height = 3 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"trusted_height\""];
ibc.client.Height trusted_height = 3 [ .tendermint.types.ValidatorSet trusted_validators = 4 [(gogoproto.moretags) = "yaml:\"trusted_validators\""];
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"trusted_height\""
];
.tendermint.types.ValidatorSet trusted_validators = 4
[(gogoproto.moretags) = "yaml:\"trusted_validators\""];
} }
// Fraction defines the protobuf message type for tmmath.Fraction // Fraction defines the protobuf message type for tmmath.Fraction
@ -135,4 +102,3 @@ message Fraction {
int64 numerator = 1; int64 numerator = 1;
int64 denominator = 2; int64 denominator = 2;
} }

View File

@ -7,16 +7,12 @@ import "gogoproto/gogo.proto";
import "ibc/transfer/transfer.proto"; import "ibc/transfer/transfer.proto";
// GenesisState defines the ibc-transfer genesis state // GenesisState defines the ibc-transfer genesis state
message GenesisState{ message GenesisState {
string port_id = 1 [ string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
(gogoproto.moretags) = "yaml:\"port_id\"" repeated DenomTrace denom_traces = 2 [
]; (gogoproto.castrepeated) = "Traces",
repeated DenomTrace denom_traces = 2 [ (gogoproto.nullable) = false,
(gogoproto.castrepeated) = "Traces", (gogoproto.moretags) = "yaml:\"denom_traces\""
(gogoproto.nullable) = false, ];
(gogoproto.moretags) = "yaml:\"denom_traces\"" Params params = 3 [(gogoproto.nullable) = false];
];
Params params = 3 [
(gogoproto.nullable) = false
];
} }

View File

@ -40,26 +40,23 @@ message QueryDenomTraceResponse {
// QueryConnectionsRequest is the request type for the Query/DenomTraces RPC method // QueryConnectionsRequest is the request type for the Query/DenomTraces RPC method
message QueryDenomTracesRequest { message QueryDenomTracesRequest {
// pagination defines an optional pagination for the request. // pagination defines an optional pagination for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 1; cosmos.base.query.v1beta1.PageRequest pagination = 1;
} }
// QueryConnectionsResponse is the response type for the Query/DenomTraces RPC method. // QueryConnectionsResponse is the response type for the Query/DenomTraces RPC method.
message QueryDenomTracesResponse { message QueryDenomTracesResponse {
// denom_traces returns all denominations trace information. // denom_traces returns all denominations trace information.
repeated DenomTrace denom_traces = 1 [ repeated DenomTrace denom_traces = 1 [(gogoproto.castrepeated) = "Traces", (gogoproto.nullable) = false];
(gogoproto.castrepeated) = "Traces",
(gogoproto.nullable) = false
];
// pagination defines the pagination in the response. // pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2; cosmos.base.query.v1beta1.PageResponse pagination = 2;
} }
// QueryParamsRequest is the request type for the Query/Params RPC method. // QueryParamsRequest is the request type for the Query/Params RPC method.
message QueryParamsRequest{} message QueryParamsRequest {}
// QueryParamsResponse is the response type for the Query/Params RPC method. // QueryParamsResponse is the response type for the Query/Params RPC method.
message QueryParamsResponse{ message QueryParamsResponse {
// params defines the parameters of the module. // params defines the parameters of the module.
Params params = 1; Params params = 1;
} }

View File

@ -23,10 +23,7 @@ message MsgTransfer {
string receiver = 5; string receiver = 5;
// Timeout height relative to the current block height. // Timeout height relative to the current block height.
// The timeout is disabled when set to 0. // The timeout is disabled when set to 0.
ibc.client.Height timeout_height = 6 [ ibc.client.Height timeout_height = 6 [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false];
(gogoproto.moretags) = "yaml:\"timeout_height\"",
(gogoproto.nullable) = false
];
// Timeout timestamp (in nanoseconds) relative to the current block timestamp. // Timeout timestamp (in nanoseconds) relative to the current block timestamp.
// The timeout is disabled when set to 0. // The timeout is disabled when set to 0.
uint64 timeout_timestamp = 7 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; uint64 timeout_timestamp = 7 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""];
@ -51,8 +48,8 @@ message FungibleTokenPacketData {
// onAcknowledgePacket: // onAcknowledgePacket:
// https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#packet-relay // https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#packet-relay
message FungibleTokenPacketAcknowledgement { message FungibleTokenPacketAcknowledgement {
bool success = 1; bool success = 1;
string error = 2; string error = 2;
} }
// DenomTrace contains the base denomination for ICS20 fungible tokens and the source tracing // DenomTrace contains the base denomination for ICS20 fungible tokens and the source tracing
@ -70,11 +67,7 @@ message DenomTrace {
// true and then set the bank module's SendEnabled parameter for the denomination to false. // true and then set the bank module's SendEnabled parameter for the denomination to false.
message Params { message Params {
// send_enabled enables or disables all cross-chain token transfers from this chain. // send_enabled enables or disables all cross-chain token transfers from this chain.
bool send_enabled = 1 [ bool send_enabled = 1 [(gogoproto.moretags) = "yaml:\"send_enabled\""];
(gogoproto.moretags) = "yaml:\"send_enabled\""
];
// receive_enabled enables or disables all cross-chain token transfers to this chain. // receive_enabled enables or disables all cross-chain token transfers to this chain.
bool receive_enabled = 2 [ bool receive_enabled = 2 [(gogoproto.moretags) = "yaml:\"receive_enabled\""];
(gogoproto.moretags) = "yaml:\"receive_enabled\""
];
} }

View File

@ -11,18 +11,12 @@ import "ibc/channel/genesis.proto";
// GenesisState defines the ibc module's genesis state. // GenesisState defines the ibc module's genesis state.
message GenesisState { message GenesisState {
// ICS002 - Clients genesis state // ICS002 - Clients genesis state
ibc.client.GenesisState client_genesis = 1 [ ibc.client.GenesisState client_genesis = 1
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_genesis\""];
(gogoproto.moretags) = "yaml:\"client_genesis\""
];
// ICS003 - Connections genesis state // ICS003 - Connections genesis state
ibc.connection.GenesisState connection_genesis = 2 [ ibc.connection.GenesisState connection_genesis = 2
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"connection_genesis\""];
(gogoproto.moretags) = "yaml:\"connection_genesis\""
];
// ICS004 - Channel genesis state // ICS004 - Channel genesis state
ibc.channel.GenesisState channel_genesis = 3 [ ibc.channel.GenesisState channel_genesis = 3
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"channel_genesis\""];
(gogoproto.moretags) = "yaml:\"channel_genesis\""
];
} }

View File

@ -19,7 +19,7 @@ message Cat {
message HasAnimal { message HasAnimal {
google.protobuf.Any animal = 1; google.protobuf.Any animal = 1;
int64 x = 2; int64 x = 2;
} }
message HasHasAnimal { message HasHasAnimal {
@ -57,7 +57,7 @@ message TestAnyRequest {
} }
message TestAnyResponse { message TestAnyResponse {
HasAnimal has_animal = 1; HasAnimal has_animal = 1;
} }
// msg type for testing // msg type for testing
@ -68,306 +68,306 @@ message TestMsg {
// bad MultiSignature with extra fields // bad MultiSignature with extra fields
message BadMultiSignature { message BadMultiSignature {
option (gogoproto.goproto_unrecognized) = true; option (gogoproto.goproto_unrecognized) = true;
repeated bytes signatures = 1; repeated bytes signatures = 1;
bytes malicious_field = 5; bytes malicious_field = 5;
} }
message Customer1 { message Customer1 {
int32 id = 1; int32 id = 1;
string name = 2; string name = 2;
float subscription_fee = 3; float subscription_fee = 3;
string payment = 7; string payment = 7;
} }
message Customer2 { message Customer2 {
int32 id = 1; int32 id = 1;
int32 industry = 2; int32 industry = 2;
string name = 3; string name = 3;
float fewer = 4; float fewer = 4;
int64 reserved = 1047; int64 reserved = 1047;
enum City { enum City {
Laos = 0; Laos = 0;
LosAngeles = 1; LosAngeles = 1;
PaloAlto = 2; PaloAlto = 2;
Moscow = 3; Moscow = 3;
Nairobi = 4; Nairobi = 4;
} }
City city = 6; City city = 6;
google.protobuf.Any miscellaneous = 10; google.protobuf.Any miscellaneous = 10;
} }
message Nested4A { message Nested4A {
int32 id = 1; int32 id = 1;
string name = 2; string name = 2;
} }
message Nested3A { message Nested3A {
int32 id = 1; int32 id = 1;
string name = 2; string name = 2;
repeated Nested4A a4 = 4; repeated Nested4A a4 = 4;
map<int64, Nested4A> index = 5; map<int64, Nested4A> index = 5;
} }
message Nested2A { message Nested2A {
int32 id = 1; int32 id = 1;
string name = 2; string name = 2;
Nested3A nested = 3; Nested3A nested = 3;
} }
message Nested1A { message Nested1A {
int32 id = 1; int32 id = 1;
Nested2A nested = 2; Nested2A nested = 2;
} }
message Nested4B { message Nested4B {
int32 id = 1; int32 id = 1;
int32 age = 2; int32 age = 2;
string name = 3; string name = 3;
} }
message Nested3B { message Nested3B {
int32 id = 1; int32 id = 1;
int32 age = 2; int32 age = 2;
string name = 3; string name = 3;
repeated Nested4B b4 = 4; repeated Nested4B b4 = 4;
} }
message Nested2B { message Nested2B {
int32 id = 1; int32 id = 1;
double fee = 2; double fee = 2;
Nested3B nested = 3; Nested3B nested = 3;
string route = 4; string route = 4;
} }
message Nested1B { message Nested1B {
int32 id = 1; int32 id = 1;
Nested2B nested = 2; Nested2B nested = 2;
int32 age = 3; int32 age = 3;
} }
message Customer3 { message Customer3 {
int32 id = 1; int32 id = 1;
string name = 2; string name = 2;
float sf = 3; float sf = 3;
float surcharge = 4; float surcharge = 4;
string destination = 5; string destination = 5;
oneof payment { oneof payment {
string credit_card_no = 7; string credit_card_no = 7;
string cheque_no = 8; string cheque_no = 8;
} }
Customer1 original = 9; Customer1 original = 9;
} }
message TestVersion1 { message TestVersion1 {
int64 x = 1; int64 x = 1;
TestVersion1 a = 2; TestVersion1 a = 2;
TestVersion1 b = 3; // [(gogoproto.nullable) = false] generates invalid recursive structs; TestVersion1 b = 3; // [(gogoproto.nullable) = false] generates invalid recursive structs;
repeated TestVersion1 c = 4; repeated TestVersion1 c = 4;
repeated TestVersion1 d = 5 [(gogoproto.nullable) = false]; repeated TestVersion1 d = 5 [(gogoproto.nullable) = false];
oneof sum { oneof sum {
int32 e = 6; int32 e = 6;
TestVersion1 f = 7; TestVersion1 f = 7;
} }
google.protobuf.Any g = 8; google.protobuf.Any g = 8;
repeated TestVersion1 h = 9; // [(gogoproto.castrepeated) = "TestVersion1"]; repeated TestVersion1 h = 9; // [(gogoproto.castrepeated) = "TestVersion1"];
// google.protobuf.Timestamp i = 10; // google.protobuf.Timestamp i = 10;
// google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true];
Customer1 k = 12 [(gogoproto.embed) = true]; Customer1 k = 12 [(gogoproto.embed) = true];
} }
message TestVersion2 { message TestVersion2 {
int64 x = 1; int64 x = 1;
TestVersion2 a = 2; TestVersion2 a = 2;
TestVersion2 b = 3; // [(gogoproto.nullable) = false]; TestVersion2 b = 3; // [(gogoproto.nullable) = false];
repeated TestVersion2 c = 4; repeated TestVersion2 c = 4;
repeated TestVersion2 d = 5; // [(gogoproto.nullable) = false]; repeated TestVersion2 d = 5; // [(gogoproto.nullable) = false];
oneof sum { oneof sum {
int32 e = 6; int32 e = 6;
TestVersion2 f = 7; TestVersion2 f = 7;
} }
google.protobuf.Any g = 8; google.protobuf.Any g = 8;
repeated TestVersion1 h = 9; // [(gogoproto.castrepeated) = "TestVersion1"]; repeated TestVersion1 h = 9; // [(gogoproto.castrepeated) = "TestVersion1"];
// google.protobuf.Timestamp i = 10; // google.protobuf.Timestamp i = 10;
// google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true];
Customer1 k = 12 [(gogoproto.embed) = true]; Customer1 k = 12 [(gogoproto.embed) = true];
uint64 new_field = 25; uint64 new_field = 25;
} }
message TestVersion3 { message TestVersion3 {
int64 x = 1; int64 x = 1;
TestVersion3 a = 2; TestVersion3 a = 2;
TestVersion3 b = 3; // [(gogoproto.nullable) = false]; TestVersion3 b = 3; // [(gogoproto.nullable) = false];
repeated TestVersion3 c = 4; repeated TestVersion3 c = 4;
repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false]; repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false];
oneof sum { oneof sum {
int32 e = 6; int32 e = 6;
TestVersion3 f = 7; TestVersion3 f = 7;
} }
google.protobuf.Any g = 8; google.protobuf.Any g = 8;
repeated TestVersion1 h = 9; //[(gogoproto.castrepeated) = "TestVersion1"]; repeated TestVersion1 h = 9; //[(gogoproto.castrepeated) = "TestVersion1"];
// google.protobuf.Timestamp i = 10; // google.protobuf.Timestamp i = 10;
// google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true];
Customer1 k = 12 [(gogoproto.embed) = true]; Customer1 k = 12 [(gogoproto.embed) = true];
string non_critical_field = 1031; string non_critical_field = 1031;
} }
message TestVersion3LoneOneOfValue { message TestVersion3LoneOneOfValue {
int64 x = 1; int64 x = 1;
TestVersion3 a = 2; TestVersion3 a = 2;
TestVersion3 b = 3; // [(gogoproto.nullable) = false]; TestVersion3 b = 3; // [(gogoproto.nullable) = false];
repeated TestVersion3 c = 4; repeated TestVersion3 c = 4;
repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false]; repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false];
oneof sum { oneof sum {
int32 e = 6; int32 e = 6;
} }
google.protobuf.Any g = 8; google.protobuf.Any g = 8;
repeated TestVersion1 h = 9; //[(gogoproto.castrepeated) = "TestVersion1"]; repeated TestVersion1 h = 9; //[(gogoproto.castrepeated) = "TestVersion1"];
// google.protobuf.Timestamp i = 10; // google.protobuf.Timestamp i = 10;
// google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true];
Customer1 k = 12 [(gogoproto.embed) = true]; Customer1 k = 12 [(gogoproto.embed) = true];
string non_critical_field = 1031; string non_critical_field = 1031;
} }
message TestVersion3LoneNesting { message TestVersion3LoneNesting {
int64 x = 1; int64 x = 1;
TestVersion3 a = 2; TestVersion3 a = 2;
TestVersion3 b = 3; // [(gogoproto.nullable) = false]; TestVersion3 b = 3; // [(gogoproto.nullable) = false];
repeated TestVersion3 c = 4; repeated TestVersion3 c = 4;
repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false]; repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false];
oneof sum { oneof sum {
TestVersion3LoneNesting f = 7; TestVersion3LoneNesting f = 7;
}
google.protobuf.Any g = 8;
repeated TestVersion1 h = 9; //[(gogoproto.castrepeated) = "TestVersion1"];
// google.protobuf.Timestamp i = 10;
// google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true];
Customer1 k = 12 [(gogoproto.embed) = true];
string non_critical_field = 1031;
message Inner1 {
int64 id = 1;
string name = 2;
message InnerInner {
string id = 1;
string city = 2;
} }
google.protobuf.Any g = 8; InnerInner inner = 3;
repeated TestVersion1 h = 9; //[(gogoproto.castrepeated) = "TestVersion1"]; }
// google.protobuf.Timestamp i = 10;
// google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true];
Customer1 k = 12 [(gogoproto.embed) = true];
string non_critical_field = 1031;
message Inner1 { Inner1 inner1 = 14;
int64 id = 1;
string name = 2; message Inner2 {
message InnerInner { string id = 1;
string id = 1; string country = 2;
string city = 2; message InnerInner {
} string id = 1;
InnerInner inner = 3; string city = 2;
} }
InnerInner inner = 3;
}
Inner1 inner1 = 14; Inner2 inner2 = 15;
message Inner2 {
string id = 1;
string country = 2;
message InnerInner {
string id = 1;
string city = 2;
}
InnerInner inner = 3;
}
Inner2 inner2 = 15;
} }
message TestVersion4LoneNesting { message TestVersion4LoneNesting {
int64 x = 1; int64 x = 1;
TestVersion3 a = 2; TestVersion3 a = 2;
TestVersion3 b = 3; // [(gogoproto.nullable) = false]; TestVersion3 b = 3; // [(gogoproto.nullable) = false];
repeated TestVersion3 c = 4; repeated TestVersion3 c = 4;
repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false]; repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false];
oneof sum { oneof sum {
TestVersion3LoneNesting f = 7; TestVersion3LoneNesting f = 7;
}
google.protobuf.Any g = 8;
repeated TestVersion1 h = 9; //[(gogoproto.castrepeated) = "TestVersion1"];
// google.protobuf.Timestamp i = 10;
// google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true];
Customer1 k = 12 [(gogoproto.embed) = true];
string non_critical_field = 1031;
message Inner1 {
int64 id = 1;
string name = 2;
message InnerInner {
int64 id = 1;
string city = 2;
} }
google.protobuf.Any g = 8; InnerInner inner = 3;
repeated TestVersion1 h = 9; //[(gogoproto.castrepeated) = "TestVersion1"]; }
// google.protobuf.Timestamp i = 10;
// google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true];
Customer1 k = 12 [(gogoproto.embed) = true];
string non_critical_field = 1031;
message Inner1 { Inner1 inner1 = 14;
int64 id = 1;
string name = 2; message Inner2 {
message InnerInner { string id = 1;
int64 id = 1; string country = 2;
string city = 2; message InnerInner {
} string id = 1;
InnerInner inner = 3; int64 value = 2;
} }
InnerInner inner = 3;
}
Inner1 inner1 = 14; Inner2 inner2 = 15;
message Inner2 {
string id = 1;
string country = 2;
message InnerInner {
string id = 1;
int64 value = 2;
}
InnerInner inner = 3;
}
Inner2 inner2 = 15;
} }
message TestVersionFD1 { message TestVersionFD1 {
int64 x = 1; int64 x = 1;
TestVersion1 a = 2; TestVersion1 a = 2;
oneof sum { oneof sum {
int32 e = 6; int32 e = 6;
TestVersion1 f = 7; TestVersion1 f = 7;
} }
google.protobuf.Any g = 8; google.protobuf.Any g = 8;
repeated TestVersion1 h = 9; // [(gogoproto.castrepeated) = "TestVersion1"]; repeated TestVersion1 h = 9; // [(gogoproto.castrepeated) = "TestVersion1"];
} }
message TestVersionFD1WithExtraAny { message TestVersionFD1WithExtraAny {
int64 x = 1; int64 x = 1;
TestVersion1 a = 2; TestVersion1 a = 2;
oneof sum { oneof sum {
int32 e = 6; int32 e = 6;
TestVersion1 f = 7; TestVersion1 f = 7;
} }
AnyWithExtra g = 8; AnyWithExtra g = 8;
repeated TestVersion1 h = 9; // [(gogoproto.castrepeated) = "TestVersion1"]; repeated TestVersion1 h = 9; // [(gogoproto.castrepeated) = "TestVersion1"];
} }
message AnyWithExtra { message AnyWithExtra {
google.protobuf.Any a = 1 [(gogoproto.embed) = true]; google.protobuf.Any a = 1 [(gogoproto.embed) = true];
int64 b = 3; int64 b = 3;
int64 c = 4; int64 c = 4;
} }
message TestUpdatedTxRaw { message TestUpdatedTxRaw {
bytes body_bytes = 1; bytes body_bytes = 1;
bytes auth_info_bytes = 2; bytes auth_info_bytes = 2;
repeated bytes signatures = 3; repeated bytes signatures = 3;
bytes new_field_5 = 5; bytes new_field_5 = 5;
bytes new_field_1024 = 1024; bytes new_field_1024 = 1024;
} }
message TestUpdatedTxBody { message TestUpdatedTxBody {
repeated google.protobuf.Any messages = 1; repeated google.protobuf.Any messages = 1;
string memo = 2; string memo = 2;
int64 timeout_height = 3; int64 timeout_height = 3;
uint64 some_new_field = 4; uint64 some_new_field = 4;
string some_new_field_non_critical_field = 1050; string some_new_field_non_critical_field = 1050;
repeated google.protobuf.Any extension_options = 1023; repeated google.protobuf.Any extension_options = 1023;
repeated google.protobuf.Any non_critical_extension_options = 2047; repeated google.protobuf.Any non_critical_extension_options = 2047;
} }
message TestUpdatedAuthInfo { message TestUpdatedAuthInfo {
repeated cosmos.tx.v1beta1.SignerInfo signer_infos = 1; repeated cosmos.tx.v1beta1.SignerInfo signer_infos = 1;
cosmos.tx.v1beta1.Fee fee = 2; cosmos.tx.v1beta1.Fee fee = 2;
bytes new_field_3 = 3; bytes new_field_3 = 3;
bytes new_field_1024 = 1024; bytes new_field_1024 = 1024;
} }
message TestRepeatedUints { message TestRepeatedUints {
repeated uint64 nums = 1; repeated uint64 nums = 1;
} }