diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000000..dec78f0f78 --- /dev/null +++ b/.clang-format @@ -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 +... + diff --git a/Makefile b/Makefile index 9fcf5930cc..e8e24b674f 100644 --- a/Makefile +++ b/Makefile @@ -312,11 +312,14 @@ devdoc-update: ### 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: @./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 proto-gen-any: @./scripts/protocgen-any.sh diff --git a/contrib/devtools/Makefile b/contrib/devtools/Makefile index ba0829cc78..8a905a34bf 100644 --- a/contrib/devtools/Makefile +++ b/contrib/devtools/Makefile @@ -122,6 +122,14 @@ ifeq (, $(shell which protoc-gen-swagger)) else @echo "protoc-gen-grpc-gateway already installed; skipping..." 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 diff --git a/proto/cosmos/auth/v1beta1/auth.proto b/proto/cosmos/auth/v1beta1/auth.proto index c07466e0d9..6e3b2d641d 100644 --- a/proto/cosmos/auth/v1beta1/auth.proto +++ b/proto/cosmos/auth/v1beta1/auth.proto @@ -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 // type for additional functionality (e.g. vesting). message BaseAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; option (cosmos_proto.implements_interface) = "AccountI"; 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. message ModuleAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; option (cosmos_proto.implements_interface) = "ModuleAccountI"; - BaseAccount base_account = 1 [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""]; - string name = 2; - repeated string permissions = 3; + BaseAccount base_account = 1 [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""]; + string name = 2; + repeated string permissions = 3; } // Params defines the parameters for the auth module. @@ -43,4 +43,4 @@ message Params { [(gogoproto.customname) = "SigVerifyCostED25519", (gogoproto.moretags) = "yaml:\"sig_verify_cost_ed25519\""]; uint64 sig_verify_cost_secp256k1 = 5 [(gogoproto.customname) = "SigVerifyCostSecp256k1", (gogoproto.moretags) = "yaml:\"sig_verify_cost_secp256k1\""]; -} \ No newline at end of file +} diff --git a/proto/cosmos/auth/v1beta1/genesis.proto b/proto/cosmos/auth/v1beta1/genesis.proto index 17a5727c24..c88b94ee4e 100644 --- a/proto/cosmos/auth/v1beta1/genesis.proto +++ b/proto/cosmos/auth/v1beta1/genesis.proto @@ -10,9 +10,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; // GenesisState defines the auth module's genesis state. message GenesisState { // params defines all the paramaters of the module. - Params params = 1 [ - (gogoproto.nullable) = false - ]; + Params params = 1 [(gogoproto.nullable) = false]; // accounts are the accounts present at genesis. repeated google.protobuf.Any accounts = 2; diff --git a/proto/cosmos/auth/v1beta1/query.proto b/proto/cosmos/auth/v1beta1/query.proto index b9dedff9fc..9fb8b89516 100644 --- a/proto/cosmos/auth/v1beta1/query.proto +++ b/proto/cosmos/auth/v1beta1/query.proto @@ -10,35 +10,35 @@ import "cosmos_proto/cosmos.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; // Query defines the gRPC querier service. -service Query{ - // Account returns account details based on address. - rpc Account (QueryAccountRequest) returns (QueryAccountResponse) { - option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}"; - } +service Query { + // Account returns account details based on address. + rpc Account(QueryAccountRequest) returns (QueryAccountResponse) { + option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}"; + } - // Params queries all parameters. - rpc Params (QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/auth/v1beta1/params"; - } + // Params queries all parameters. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/auth/v1beta1/params"; + } } // QueryAccountRequest is the request type for the Query/Account RPC method. -message QueryAccountRequest{ +message QueryAccountRequest { // address defines the address to query for. bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; } // QueryAccountResponse is the response type for the Query/Account RPC method. -message QueryAccountResponse{ +message QueryAccountResponse { // account defines the account of the corresponding address. google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "AccountI"]; } // 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. -message QueryParamsResponse{ +message QueryParamsResponse { // params defines the parameters of the module. Params params = 1 [(gogoproto.nullable) = false]; -} +} diff --git a/proto/cosmos/bank/v1beta1/bank.proto b/proto/cosmos/bank/v1beta1/bank.proto index 74e6c1f746..95e0fbc921 100644 --- a/proto/cosmos/bank/v1beta1/bank.proto +++ b/proto/cosmos/bank/v1beta1/bank.proto @@ -52,30 +52,30 @@ message Supply { [(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. message DenomUnit { // 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 // raise the base_denom to in order to equal the given DenomUnit's 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). - uint32 exponent = 2; + uint32 exponent = 2; // 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. message Metadata { - string description = 1; + string description = 1; // denom_units represents the list of DenomUnit's for a given coin repeated DenomUnit denom_units = 2; // 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 // displayed in clients. - string display = 4; -} \ No newline at end of file + string display = 4; +} diff --git a/proto/cosmos/bank/v1beta1/genesis.proto b/proto/cosmos/bank/v1beta1/genesis.proto index 7e90b100ee..ec9c56d267 100644 --- a/proto/cosmos/bank/v1beta1/genesis.proto +++ b/proto/cosmos/bank/v1beta1/genesis.proto @@ -10,39 +10,28 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; // GenesisState defines the bank module's genesis state. message GenesisState { // params defines all the paramaters of the module. - Params params = 1 [ - (gogoproto.nullable) = false - ]; + Params params = 1 [(gogoproto.nullable) = false]; // balances is an array containing the balances of all the accounts. - repeated Balance balances = 2 [ - (gogoproto.nullable) = false - ]; + repeated Balance balances = 2 [(gogoproto.nullable) = false]; // supply represents the total supply. - repeated cosmos.base.v1beta1.Coin supply = 3 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.nullable) = false - ]; + repeated cosmos.base.v1beta1.Coin supply = 3 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false]; // denom_metadata defines the metadata of the differents coins. - repeated Metadata denom_metadata = 4 [ - (gogoproto.moretags) = "yaml:\"denom_metadata\"", - (gogoproto.nullable) = false - ]; + repeated Metadata denom_metadata = 4 [(gogoproto.moretags) = "yaml:\"denom_metadata\"", (gogoproto.nullable) = false]; } // Balance defines an account address and balance pair used in the bank module's // genesis state. message Balance { - option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_getters) = false; // address is the address of the balance holder. bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; // coins defines the different coins this balance holds. - repeated cosmos.base.v1beta1.Coin coins = 2 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.nullable) = false - ]; + repeated cosmos.base.v1beta1.Coin coins = 2 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false]; } diff --git a/proto/cosmos/bank/v1beta1/tx.proto b/proto/cosmos/bank/v1beta1/tx.proto index 0ff9794cd4..1195025f7f 100644 --- a/proto/cosmos/bank/v1beta1/tx.proto +++ b/proto/cosmos/bank/v1beta1/tx.proto @@ -27,6 +27,6 @@ message MsgSend { message MsgMultiSend { 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]; } diff --git a/proto/cosmos/base/abci/v1beta1/abci.proto b/proto/cosmos/base/abci/v1beta1/abci.proto index fc05880aa1..98345987f6 100644 --- a/proto/cosmos/base/abci/v1beta1/abci.proto +++ b/proto/cosmos/base/abci/v1beta1/abci.proto @@ -56,7 +56,7 @@ message ABCIMessageLog { message StringEvent { option (gogoproto.stringer) = true; - string type = 1; + string type = 1; repeated Attribute attributes = 2 [(gogoproto.nullable) = false]; } diff --git a/proto/cosmos/base/crypto/v1beta1/crypto.proto b/proto/cosmos/base/crypto/v1beta1/crypto.proto index 4ae4c0303a..a38a22dc12 100644 --- a/proto/cosmos/base/crypto/v1beta1/crypto.proto +++ b/proto/cosmos/base/crypto/v1beta1/crypto.proto @@ -18,14 +18,14 @@ message PublicKey { // any_pubkey can be used for any pubkey that an app may use which is // 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 // keys and a threshold 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\""]; } @@ -34,7 +34,7 @@ message PubKeyMultisigThreshold { // with which modes. message MultiSignature { option (gogoproto.goproto_unrecognized) = true; - repeated bytes signatures = 1; + repeated bytes signatures = 1; } // CompactBitArray is an implementation of a space efficient bit array. diff --git a/proto/cosmos/base/query/v1beta1/pagination.proto b/proto/cosmos/base/query/v1beta1/pagination.proto index 8539fbdce6..48b00bd39d 100644 --- a/proto/cosmos/base/query/v1beta1/pagination.proto +++ b/proto/cosmos/base/query/v1beta1/pagination.proto @@ -11,24 +11,24 @@ option go_package = "github.com/cosmos/cosmos-sdk/types/query"; // PageRequest pagination = 2; // } message PageRequest { - // key is a value returned in PageResponse.next_key to begin - // querying the next page most efficiently. Only one of offset or key - // should be set. - bytes key = 1; + // key is a value returned in PageResponse.next_key to begin + // querying the next page most efficiently. Only one of offset or key + // should be set. + bytes key = 1; - // 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 - // be set. - uint64 offset = 2; + // 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 + // be set. + uint64 offset = 2; - // 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. - uint64 limit = 3; + // 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. + uint64 limit = 3; - // 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 - // is only respected when offset is used. It is ignored when key is set. - bool count_total = 4; + // 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 + // is only respected when offset is used. It is ignored when key is set. + bool count_total = 4; } // PageResponse is to be embedded in gRPC response messages where the corresponding @@ -39,11 +39,11 @@ message PageRequest { // PageResponse page = 2; // } message PageResponse { - // next_key is the key to be passed to PageRequest.key to - // query the next page most efficiently - bytes next_key = 1; + // next_key is the key to be passed to PageRequest.key to + // query the next page most efficiently + bytes next_key = 1; - // total is total number of results available if PageRequest.count_total - // was set, its value is undefined otherwise - uint64 total = 2; + // total is total number of results available if PageRequest.count_total + // was set, its value is undefined otherwise + uint64 total = 2; } diff --git a/proto/cosmos/base/reflection/v1beta1/reflection.proto b/proto/cosmos/base/reflection/v1beta1/reflection.proto index 566375bbde..950c94c98c 100644 --- a/proto/cosmos/base/reflection/v1beta1/reflection.proto +++ b/proto/cosmos/base/reflection/v1beta1/reflection.proto @@ -7,35 +7,35 @@ option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/reflection"; // ReflectionService defines a service for interface reflection. service ReflectionService { - // ListAllInterfaces lists all the interfaces registered in the interface - // registry. - rpc ListAllInterfaces(ListAllInterfacesRequest) returns (ListAllInterfacesResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces"; - }; + // ListAllInterfaces lists all the interfaces registered in the interface + // registry. + rpc ListAllInterfaces(ListAllInterfacesRequest) returns (ListAllInterfacesResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces"; + }; - // ListImplementations list all the concrete types that implement a given - // interface. - rpc ListImplementations(ListImplementationsRequest) returns (ListImplementationsResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces/{interface_name}/implementations"; - }; + // ListImplementations list all the concrete types that implement a given + // interface. + rpc ListImplementations(ListImplementationsRequest) returns (ListImplementationsResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces/{interface_name}/implementations"; + }; } // ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. -message ListAllInterfacesRequest { } +message ListAllInterfacesRequest {} // ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. message ListAllInterfacesResponse { - // interface_names is an array of all the registered interfaces. - repeated string interface_names = 1; + // interface_names is an array of all the registered interfaces. + repeated string interface_names = 1; } // ListImplementationsRequest is the request type of the ListImplementations RPC. message ListImplementationsRequest { - // interface_name defines the interface to query the implementations for. - string interface_name = 1; + // interface_name defines the interface to query the implementations for. + string interface_name = 1; } // ListImplementationsResponse is the response type of the ListImplementations RPC. message ListImplementationsResponse { - repeated string implementation_message_names = 1; + repeated string implementation_message_names = 1; } diff --git a/proto/cosmos/base/simulate/v1beta1/simulate.proto b/proto/cosmos/base/simulate/v1beta1/simulate.proto index 203cf5a00c..e7e678d99c 100644 --- a/proto/cosmos/base/simulate/v1beta1/simulate.proto +++ b/proto/cosmos/base/simulate/v1beta1/simulate.proto @@ -10,24 +10,24 @@ option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/simulate"; // SimulateService defines a gRPC service for simulating transactions. // It may also support querying and broadcasting in the future. service SimulateService { - // Simulate simulates executing a transaction for estimating gas usage. - rpc Simulate(SimulateRequest) returns (SimulateResponse) { - option (google.api.http).post = "/cosmos/base/simulate/v1beta1/simulate"; - } + // Simulate simulates executing a transaction for estimating gas usage. + rpc Simulate(SimulateRequest) returns (SimulateResponse) { + option (google.api.http).post = "/cosmos/base/simulate/v1beta1/simulate"; + } } // SimulateRequest is the request type for the SimulateServiceService.Simulate // RPC method. message SimulateRequest { - // tx is the transaction to simulate. - cosmos.tx.v1beta1.Tx tx = 1; + // tx is the transaction to simulate. + cosmos.tx.v1beta1.Tx tx = 1; } // SimulateResponse is the response type for the // SimulateServiceService.SimulateRPC method. message SimulateResponse { - // gas_info is the information about gas used in the simulation. - cosmos.base.abci.v1beta1.GasInfo gas_info = 1; - // result is the result of the simulation. - cosmos.base.abci.v1beta1.Result result = 2; + // gas_info is the information about gas used in the simulation. + cosmos.base.abci.v1beta1.GasInfo gas_info = 1; + // result is the result of the simulation. + cosmos.base.abci.v1beta1.Result result = 2; } diff --git a/proto/cosmos/base/store/v1beta1/commit_info.proto b/proto/cosmos/base/store/v1beta1/commit_info.proto index 98a33d30e7..3bc23af84e 100644 --- a/proto/cosmos/base/store/v1beta1/commit_info.proto +++ b/proto/cosmos/base/store/v1beta1/commit_info.proto @@ -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 // a version/height. message CommitInfo { - int64 version = 1; + int64 version = 1; repeated StoreInfo store_infos = 2 [(gogoproto.nullable) = false]; } diff --git a/proto/cosmos/capability/v1beta1/capability.proto b/proto/cosmos/capability/v1beta1/capability.proto index f1b9c43e51..001f121cbe 100644 --- a/proto/cosmos/capability/v1beta1/capability.proto +++ b/proto/cosmos/capability/v1beta1/capability.proto @@ -26,7 +26,5 @@ message Owner { // CapabilityOwners defines a set of owners of a single Capability. The set of // owners must be unique. message CapabilityOwners { - repeated Owner owners = 1 [ - (gogoproto.nullable) = false - ]; + repeated Owner owners = 1 [(gogoproto.nullable) = false]; } diff --git a/proto/cosmos/capability/v1beta1/genesis.proto b/proto/cosmos/capability/v1beta1/genesis.proto index 652d75ff35..05bb0afc4a 100644 --- a/proto/cosmos/capability/v1beta1/genesis.proto +++ b/proto/cosmos/capability/v1beta1/genesis.proto @@ -10,12 +10,9 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/capability/types"; message GenesisOwners { // index is the index of the capability owner. uint64 index = 1; - + // index_owners are the owners at the given index. - CapabilityOwners index_owners = 2[ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"index_owners\"" - ]; + CapabilityOwners index_owners = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"index_owners\""]; } // 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 // index key is string to allow amino marshalling. - repeated GenesisOwners owners = 2 [ - (gogoproto.nullable) = false - ]; + repeated GenesisOwners owners = 2 [(gogoproto.nullable) = false]; } diff --git a/proto/cosmos/crisis/v1beta1/genesis.proto b/proto/cosmos/crisis/v1beta1/genesis.proto index e8015be9d8..5b0ff7ec72 100644 --- a/proto/cosmos/crisis/v1beta1/genesis.proto +++ b/proto/cosmos/crisis/v1beta1/genesis.proto @@ -10,8 +10,6 @@ import "cosmos/base/v1beta1/coin.proto"; message GenesisState { // constant_fee is the fee used to verify the invariant in the crisis // module. - cosmos.base.v1beta1.Coin constant_fee = 3 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"constant_fee\"" - ]; + cosmos.base.v1beta1.Coin constant_fee = 3 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"constant_fee\""]; } diff --git a/proto/cosmos/crisis/v1beta1/tx.proto b/proto/cosmos/crisis/v1beta1/tx.proto index 84d1f0101a..11693c41ba 100644 --- a/proto/cosmos/crisis/v1beta1/tx.proto +++ b/proto/cosmos/crisis/v1beta1/tx.proto @@ -9,7 +9,7 @@ import "gogoproto/gogo.proto"; message MsgVerifyInvariant { 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_route = 3 [(gogoproto.moretags) = "yaml:\"invariant_route\""]; } diff --git a/proto/cosmos/distribution/v1beta1/distribution.proto b/proto/cosmos/distribution/v1beta1/distribution.proto index 6780275c61..2c98f19801 100644 --- a/proto/cosmos/distribution/v1beta1/distribution.proto +++ b/proto/cosmos/distribution/v1beta1/distribution.proto @@ -52,20 +52,16 @@ message ValidatorHistoricalRewards { // period for a validator kept as a running counter and incremented // each block as long as the validator's tokens remain constant. message ValidatorCurrentRewards { - repeated cosmos.base.v1beta1.DecCoin rewards = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.nullable) = false - ]; + repeated cosmos.base.v1beta1.DecCoin rewards = 1 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; uint64 period = 2; } // ValidatorAccumulatedCommission represents accumulated commission // for a validator kept as a running counter, can be withdrawn at any time. message ValidatorAccumulatedCommission { - repeated cosmos.base.v1beta1.DecCoin commission = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.nullable) = false - ]; + repeated cosmos.base.v1beta1.DecCoin commission = 1 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; } // ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards @@ -84,10 +80,7 @@ message ValidatorOutstandingRewards { // for delegations which are withdrawn after a slash has occurred. message ValidatorSlashEvent { uint64 validator_period = 1 [(gogoproto.moretags) = "yaml:\"validator_period\""]; - string fraction = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; + string fraction = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; } // 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 // recipient account. message CommunityPoolSpendProposal { - option (gogoproto.goproto_stringer) = false; - option (gogoproto.goproto_getters) = false; - string title = 1; - string description = 2; - bytes recipient = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; - repeated cosmos.base.v1beta1.Coin amount = 4 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.goproto_getters) = false; + string title = 1; + string description = 2; + bytes recipient = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + repeated cosmos.base.v1beta1.Coin amount = 4 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } // 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.nullable) = false ]; - uint64 height = 3 - [(gogoproto.moretags) = "yaml:\"creation_height\"", (gogoproto.jsontag) = "creation_height"]; + uint64 height = 3 [(gogoproto.moretags) = "yaml:\"creation_height\"", (gogoproto.jsontag) = "creation_height"]; } // DelegationDelegatorReward represents the properties @@ -147,20 +137,18 @@ message DelegationDelegatorReward { (gogoproto.moretags) = "yaml:\"validator_address\"" ]; - repeated cosmos.base.v1beta1.DecCoin reward = 2 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.nullable) = false - ]; + repeated cosmos.base.v1beta1.DecCoin reward = 2 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; } // CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal with a deposit message CommunityPoolSpendProposalWithDeposit { - string title = 1 [(gogoproto.moretags) = "yaml:\"title\""]; + string title = 1 [(gogoproto.moretags) = "yaml:\"title\""]; string description = 2 [(gogoproto.moretags) = "yaml:\"description\""]; - bytes recipient = 3 [ + bytes recipient = 3 [ (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", (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\""]; } diff --git a/proto/cosmos/distribution/v1beta1/genesis.proto b/proto/cosmos/distribution/v1beta1/genesis.proto index 3e229d8395..4b8dcc1bfb 100644 --- a/proto/cosmos/distribution/v1beta1/genesis.proto +++ b/proto/cosmos/distribution/v1beta1/genesis.proto @@ -49,10 +49,8 @@ message ValidatorAccumulatedCommissionRecord { ]; // accumulated is the accumulated commission of a validator. - ValidatorAccumulatedCommission accumulated = 2 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"accumulated\"" - ]; + ValidatorAccumulatedCommission accumulated = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"accumulated\""]; } // ValidatorHistoricalRewardsRecord is used for import / export via genesis json. @@ -67,10 +65,7 @@ message ValidatorHistoricalRewardsRecord { uint64 period = 2; // rewards defines the historical rewards of a validator. - ValidatorHistoricalRewards rewards = 3[ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"rewards\"" - ]; + ValidatorHistoricalRewards rewards = 3 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"rewards\""]; } // ValidatorCurrentRewardsRecord is used for import / export via genesis json. @@ -82,10 +77,7 @@ message ValidatorCurrentRewardsRecord { ]; // rewards defines the current rewards of a validator. - ValidatorCurrentRewards rewards = 2[ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"rewards\"" - ]; + ValidatorCurrentRewards rewards = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"rewards\""]; } // DelegatorStartingInfoRecord used for import / export via genesis json. @@ -103,10 +95,8 @@ message DelegatorStartingInfoRecord { ]; // starting_info defines the starting info of a delegator. - DelegatorStartingInfo starting_info = 3 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"starting_info\"" - ]; + DelegatorStartingInfo starting_info = 3 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"starting_info\""]; } // ValidatorSlashEventRecord is used for import / export via genesis json. @@ -121,31 +111,20 @@ message ValidatorSlashEventRecord { // period is the period of the slash event. uint64 period = 3; // event describes the slash event. - ValidatorSlashEvent event = 4 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"event\"" - ]; + ValidatorSlashEvent event = 4 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"event\""]; } // GenesisState defines the distribution module's genesis state. message GenesisState { // params defines all the paramaters of the module. - Params params = 1 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"params\"" - ]; + Params params = 1 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"params\""]; // fee_pool defines the fee pool at genesis. - FeePool fee_pool = 2 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"fee_pool\"" - ]; + FeePool fee_pool = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"fee_pool\""]; // fee_pool defines the delegator withdraw infos at genesis. - repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"delegator_withdraw_infos\"" - ]; + repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"delegator_withdraw_infos\""]; // fee_pool defines the previous proposer at genesis. bytes previous_proposer = 4 [ @@ -154,38 +133,26 @@ message GenesisState { ]; // fee_pool defines the outstanding rewards of all validators at genesis. - repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"outstanding_rewards\"" - ]; + repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"outstanding_rewards\""]; // fee_pool defines the accumulated commisions of all validators at genesis. - repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"validator_accumulated_commissions\"" - ]; + repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_accumulated_commissions\""]; // fee_pool defines the historical rewards of all validators at genesis. - repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"validator_historical_rewards\"" - ]; + repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_historical_rewards\""]; // fee_pool defines the current rewards of all validators at genesis. - repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"validator_current_rewards\"" - ]; + repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_current_rewards\""]; // fee_pool defines the delegator starting infos at genesis. - repeated DelegatorStartingInfoRecord delegator_starting_infos = 9 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"delegator_starting_infos\"" - ]; + repeated DelegatorStartingInfoRecord delegator_starting_infos = 9 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"delegator_starting_infos\""]; // fee_pool defines the validator slash events at genesis. - repeated ValidatorSlashEventRecord validator_slash_events = 10 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"validator_slash_events\"" - ]; + repeated ValidatorSlashEventRecord validator_slash_events = 10 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_slash_events\""]; } diff --git a/proto/cosmos/distribution/v1beta1/query.proto b/proto/cosmos/distribution/v1beta1/query.proto index b93fcdfbdf..fc48f7e456 100644 --- a/proto/cosmos/distribution/v1beta1/query.proto +++ b/proto/cosmos/distribution/v1beta1/query.proto @@ -17,48 +17,50 @@ service Query { } // 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"; } // 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"; } // 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"; } // DelegationRewards queries the total rewards accrued by a delegation. - rpc DelegationRewards (QueryDelegationRewardsRequest) returns (QueryDelegationRewardsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}"; + rpc DelegationRewards(QueryDelegationRewardsRequest) returns (QueryDelegationRewardsResponse) { + option (google.api.http).get = + "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}"; } // 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"; } // 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"; } // 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"; } // 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"; } } // 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. message QueryParamsResponse { @@ -112,19 +114,17 @@ message QueryValidatorSlashesResponse { // QueryDelegationRewardsRequest is the request type for the Query/DelegationRewards RPC method. 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"]; - // 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"]; } // QueryDelegationRewardsResponse is the response type for the Query/DelegationRewards RPC method. message QueryDelegationRewardsResponse { // rewards defines the rewards accrued by a delegation. - repeated cosmos.base.v1beta1.DecCoin rewards = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" - ]; + repeated cosmos.base.v1beta1.DecCoin rewards = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; } // 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. repeated DelegationDelegatorReward rewards = 1 [(gogoproto.nullable) = false]; // total defines the sum of all the rewards. - repeated cosmos.base.v1beta1.DecCoin total = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" - ]; + repeated cosmos.base.v1beta1.DecCoin total = 2 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; } // 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. message QueryCommunityPoolResponse { // pool defines community pool's coins. - repeated cosmos.base.v1beta1.DecCoin pool = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.nullable) = false - ]; + repeated cosmos.base.v1beta1.DecCoin pool = 1 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; } diff --git a/proto/cosmos/distribution/v1beta1/tx.proto b/proto/cosmos/distribution/v1beta1/tx.proto index 60c555dde7..7988a47be5 100644 --- a/proto/cosmos/distribution/v1beta1/tx.proto +++ b/proto/cosmos/distribution/v1beta1/tx.proto @@ -44,9 +44,7 @@ message MsgWithdrawValidatorCommission { // MsgFundCommunityPool allows an account to directly // fund the community pool. message MsgFundCommunityPool { - repeated cosmos.base.v1beta1.Coin amount = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; + repeated cosmos.base.v1beta1.Coin amount = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; bytes depositor = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; } \ No newline at end of file diff --git a/proto/cosmos/evidence/v1beta1/query.proto b/proto/cosmos/evidence/v1beta1/query.proto index 0d3355e464..27bc6be3c9 100644 --- a/proto/cosmos/evidence/v1beta1/query.proto +++ b/proto/cosmos/evidence/v1beta1/query.proto @@ -24,7 +24,7 @@ service Query { // QueryEvidenceRequest is the request type for the Query/Evidence RPC method. message QueryEvidenceRequest { // 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. diff --git a/proto/cosmos/evidence/v1beta1/tx.proto b/proto/cosmos/evidence/v1beta1/tx.proto index c8c51b694b..bb42e24cd0 100644 --- a/proto/cosmos/evidence/v1beta1/tx.proto +++ b/proto/cosmos/evidence/v1beta1/tx.proto @@ -11,7 +11,7 @@ import "cosmos_proto/cosmos.proto"; // MsgSubmitEvidence represents a message that supports submitting arbitrary // Evidence of misbehavior such as equivocation or counterfactual signing. message MsgSubmitEvidence { - option (gogoproto.goproto_getters) = false; - bytes submitter = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; - google.protobuf.Any evidence = 2 [(cosmos_proto.accepts_interface) = "Evidence"]; + option (gogoproto.goproto_getters) = false; + bytes submitter = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + google.protobuf.Any evidence = 2 [(cosmos_proto.accepts_interface) = "Evidence"]; } diff --git a/proto/cosmos/genutil/v1beta1/genesis.proto b/proto/cosmos/genutil/v1beta1/genesis.proto index 1dfb5c372c..a0207793d9 100644 --- a/proto/cosmos/genutil/v1beta1/genesis.proto +++ b/proto/cosmos/genutil/v1beta1/genesis.proto @@ -10,7 +10,7 @@ message GenesisState { // gen_txs defines the genesis transactions. repeated bytes gen_txs = 1 [ (gogoproto.casttype) = "encoding/json.RawMessage", - (gogoproto.jsontag) = "gentxs", + (gogoproto.jsontag) = "gentxs", (gogoproto.moretags) = "yaml:\"gentxs\"" ]; } diff --git a/proto/cosmos/gov/v1beta1/genesis.proto b/proto/cosmos/gov/v1beta1/genesis.proto index cb2e553d95..a999500449 100644 --- a/proto/cosmos/gov/v1beta1/genesis.proto +++ b/proto/cosmos/gov/v1beta1/genesis.proto @@ -8,39 +8,19 @@ import "cosmos/gov/v1beta1/gov.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; // GenesisState defines the gov module's genesis state. -message GenesisState{ +message GenesisState { // starting_proposal_id is the ID of the starting proposal. - uint64 starting_proposal_id = 1 [ - (gogoproto.moretags) = "yaml:\"starting_proposal_id\"" - ]; + uint64 starting_proposal_id = 1 [(gogoproto.moretags) = "yaml:\"starting_proposal_id\""]; // deposits defines all the deposits present at genesis. - repeated Deposit deposits = 2 [ - (gogoproto.castrepeated) = "Deposits", - (gogoproto.nullable) = false - ]; + repeated Deposit deposits = 2 [(gogoproto.castrepeated) = "Deposits", (gogoproto.nullable) = false]; // votes defines all the votes present at genesis. - repeated Vote votes = 3 [ - (gogoproto.castrepeated) = "Votes", - (gogoproto.nullable) = false - ]; + repeated Vote votes = 3 [(gogoproto.castrepeated) = "Votes", (gogoproto.nullable) = false]; // proposals defines all the proposals present at genesis. - repeated Proposal proposals = 4 [ - (gogoproto.castrepeated) = "Proposals", - (gogoproto.nullable) = false - ]; + repeated Proposal proposals = 4 [(gogoproto.castrepeated) = "Proposals", (gogoproto.nullable) = false]; // params defines all the paramaters of related to deposit. - DepositParams deposit_params = 5 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"deposit_params\"" - ]; + DepositParams deposit_params = 5 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"deposit_params\""]; // params defines all the paramaters of related to voting. - VotingParams voting_params = 6 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"voting_params\"" - ]; + VotingParams voting_params = 6 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_params\""]; // params defines all the paramaters of related to tally. - TallyParams tally_params = 7 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"tally_params\"" - ]; + TallyParams tally_params = 7 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"tally_params\""]; } diff --git a/proto/cosmos/gov/v1beta1/gov.proto b/proto/cosmos/gov/v1beta1/gov.proto index 6bcc00a9de..62e0596c9e 100644 --- a/proto/cosmos/gov/v1beta1/gov.proto +++ b/proto/cosmos/gov/v1beta1/gov.proto @@ -15,7 +15,7 @@ option (gogoproto.goproto_getters_all) = false; // VoteOption enumerates the valid vote options for a given governance proposal. 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 = 0 [(gogoproto.enumvalue_customname) = "OptionEmpty"]; @@ -44,8 +44,8 @@ message TextProposal { message Deposit { option (gogoproto.equal) = true; - uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; - bytes depositor = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; + bytes depositor = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } @@ -54,10 +54,7 @@ message Deposit { message Proposal { option (gogoproto.equal) = true; - uint64 proposal_id = 1 [ - (gogoproto.jsontag) = "id", - (gogoproto.moretags) = "yaml:\"id\"" - ]; + uint64 proposal_id = 1 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = "yaml:\"id\""]; google.protobuf.Any content = 2 [(cosmos_proto.accepts_interface) = "Content"]; ProposalStatus status = 3 [(gogoproto.moretags) = "yaml:\"proposal_status\""]; TallyResult final_tally_result = 4 @@ -79,7 +76,7 @@ message Proposal { // ProposalStatus enumerates the valid statuses of a proposal. 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 = 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. bytes quorum = 1 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "quorum,omitempty" + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "quorum,omitempty" ]; // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. bytes threshold = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "threshold,omitempty" + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "threshold,omitempty" ]; - + // Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. bytes veto_threshold = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "veto_threshold,omitempty", - (gogoproto.moretags) = "yaml:\"veto_threshold\"" + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "veto_threshold,omitempty", + (gogoproto.moretags) = "yaml:\"veto_threshold\"" ]; } diff --git a/proto/cosmos/gov/v1beta1/query.proto b/proto/cosmos/gov/v1beta1/query.proto index 8499c711a8..de32398483 100644 --- a/proto/cosmos/gov/v1beta1/query.proto +++ b/proto/cosmos/gov/v1beta1/query.proto @@ -11,12 +11,12 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; // Query defines the gRPC querier service for gov module service Query { // 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}"; } // 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"; } @@ -26,7 +26,7 @@ service Query { } // 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"; } @@ -65,10 +65,10 @@ message QueryProposalResponse { // QueryProposalsRequest is the request type for the Query/Proposals RPC method. message QueryProposalsRequest { // proposal_status defines the status of the proposals. - ProposalStatus proposal_status = 1 ; - + ProposalStatus proposal_status = 1; + // 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. bytes depositor = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; @@ -89,9 +89,9 @@ message QueryProposalsResponse { message QueryVoteRequest { // proposal_id defines the unique id of the proposal. uint64 proposal_id = 1; - + // 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. @@ -119,7 +119,7 @@ message QueryVotesResponse { } // 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". string params_type = 1; } @@ -138,7 +138,7 @@ message QueryParamsResponse { message QueryDepositRequest { // proposal_id defines the unique id of the proposal. uint64 proposal_id = 1; - + // depositor defines the deposit addresses from the proposals. bytes depositor = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; } @@ -176,4 +176,4 @@ message QueryTallyResultRequest { message QueryTallyResultResponse { // tally defines the requested tally. TallyResult tally = 1 [(gogoproto.nullable) = false]; -} +} diff --git a/proto/cosmos/gov/v1beta1/tx.proto b/proto/cosmos/gov/v1beta1/tx.proto index 8a3409e8e4..6dc541a85d 100644 --- a/proto/cosmos/gov/v1beta1/tx.proto +++ b/proto/cosmos/gov/v1beta1/tx.proto @@ -17,7 +17,7 @@ option (gogoproto.goproto_getters_all) = false; message MsgSubmitProposal { 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 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", @@ -30,23 +30,17 @@ message MsgSubmitProposal { message MsgVote { option (gogoproto.equal) = true; - uint64 proposal_id = 1 [ - (gogoproto.jsontag) = "proposal_id", - (gogoproto.moretags) = "yaml:\"proposal_id\"" - ]; - bytes voter = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; - VoteOption option = 3; + uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; + 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. message MsgDeposit { option (gogoproto.equal) = true; - uint64 proposal_id = 1 [ - (gogoproto.jsontag) = "proposal_id", - (gogoproto.moretags) = "yaml:\"proposal_id\"" - ]; - bytes depositor = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; + bytes depositor = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } \ No newline at end of file diff --git a/proto/cosmos/mint/v1beta1/genesis.proto b/proto/cosmos/mint/v1beta1/genesis.proto index 3b53de53f2..4e783fb544 100644 --- a/proto/cosmos/mint/v1beta1/genesis.proto +++ b/proto/cosmos/mint/v1beta1/genesis.proto @@ -9,12 +9,8 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; // GenesisState defines the mint module's genesis state. message GenesisState { // minter is a space for holding current inflation information. - Minter minter = 1 [ - (gogoproto.nullable) = false - ]; + Minter minter = 1 [(gogoproto.nullable) = false]; // params defines all the paramaters of the module. - Params params = 2 [ - (gogoproto.nullable) = false - ]; + Params params = 2 [(gogoproto.nullable) = false]; } diff --git a/proto/cosmos/mint/v1beta1/query.proto b/proto/cosmos/mint/v1beta1/query.proto index 18b9fca195..bf6d76d3a9 100644 --- a/proto/cosmos/mint/v1beta1/query.proto +++ b/proto/cosmos/mint/v1beta1/query.proto @@ -10,23 +10,23 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; // Query provides defines the gRPC querier service. service Query { // 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"; } // 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"; } // 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"; } } // 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. message QueryParamsResponse { @@ -35,7 +35,7 @@ message QueryParamsResponse { } // 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. message QueryInflationResponse { @@ -44,10 +44,11 @@ message QueryInflationResponse { } // 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. message QueryAnnualProvisionsResponse { // 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]; } diff --git a/proto/cosmos/params/v1beta1/params.proto b/proto/cosmos/params/v1beta1/params.proto index 573a96f708..2c075d2ab6 100644 --- a/proto/cosmos/params/v1beta1/params.proto +++ b/proto/cosmos/params/v1beta1/params.proto @@ -11,9 +11,9 @@ message ParameterChangeProposal { option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; - string title = 1; - string description = 2; - repeated ParamChange changes = 3 [(gogoproto.nullable) = false]; + string title = 1; + string description = 2; + repeated ParamChange changes = 3 [(gogoproto.nullable) = false]; } // ParamChange defines an individual parameter change, for use in ParameterChangeProposal. diff --git a/proto/cosmos/params/v1beta1/query.proto b/proto/cosmos/params/v1beta1/query.proto index e507617ebc..81f5a4c749 100644 --- a/proto/cosmos/params/v1beta1/query.proto +++ b/proto/cosmos/params/v1beta1/query.proto @@ -8,24 +8,24 @@ import "cosmos/params/v1beta1/params.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/proposal"; // Query defines the gRPC querier service. -service Query{ - // Params queries a specific parameter of a module, given its subspace and key. - rpc Params (QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/params/v1beta1/params"; - } +service Query { + // Params queries a specific parameter of a module, given its subspace and key. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/params/v1beta1/params"; + } } // QueryParamsRequest is request type for the Query/Params RPC method. -message QueryParamsRequest{ - // subspace defines the module to query the parameter for. - string subspace = 1; +message QueryParamsRequest { + // subspace defines the module to query the parameter for. + string subspace = 1; - // key defines the key of the parameter in the subspace. - string key = 2; + // key defines the key of the parameter in the subspace. + string key = 2; } // QueryParamsResponse is response type for the Query/Params RPC method. -message QueryParamsResponse{ - // param defines the queried parameter. - ParamChange param = 1 [(gogoproto.nullable) = false]; -} +message QueryParamsResponse { + // param defines the queried parameter. + ParamChange param = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/slashing/v1beta1/genesis.proto b/proto/cosmos/slashing/v1beta1/genesis.proto index fad61d264c..ce12768b29 100644 --- a/proto/cosmos/slashing/v1beta1/genesis.proto +++ b/proto/cosmos/slashing/v1beta1/genesis.proto @@ -1,7 +1,7 @@ syntax = "proto3"; 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 "cosmos/slashing/v1beta1/slashing.proto"; @@ -9,23 +9,17 @@ import "cosmos/slashing/v1beta1/slashing.proto"; // GenesisState defines the slashing module's genesis state. message GenesisState { // params defines all the paramaters of related to deposit. - Params params = 1 [ - (gogoproto.nullable) = false - ]; + Params params = 1 [(gogoproto.nullable) = false]; // signing_infos represents a map between validator addresses and their // signing infos. - repeated SigningInfo signing_infos = 2 [ - (gogoproto.moretags) = "yaml:\"signing_infos\"", - (gogoproto.nullable) = false - ]; + repeated SigningInfo signing_infos = 2 + [(gogoproto.moretags) = "yaml:\"signing_infos\"", (gogoproto.nullable) = false]; // signing_infos represents a map between validator addresses and their // missed blocks. - repeated ValidatorMissedBlocks missed_blocks = 3 [ - (gogoproto.moretags) = "yaml:\"missed_blocks\"", - (gogoproto.nullable) = false - ]; + repeated ValidatorMissedBlocks missed_blocks = 3 + [(gogoproto.moretags) = "yaml:\"missed_blocks\"", (gogoproto.nullable) = false]; } // SigningInfo stores validator signing info of corresponding address. @@ -33,10 +27,8 @@ message SigningInfo { // address is the validator address. string address = 1; // validator_signing_info represents the signing info of this validator. - ValidatorSigningInfo validator_signing_info = 2 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"validator_signing_info\"" - ]; + ValidatorSigningInfo validator_signing_info = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_signing_info\""]; } // ValidatorMissedBlocks contains array of missed blocks of corresponding address. @@ -44,10 +36,8 @@ message ValidatorMissedBlocks { // address is the validator address. string address = 1; // missed_blocks is an array of missed blocks by the validator. - repeated MissedBlock missed_blocks = 2 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"missed_blocks\"" - ]; + repeated MissedBlock missed_blocks = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"missed_blocks\""]; } // MissedBlock contains height and missed status as boolean. @@ -55,5 +45,5 @@ message MissedBlock { // index is the height at which the block was missed. int64 index = 1; // missed is the missed status. - bool missed = 2; + bool missed = 2; } diff --git a/proto/cosmos/slashing/v1beta1/slashing.proto b/proto/cosmos/slashing/v1beta1/slashing.proto index 2ed0b934e6..ba885cde13 100644 --- a/proto/cosmos/slashing/v1beta1/slashing.proto +++ b/proto/cosmos/slashing/v1beta1/slashing.proto @@ -14,7 +14,7 @@ message ValidatorSigningInfo { option (gogoproto.goproto_stringer) = false; 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 int64 start_height = 2 [(gogoproto.moretags) = "yaml:\"start_height\""]; diff --git a/proto/cosmos/staking/v1beta1/genesis.proto b/proto/cosmos/staking/v1beta1/genesis.proto index ee52ae13f6..a073120f35 100644 --- a/proto/cosmos/staking/v1beta1/genesis.proto +++ b/proto/cosmos/staking/v1beta1/genesis.proto @@ -9,9 +9,7 @@ import "cosmos/staking/v1beta1/staking.proto"; // GenesisState defines the staking module's genesis state. message GenesisState { // params defines all the paramaters of related to deposit. - Params params = 1 [ - (gogoproto.nullable) = false - ]; + Params params = 1 [(gogoproto.nullable) = false]; // last_total_power tracks the total amounts of bonded tokens recorded during // the previous end block. @@ -23,31 +21,21 @@ message GenesisState { // last_validator_powers is a special index that provides a historical list // of the last-block's bonded validators. - repeated LastValidatorPower last_validator_powers = 3 [ - (gogoproto.moretags) = "yaml:\"last_validator_powers\"", - (gogoproto.nullable) = false - ]; + repeated LastValidatorPower last_validator_powers = 3 + [(gogoproto.moretags) = "yaml:\"last_validator_powers\"", (gogoproto.nullable) = false]; // delegations defines the validator set at genesis. - repeated Validator validators = 4 [ - (gogoproto.nullable) = false - ]; + repeated Validator validators = 4 [(gogoproto.nullable) = false]; // delegations defines the delegations active at genesis. - repeated Delegation delegations = 5 [ - (gogoproto.nullable) = false - ]; + repeated Delegation delegations = 5 [(gogoproto.nullable) = false]; // unbonding_delegations defines the unbonding delegations active at genesis. - repeated UnbondingDelegation unbonding_delegations = 6 [ - (gogoproto.moretags) = "yaml:\"unbonding_delegations\"", - (gogoproto.nullable) = false - ]; + repeated UnbondingDelegation unbonding_delegations = 6 + [(gogoproto.moretags) = "yaml:\"unbonding_delegations\"", (gogoproto.nullable) = false]; // redelegations defines the redelegations active at genesis. - repeated Redelegation redelegations = 7 [ - (gogoproto.nullable) = false - ]; + repeated Redelegation redelegations = 7 [(gogoproto.nullable) = false]; bool exported = 8; } @@ -55,9 +43,7 @@ message GenesisState { // LastValidatorPower required for validator set update logic. message LastValidatorPower { // address is the address of the validator. - bytes address = 1 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress" - ]; + bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress"]; // power defines the power of the validator. int64 power = 2; diff --git a/proto/cosmos/staking/v1beta1/query.proto b/proto/cosmos/staking/v1beta1/query.proto index 28f35d59ae..a1b7edd144 100644 --- a/proto/cosmos/staking/v1beta1/query.proto +++ b/proto/cosmos/staking/v1beta1/query.proto @@ -11,78 +11,81 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; // Query defines the gRPC querier service. service Query { // Validators queries all validators that match the given status. - rpc Validators (QueryValidatorsRequest) returns (QueryValidatorsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators"; + rpc Validators(QueryValidatorsRequest) returns (QueryValidatorsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/validators"; } // Validator queries validator info for given validator address. - rpc Validator (QueryValidatorRequest) returns (QueryValidatorResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}"; + rpc Validator(QueryValidatorRequest) returns (QueryValidatorResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}"; } // ValidatorDelegations queries delegate info for given validator. - rpc ValidatorDelegations (QueryValidatorDelegationsRequest) returns (QueryValidatorDelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations"; + rpc ValidatorDelegations(QueryValidatorDelegationsRequest) returns (QueryValidatorDelegationsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations"; } // ValidatorUnbondingDelegations queries unbonding delegations of a validator. - rpc ValidatorUnbondingDelegations (QueryValidatorUnbondingDelegationsRequest) returns (QueryValidatorUnbondingDelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations"; + rpc ValidatorUnbondingDelegations(QueryValidatorUnbondingDelegationsRequest) + returns (QueryValidatorUnbondingDelegationsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations"; } // Delegation queries delegate info for given validator delegator pair. - rpc Delegation (QueryDelegationRequest) returns (QueryDelegationResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}"; + rpc Delegation(QueryDelegationRequest) returns (QueryDelegationResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}"; } // UnbondingDelegation queries unbonding info for given validator delegator pair. - rpc UnbondingDelegation (QueryUnbondingDelegationRequest) returns (QueryUnbondingDelegationResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation"; + rpc UnbondingDelegation(QueryUnbondingDelegationRequest) returns (QueryUnbondingDelegationResponse) { + 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. - rpc DelegatorDelegations (QueryDelegatorDelegationsRequest) returns (QueryDelegatorDelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegations/{delegator_addr}"; + rpc DelegatorDelegations(QueryDelegatorDelegationsRequest) returns (QueryDelegatorDelegationsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/delegations/{delegator_addr}"; } // DelegatorUnbondingDelegations queries all unbonding delegations of a given delegator address. - rpc DelegatorUnbondingDelegations (QueryDelegatorUnbondingDelegationsRequest) returns (QueryDelegatorUnbondingDelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations"; + rpc DelegatorUnbondingDelegations(QueryDelegatorUnbondingDelegationsRequest) + returns (QueryDelegatorUnbondingDelegationsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations"; } // Redelegations queries redelegations of given address. - rpc Redelegations (QueryRedelegationsRequest) returns (QueryRedelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations"; + rpc Redelegations(QueryRedelegationsRequest) returns (QueryRedelegationsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations"; } // DelegatorValidators queries all validators info for given delegator address. - rpc DelegatorValidators (QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators"; + rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators"; } // DelegatorValidator queries validator info for given delegator validator pair. - rpc DelegatorValidator (QueryDelegatorValidatorRequest) returns (QueryDelegatorValidatorResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}"; + rpc DelegatorValidator(QueryDelegatorValidatorRequest) returns (QueryDelegatorValidatorResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}"; } // HistoricalInfo queries the historical info for given height. - rpc HistoricalInfo (QueryHistoricalInfoRequest) returns (QueryHistoricalInfoResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/historical_info/{height}"; + rpc HistoricalInfo(QueryHistoricalInfoRequest) returns (QueryHistoricalInfoResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/historical_info/{height}"; } // Pool queries the pool info. - rpc Pool (QueryPoolRequest) returns (QueryPoolResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/pool"; + rpc Pool(QueryPoolRequest) returns (QueryPoolResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/pool"; } // Parameters queries the staking parameters. - rpc Params (QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/params"; + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/params"; } } // QueryValidatorsRequest is request type for Query/Validators RPC method. -message QueryValidatorsRequest{ +message QueryValidatorsRequest { // status enables to query for validators matching a given status. string status = 1; @@ -122,7 +125,8 @@ message QueryValidatorDelegationsRequest { // QueryValidatorDelegationsResponse is response type for the Query/ValidatorDelegations RPC method 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. cosmos.base.query.v1beta1.PageResponse pagination = 2; @@ -172,7 +176,7 @@ message QueryUnbondingDelegationRequest { // QueryDelegationResponse is response type for the Query/UnbondingDelegation RPC method. message QueryUnbondingDelegationResponse { // 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. @@ -197,7 +201,7 @@ message QueryDelegatorDelegationsResponse { message QueryDelegatorUnbondingDelegationsRequest { // delegator_addr defines the delegator address to query for. bytes delegator_addr = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; - + // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } @@ -279,7 +283,7 @@ message QueryHistoricalInfoResponse { } // QueryPoolRequest is request type for the Query/Pool RPC method. -message QueryPoolRequest { } +message QueryPoolRequest {} // QueryPoolResponse is response type for the Query/Pool RPC method. message QueryPoolResponse { @@ -288,7 +292,7 @@ message QueryPoolResponse { } // QueryParamsRequest is request type for the Query/Params RPC method. -message QueryParamsRequest { } +message QueryParamsRequest {} // QueryParamsResponse is response type for the Query/Params RPC method. message QueryParamsResponse { diff --git a/proto/cosmos/staking/v1beta1/staking.proto b/proto/cosmos/staking/v1beta1/staking.proto index 1d0a05b7b9..82eaf8c94e 100644 --- a/proto/cosmos/staking/v1beta1/staking.proto +++ b/proto/cosmos/staking/v1beta1/staking.proto @@ -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). message HistoricalInfo { 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 @@ -23,10 +23,7 @@ message CommissionRates { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; - string rate = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; + string rate = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; string max_rate = 2 [ (gogoproto.moretags) = "yaml:\"max_rate\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", @@ -45,11 +42,8 @@ message Commission { option (gogoproto.goproto_stringer) = false; CommissionRates commission_rates = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; - google.protobuf.Timestamp update_time = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true, - (gogoproto.moretags) = "yaml:\"update_time\"" - ]; + google.protobuf.Timestamp update_time = 2 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"update_time\""]; } // Description defines a validator description. @@ -84,10 +78,7 @@ message Validator { string consensus_pubkey = 2 [(gogoproto.moretags) = "yaml:\"consensus_pubkey\""]; bool jailed = 3; int32 status = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.BondStatus"]; - string tokens = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; + string tokens = 5 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; string delegator_shares = 6 [ (gogoproto.moretags) = "yaml:\"delegator_shares\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", @@ -95,11 +86,8 @@ message Validator { ]; Description description = 7 [(gogoproto.nullable) = false]; int64 unbonding_height = 8 [(gogoproto.moretags) = "yaml:\"unbonding_height\""]; - google.protobuf.Timestamp unbonding_time = 9 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true, - (gogoproto.moretags) = "yaml:\"unbonding_time\"" - ]; + google.protobuf.Timestamp unbonding_time = 9 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""]; Commission commission = 10 [(gogoproto.nullable) = false]; string min_self_delegation = 11 [ (gogoproto.moretags) = "yaml:\"min_self_delegation\"", @@ -180,10 +168,7 @@ message Delegation { (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", (gogoproto.moretags) = "yaml:\"validator_address\"" ]; - string shares = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; + string shares = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; } // 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.moretags) = "yaml:\"validator_address\"" ]; - repeated UnbondingDelegationEntry entries = 3 - [(gogoproto.nullable) = false]; // unbonding delegation entries + repeated UnbondingDelegationEntry entries = 3 [(gogoproto.nullable) = false]; // unbonding delegation entries } // UnbondingDelegationEntry defines an unbonding object with relevant metadata. @@ -210,20 +194,14 @@ message UnbondingDelegationEntry { option (gogoproto.goproto_stringer) = false; int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""]; - google.protobuf.Timestamp completion_time = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true, - (gogoproto.moretags) = "yaml:\"completion_time\"" - ]; + google.protobuf.Timestamp completion_time = 2 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""]; string initial_balance = 3 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"initial_balance\"" ]; - string balance = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; + string balance = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; } // RedelegationEntry defines a redelegation object with relevant metadata. @@ -232,20 +210,15 @@ message RedelegationEntry { option (gogoproto.goproto_stringer) = false; int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""]; - google.protobuf.Timestamp completion_time = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true, - (gogoproto.moretags) = "yaml:\"completion_time\"" - ]; + google.protobuf.Timestamp completion_time = 2 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""]; string initial_balance = 3 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"initial_balance\"" ]; - string shares_dst = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; + string shares_dst = 4 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; } // 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.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. @@ -274,11 +247,8 @@ message Params { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; - google.protobuf.Duration unbonding_time = 1 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.moretags) = "yaml:\"unbonding_time\"" - ]; + google.protobuf.Duration unbonding_time = 1 + [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""]; uint32 max_validators = 2 [(gogoproto.moretags) = "yaml:\"max_validators\""]; uint32 max_entries = 3 [(gogoproto.moretags) = "yaml:\"max_entries\""]; uint32 historical_entries = 4 [(gogoproto.moretags) = "yaml:\"historical_entries\""]; @@ -303,10 +273,7 @@ message RedelegationEntryResponse { option (gogoproto.equal) = true; RedelegationEntry redelegation_entry = 1 [(gogoproto.nullable) = false]; - string balance = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; + string balance = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; } // RedelegationResponse is equivalent to a Redelegation except that its entries @@ -315,19 +282,23 @@ message RedelegationEntryResponse { message RedelegationResponse { option (gogoproto.equal) = true; - Redelegation redelegation = 1 [(gogoproto.nullable) = false]; - repeated RedelegationEntryResponse entries = 2 [(gogoproto.nullable) = false]; + Redelegation redelegation = 1 [(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. message Pool { option (gogoproto.description) = true; option (gogoproto.equal) = true; - string not_bonded_tokens = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.jsontag) = "not_bonded_tokens", - (gogoproto.nullable) = false]; - string bonded_tokens = 2 [(gogoproto.jsontag) = "bonded_tokens", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"bonded_tokens\""]; + string not_bonded_tokens = 1 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.jsontag) = "not_bonded_tokens", + (gogoproto.nullable) = false + ]; + string bonded_tokens = 2 [ + (gogoproto.jsontag) = "bonded_tokens", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"bonded_tokens\"" + ]; } diff --git a/proto/cosmos/staking/v1beta1/tx.proto b/proto/cosmos/staking/v1beta1/tx.proto index 11ae147cab..a4cdf65a7c 100644 --- a/proto/cosmos/staking/v1beta1/tx.proto +++ b/proto/cosmos/staking/v1beta1/tx.proto @@ -7,7 +7,6 @@ import "cosmos/staking/v1beta1/staking.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; - // MsgCreateValidator defines an SDK message for creating a new validator. message MsgCreateValidator { option (gogoproto.equal) = true; @@ -27,7 +26,7 @@ message MsgCreateValidator { (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ValAddress", (gogoproto.moretags) = "yaml:\"validator_address\"" ]; - string pubkey = 6; + string pubkey = 6; 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. message MsgDelegate { option (gogoproto.equal) = true; @@ -72,7 +71,7 @@ message MsgDelegate { 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. message MsgBeginRedelegate { option (gogoproto.equal) = true; diff --git a/proto/cosmos/tx/signing/v1beta1/signing.proto b/proto/cosmos/tx/signing/v1beta1/signing.proto index a436453090..bb99a74150 100644 --- a/proto/cosmos/tx/signing/v1beta1/signing.proto +++ b/proto/cosmos/tx/signing/v1beta1/signing.proto @@ -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. enum SignMode { - // SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be rejected - SIGN_MODE_UNSPECIFIED = 0; + // SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be rejected + SIGN_MODE_UNSPECIFIED = 0; - // SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is verified - // with raw bytes from Tx - SIGN_MODE_DIRECT = 1; + // SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is verified + // with raw bytes from Tx + SIGN_MODE_DIRECT = 1; - // 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 - SIGN_MODE_TEXTUAL = 2; + // 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 + SIGN_MODE_TEXTUAL = 2; - // SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses - // Amino JSON and will be removed in the future - SIGN_MODE_LEGACY_AMINO_JSON = 127; + // SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + // Amino JSON and will be removed in the future + SIGN_MODE_LEGACY_AMINO_JSON = 127; } // SignatureDescriptors wraps multiple SignatureDescriptor's. message SignatureDescriptors { - // signatures are the signature descriptors - repeated SignatureDescriptor signatures = 1; + // signatures are the signature descriptors + repeated SignatureDescriptor signatures = 1; } // 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 // itself. It is primarily used for coordinating signatures between clients. message SignatureDescriptor { - // public_key is the public key of the signer - cosmos.base.crypto.v1beta1.PublicKey public_key = 1; + // public_key is the public key of the signer + cosmos.base.crypto.v1beta1.PublicKey public_key = 1; - Data data = 2; + Data data = 2; - // sequence is the sequence of the account, which describes the - // number of committed transactions signed by a given address. It is used to prevent - // replay attacks. - uint64 sequence = 3; + // sequence is the sequence of the account, which describes the + // number of committed transactions signed by a given address. It is used to prevent + // replay attacks. + uint64 sequence = 3; - // Data represents signature data - message Data { - // sum is the oneof that specifies whether this represents single or multi-signature data - oneof sum { - // single represents a single signer - Single single = 1; + // Data represents signature data + message Data { + // sum is the oneof that specifies whether this represents single or multi-signature data + oneof sum { + // single represents a single signer + Single single = 1; - // multi represents a multisig signer - 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; - } + // multi represents a multisig signer + 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; + } + } } diff --git a/proto/cosmos/upgrade/v1beta1/query.proto b/proto/cosmos/upgrade/v1beta1/query.proto index 7716c5ef2b..fc6b4a234e 100644 --- a/proto/cosmos/upgrade/v1beta1/query.proto +++ b/proto/cosmos/upgrade/v1beta1/query.proto @@ -10,12 +10,12 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types"; service Query { // CurrentPlan queries the current upgrade plan. 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. 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}"; } } diff --git a/proto/cosmos/vesting/v1beta1/vesting.proto b/proto/cosmos/vesting/v1beta1/vesting.proto index c28baac532..6bdbbf08e4 100644 --- a/proto/cosmos/vesting/v1beta1/vesting.proto +++ b/proto/cosmos/vesting/v1beta1/vesting.proto @@ -13,8 +13,8 @@ message BaseVestingAccount { option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; - cosmos.auth.v1beta1.BaseAccount base_account = 1 [(gogoproto.embed) = true]; - repeated cosmos.base.v1beta1.Coin original_vesting = 2 [ + cosmos.auth.v1beta1.BaseAccount base_account = 1 [(gogoproto.embed) = true]; + repeated cosmos.base.v1beta1.Coin original_vesting = 2 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"original_vesting\"" @@ -56,11 +56,9 @@ message DelayedVestingAccount { message Period { option (gogoproto.goproto_stringer) = false; - int64 length = 1; - repeated cosmos.base.v1beta1.Coin amount = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; + int64 length = 1; + repeated cosmos.base.v1beta1.Coin amount = 2 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } // PeriodicVestingAccount implements the VestingAccount interface. It @@ -71,6 +69,5 @@ message PeriodicVestingAccount { BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; int64 start_time = 2 [(gogoproto.moretags) = "yaml:\"start_time\""]; - repeated Period vesting_periods = 3 - [(gogoproto.moretags) = "yaml:\"vesting_periods\"", (gogoproto.nullable) = false]; + repeated Period vesting_periods = 3 [(gogoproto.moretags) = "yaml:\"vesting_periods\"", (gogoproto.nullable) = false]; } diff --git a/proto/ibc/channel/channel.proto b/proto/ibc/channel/channel.proto index bf2d339c87..fa30c56c29 100644 --- a/proto/ibc/channel/channel.proto +++ b/proto/ibc/channel/channel.proto @@ -12,55 +12,40 @@ message MsgChannelOpenInit { string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; Channel channel = 3 [(gogoproto.nullable) = false]; - bytes signer = 4 - [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + bytes signer = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; } // MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel // on Chain B. message MsgChannelOpenTry { - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - Channel channel = 3 [(gogoproto.nullable) = false]; - string counterparty_version = 4 - [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; - bytes proof_init = 5 [(gogoproto.moretags) = "yaml:\"proof_init\""]; - ibc.client.Height proof_height = 6 [ - (gogoproto.moretags) = "yaml:\"proof_height\"", - (gogoproto.nullable) = false - ]; - bytes signer = 7 - [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + Channel channel = 3 [(gogoproto.nullable) = false]; + string counterparty_version = 4 [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; + bytes proof_init = 5 [(gogoproto.moretags) = "yaml:\"proof_init\""]; + ibc.client.Height proof_height = 6 [(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 // the change of channel state to TRYOPEN on Chain B. message MsgChannelOpenAck { - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - string counterparty_version = 3 - [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; - bytes proof_try = 4 [(gogoproto.moretags) = "yaml:\"proof_try\""]; - ibc.client.Height proof_height = 5 [ - (gogoproto.moretags) = "yaml:\"proof_height\"", - (gogoproto.nullable) = false - ]; - bytes signer = 6 - [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + string counterparty_version = 3 [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; + bytes proof_try = 4 [(gogoproto.moretags) = "yaml:\"proof_try\""]; + ibc.client.Height proof_height = 5 [(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 // acknowledge the change of channel state to OPEN on Chain A. message MsgChannelOpenConfirm { - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - bytes proof_ack = 3 [(gogoproto.moretags) = "yaml:\"proof_ack\""]; - ibc.client.Height proof_height = 4 [ - (gogoproto.moretags) = "yaml:\"proof_height\"", - (gogoproto.nullable) = false - ]; - bytes signer = 5 - [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + bytes proof_ack = 3 [(gogoproto.moretags) = "yaml:\"proof_ack\""]; + ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (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 @@ -68,76 +53,53 @@ message MsgChannelOpenConfirm { message MsgChannelCloseInit { string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - bytes signer = 3 - [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + bytes signer = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; } // MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B // to acknowledge the change of channel state to CLOSED on Chain A. message MsgChannelCloseConfirm { - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - bytes proof_init = 3 [(gogoproto.moretags) = "yaml:\"proof_init\""]; - ibc.client.Height proof_height = 4 [ - (gogoproto.moretags) = "yaml:\"proof_height\"", - (gogoproto.nullable) = false - ]; - bytes signer = 5 - [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + bytes proof_init = 3 [(gogoproto.moretags) = "yaml:\"proof_init\""]; + ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + bytes signer = 5 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; } // MsgRecvPacket receives incoming IBC packet message MsgRecvPacket { - Packet packet = 1 [(gogoproto.nullable) = false]; - bytes proof = 2; - ibc.client.Height proof_height = 3 [ - (gogoproto.moretags) = "yaml:\"proof_height\"", - (gogoproto.nullable) = false - ]; - bytes signer = 4 - [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + Packet packet = 1 [(gogoproto.nullable) = false]; + bytes proof = 2; + ibc.client.Height proof_height = 3 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + bytes signer = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; } // MsgTimeout receives timed-out packet message MsgTimeout { - Packet packet = 1 [(gogoproto.nullable) = false]; - bytes proof = 2; - ibc.client.Height proof_height = 3 [ - (gogoproto.moretags) = "yaml:\"proof_height\"", - (gogoproto.nullable) = false - ]; - uint64 next_sequence_recv = 4 - [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""]; - bytes signer = 5 - [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + Packet packet = 1 [(gogoproto.nullable) = false]; + bytes proof = 2; + ibc.client.Height proof_height = 3 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + 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. message MsgTimeoutOnClose { - Packet packet = 1 [(gogoproto.nullable) = false]; - bytes proof = 2; - bytes proof_close = 3 [(gogoproto.moretags) = "yaml:\"proof_close\""]; - ibc.client.Height proof_height = 4 [ - (gogoproto.moretags) = "yaml:\"proof_height\"", - (gogoproto.nullable) = false - ]; - uint64 next_sequence_recv = 5 - [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""]; - bytes signer = 6 - [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + Packet packet = 1 [(gogoproto.nullable) = false]; + bytes proof = 2; + bytes proof_close = 3 [(gogoproto.moretags) = "yaml:\"proof_close\""]; + ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + 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 message MsgAcknowledgement { - Packet packet = 1 [(gogoproto.nullable) = false]; - bytes acknowledgement = 2; - bytes proof = 3; - ibc.client.Height proof_height = 4 [ - (gogoproto.moretags) = "yaml:\"proof_height\"", - (gogoproto.nullable) = false - ]; - bytes signer = 5 - [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + Packet packet = 1 [(gogoproto.nullable) = false]; + bytes acknowledgement = 2; + bytes proof = 3; + ibc.client.Height proof_height = 4 [(gogoproto.moretags) = "yaml:\"proof_height\"", (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 @@ -154,8 +116,7 @@ message Channel { Counterparty counterparty = 3 [(gogoproto.nullable) = false]; // list of connection identifiers, in order, along which packets sent on this // channel will travel - repeated string connection_hops = 4 - [(gogoproto.moretags) = "yaml:\"connection_hops\""]; + repeated string connection_hops = 4 [(gogoproto.moretags) = "yaml:\"connection_hops\""]; // opaque channel version, which is agreed upon during the handshake string version = 5; } @@ -173,8 +134,7 @@ message IdentifiedChannel { Counterparty counterparty = 3 [(gogoproto.nullable) = false]; // list of connection identifiers, in order, along which packets sent on this // channel will travel - repeated string connection_hops = 4 - [(gogoproto.moretags) = "yaml:\"connection_hops\""]; + repeated string connection_hops = 4 [(gogoproto.moretags) = "yaml:\"connection_hops\""]; // opaque channel version, which is agreed upon during the handshake string version = 5; // port identifier @@ -189,8 +149,7 @@ enum State { option (gogoproto.goproto_enum_prefix) = false; // Default State - STATE_UNINITIALIZED_UNSPECIFIED = 0 - [(gogoproto.enumvalue_customname) = "UNINITIALIZED"]; + STATE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNINITIALIZED"]; // A channel has just started the opening handshake. STATE_INIT = 1 [(gogoproto.enumvalue_customname) = "INIT"]; // 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. string source_channel = 3 [(gogoproto.moretags) = "yaml:\"source_channel\""]; // identifies the port on the receiving chain. - string destination_port = 4 - [(gogoproto.moretags) = "yaml:\"destination_port\""]; + string destination_port = 4 [(gogoproto.moretags) = "yaml:\"destination_port\""]; // identifies the channel end on the receiving chain. - string destination_channel = 5 - [(gogoproto.moretags) = "yaml:\"destination_channel\""]; + string destination_channel = 5 [(gogoproto.moretags) = "yaml:\"destination_channel\""]; // actual opaque bytes transferred directly to the application module bytes data = 6; // block height after which the packet times out - ibc.client.Height timeout_height = 7 [ - (gogoproto.moretags) = "yaml:\"timeout_height\"", - (gogoproto.nullable) = false - ]; + ibc.client.Height timeout_height = 7 [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; // block timestamp (in nanoseconds) after which the packet times out - uint64 timeout_timestamp = 8 - [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; + uint64 timeout_timestamp = 8 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; } // PacketAckCommitment defines the genesis type necessary to retrieve and store diff --git a/proto/ibc/channel/genesis.proto b/proto/ibc/channel/genesis.proto index 5f0a3e8add..1cac4b362d 100644 --- a/proto/ibc/channel/genesis.proto +++ b/proto/ibc/channel/genesis.proto @@ -8,37 +8,22 @@ import "ibc/channel/channel.proto"; // GenesisState defines the ibc channel submodule's genesis state. message GenesisState { - repeated IdentifiedChannel channels = 1 [ - (gogoproto.casttype) = "IdentifiedChannel", - (gogoproto.nullable) = false - ]; - repeated PacketAckCommitment acknowledgements = 2 [ - (gogoproto.casttype) = "PacketAckCommitment", - (gogoproto.nullable) = false - ]; + repeated IdentifiedChannel channels = 1 [(gogoproto.casttype) = "IdentifiedChannel", (gogoproto.nullable) = false]; + repeated PacketAckCommitment acknowledgements = 2 + [(gogoproto.casttype) = "PacketAckCommitment", (gogoproto.nullable) = false]; repeated PacketAckCommitment commitments = 3 [(gogoproto.nullable) = false]; - repeated PacketSequence send_sequences = 4 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"send_sequences\"" - ]; - repeated PacketSequence recv_sequences = 5 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"recv_sequences\"" - ]; - repeated PacketSequence ack_sequences = 6 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"ack_sequences\"" - ]; + repeated PacketSequence send_sequences = 4 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"send_sequences\""]; + repeated PacketSequence recv_sequences = 5 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"recv_sequences\""]; + repeated PacketSequence ack_sequences = 6 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"ack_sequences\""]; } // PacketSequence defines the genesis type necessary to retrieve and store // next send and receive sequences. message PacketSequence { - string port_id = 1 [ - (gogoproto.moretags) = "yaml:\"port_id\"" - ]; - string channel_id = 2 [ - (gogoproto.moretags) = "yaml:\"channel_id\"" - ]; - uint64 sequence = 3; + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + uint64 sequence = 3; } diff --git a/proto/ibc/channel/query.proto b/proto/ibc/channel/query.proto index f6c4bb7926..a325c9f1d8 100644 --- a/proto/ibc/channel/query.proto +++ b/proto/ibc/channel/query.proto @@ -24,55 +24,50 @@ service Query { // ConnectionChannels queries all the channels associated with a connection // end. - rpc ConnectionChannels(QueryConnectionChannelsRequest) - returns (QueryConnectionChannelsResponse) { - option (google.api.http).get = "/ibc/channel/v1beta1/connections/{connection}/channels"; + rpc ConnectionChannels(QueryConnectionChannelsRequest) returns (QueryConnectionChannelsResponse) { + option (google.api.http).get = "/ibc/channel/v1beta1/connections/{connection}/channels"; } // ChannelClientState queries for the client state for the channel associated // with the provided channel identifiers. - rpc ChannelClientState(QueryChannelClientStateRequest) - returns (QueryChannelClientStateResponse) { - option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state"; + rpc ChannelClientState(QueryChannelClientStateRequest) returns (QueryChannelClientStateResponse) { + 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 // associated with the provided channel identifiers. - rpc ChannelConsensusState(QueryChannelConsensusStateRequest) - returns (QueryChannelConsensusStateResponse) { - option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/epoch/{epoch_number}/height/{epoch_height}"; + rpc ChannelConsensusState(QueryChannelConsensusStateRequest) returns (QueryChannelConsensusStateResponse) { + option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/epoch/" + "{epoch_number}/height/{epoch_height}"; } // PacketCommitment queries a stored packet commitment hash. - rpc PacketCommitment(QueryPacketCommitmentRequest) - returns (QueryPacketCommitmentResponse) { - option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}"; + rpc PacketCommitment(QueryPacketCommitmentRequest) returns (QueryPacketCommitmentResponse) { + option (google.api.http).get = + "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}"; } // PacketCommitments returns the all the packet commitments hashes associated // with a channel. - rpc PacketCommitments(QueryPacketCommitmentsRequest) - returns (QueryPacketCommitmentsResponse) { - option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments"; + rpc PacketCommitments(QueryPacketCommitmentsRequest) returns (QueryPacketCommitmentsResponse) { + option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments"; } // PacketAcknowledgement queries a stored packet acknowledgement hash. - rpc PacketAcknowledgement(QueryPacketAcknowledgementRequest) - returns (QueryPacketAcknowledgementResponse) { - option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}"; + rpc PacketAcknowledgement(QueryPacketAcknowledgementRequest) returns (QueryPacketAcknowledgementResponse) { + 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 // channel and sequences. - rpc UnrelayedPackets(QueryUnrelayedPacketsRequest) - returns (QueryUnrelayedPacketsResponse) { - option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/packet_acks/{acknowledgements}/unrelayed_packets"; + rpc UnrelayedPackets(QueryUnrelayedPacketsRequest) returns (QueryUnrelayedPacketsResponse) { + option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/" + "{packet_commitment_sequences}/packet_acks/{acknowledgements}/unrelayed_packets"; } // NextSequenceReceive returns the next receive sequence for a given channel. - rpc NextSequenceReceive(QueryNextSequenceReceiveRequest) - returns (QueryNextSequenceReceiveResponse) { - option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence"; + rpc NextSequenceReceive(QueryNextSequenceReceiveRequest) returns (QueryNextSequenceReceiveResponse) { + 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 string proof_path = 3; // height at which the proof was retrieved - ibc.client.Height proof_height = 4 [ - (gogoproto.nullable) = false - ]; + ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false]; } // QueryChannelsRequest is the request type for the Query/Channels RPC method @@ -113,9 +106,7 @@ message QueryChannelsResponse { // pagination response cosmos.base.query.v1beta1.PageResponse pagination = 2; // query block height - ibc.client.Height height = 3 [ - (gogoproto.nullable) = false - ]; + ibc.client.Height height = 3 [(gogoproto.nullable) = false]; } // QueryConnectionChannelsRequest is the request type for the @@ -135,9 +126,7 @@ message QueryConnectionChannelsResponse { // pagination response cosmos.base.query.v1beta1.PageResponse pagination = 2; // query block height - ibc.client.Height height = 3 [ - (gogoproto.nullable) = false - ]; + ibc.client.Height height = 3 [(gogoproto.nullable) = false]; } // QueryChannelClientStateRequest is the request type for the Query/ClientState @@ -159,9 +148,7 @@ message QueryChannelClientStateResponse { // merkle proof path string proof_path = 3; // height at which the proof was retrieved - ibc.client.Height proof_height = 4 [ - (gogoproto.nullable) = false - ]; + ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false]; } // QueryChannelConsensusStateRequest is the request type for the @@ -189,9 +176,7 @@ message QueryChannelConsensusStateResponse { // merkle proof path string proof_path = 4; // height at which the proof was retrieved - ibc.client.Height proof_height = 5 [ - (gogoproto.nullable) = false - ]; + ibc.client.Height proof_height = 5 [(gogoproto.nullable) = false]; } // QueryPacketCommitmentRequest is the request type for the @@ -216,9 +201,7 @@ message QueryPacketCommitmentResponse { // merkle proof path string proof_path = 3; // height at which the proof was retrieved - ibc.client.Height proof_height = 4 [ - (gogoproto.nullable) = false - ]; + ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false]; } // QueryPacketCommitmentsRequest is the request type for the @@ -239,9 +222,7 @@ message QueryPacketCommitmentsResponse { // pagination response cosmos.base.query.v1beta1.PageResponse pagination = 2; // query block height - ibc.client.Height height = 3 [ - (gogoproto.nullable) = false - ]; + ibc.client.Height height = 3 [(gogoproto.nullable) = false]; } // QueryPacketAcknowledgementRequest is the request type for the @@ -266,9 +247,7 @@ message QueryPacketAcknowledgementResponse { // merkle proof path string proof_path = 3; // height at which the proof was retrieved - ibc.client.Height proof_height = 4 [ - (gogoproto.nullable) = false - ]; + ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false]; } // QueryUnrelayedPacketsRequest is the request type for the @@ -291,9 +270,7 @@ message QueryUnrelayedPacketsResponse { // list of unrelayed packet sequences repeated uint64 sequences = 1; // query block height - ibc.client.Height height = 2 [ - (gogoproto.nullable) = false - ]; + ibc.client.Height height = 2 [(gogoproto.nullable) = false]; } // QueryNextSequenceReceiveRequest is the request type for the @@ -315,8 +292,5 @@ message QueryNextSequenceReceiveResponse { // merkle proof path string proof_path = 3; // height at which the proof was retrieved - ibc.client.Height proof_height = 4 [ - (gogoproto.nullable) = false - ]; + ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false]; } - diff --git a/proto/ibc/client/client.proto b/proto/ibc/client/client.proto index a2c7d9ded1..d6c3fc3b7f 100644 --- a/proto/ibc/client/client.proto +++ b/proto/ibc/client/client.proto @@ -12,8 +12,7 @@ message IdentifiedClientState { // client identifier string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; // client state - google.protobuf.Any client_state = 2 - [(gogoproto.moretags) = "yaml:\"client_state\""]; + google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; } // ClientConsensusStates defines all the stored consensus states for a given @@ -22,8 +21,7 @@ message ClientConsensusStates { // client identifier string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; // consensus states associated with the client - repeated google.protobuf.Any consensus_states = 2 - [(gogoproto.moretags) = "yaml:\"consensus_states\""]; + repeated google.protobuf.Any consensus_states = 2 [(gogoproto.moretags) = "yaml:\"consensus_states\""]; } // ClientUpdateProposal is a governance proposal. If it passes, the client is @@ -46,15 +44,12 @@ message MsgCreateClient { // client unique identifier string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; // light client state - google.protobuf.Any client_state = 2 - [(gogoproto.moretags) = "yaml:\"client_state\""]; + google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; // consensus state associated with the client that corresponds to a given // height. - google.protobuf.Any consensus_state = 3 - [(gogoproto.moretags) = "yaml:\"consensus_state\""]; + google.protobuf.Any consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; // signer address - bytes signer = 4 - [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + bytes signer = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; } // MsgUpdateClient defines an sdk.Msg to update a IBC client state using @@ -65,8 +60,7 @@ message MsgUpdateClient { // header to update the light client google.protobuf.Any header = 2; // signer address - bytes signer = 3 - [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + bytes signer = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; } // MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for @@ -77,8 +71,7 @@ message MsgSubmitMisbehaviour { // misbehaviour used for freezing the light client google.protobuf.Any misbehaviour = 2; // signer address - bytes signer = 3 - [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + bytes signer = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; } // 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 // be monitonically increasing even as the EpochHeight gets reset message Height { - option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; // the epoch that the client is currently on diff --git a/proto/ibc/client/query.proto b/proto/ibc/client/query.proto index 65812cef43..fa008dffc5 100644 --- a/proto/ibc/client/query.proto +++ b/proto/ibc/client/query.proto @@ -23,7 +23,8 @@ service Query { // ConsensusState queries a consensus state associated with a client state at a given height. 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. @@ -50,9 +51,7 @@ message QueryClientStateResponse { // merkle proof path string proof_path = 3; // height at which the proof was retrieved - ibc.client.Height proof_height = 4 [ - (gogoproto.nullable) = false - ]; + ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false]; } // QueryClientStatesRequest is the request type for the Query/ClientStates RPC @@ -76,7 +75,7 @@ message QueryClientStatesResponse { message QueryConsensusStateRequest { // client identifier string client_id = 1; - // consensus state epoch number + // consensus state epoch number uint64 epoch_number = 2; // consensus state epoch height uint64 epoch_height = 3; @@ -93,10 +92,8 @@ message QueryConsensusStateResponse { // merkle proof path string proof_path = 3; // height at which the proof was retrieved - ibc.client.Height proof_height = 4 [ - (gogoproto.nullable) = false - ]; -; + ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false]; + ; } // QueryConsensusStatesRequest is the request type for the Query/ConsensusStates RPC method. diff --git a/proto/ibc/commitment/commitment.proto b/proto/ibc/commitment/commitment.proto index 9fd11fe52c..a02cd7c057 100644 --- a/proto/ibc/commitment/commitment.proto +++ b/proto/ibc/commitment/commitment.proto @@ -25,10 +25,7 @@ message MerklePrefix { message MerklePath { option (gogoproto.goproto_stringer) = false; - KeyPath key_path = 1 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"key_path\"" - ]; + KeyPath key_path = 1 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"key_path\""]; } // MerkleProof is a wrapper type that contains a merkle proof. diff --git a/proto/ibc/connection/connection.proto b/proto/ibc/connection/connection.proto index d7419418b2..8c550f5c14 100644 --- a/proto/ibc/connection/connection.proto +++ b/proto/ibc/connection/connection.proto @@ -11,94 +11,60 @@ import "ibc/client/client.proto"; // MsgConnectionOpenInit defines the msg sent by an account on Chain A to // initialize a connection with Chain B. message MsgConnectionOpenInit { - string client_id = 1 [ - (gogoproto.moretags) = "yaml:\"client_id\"" - ]; - string connection_id = 2 [ - (gogoproto.moretags) = "yaml:\"connection_id\"" - ]; - Counterparty counterparty = 3 [(gogoproto.nullable) = false]; - bytes signer = 4 - [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + string connection_id = 2 [(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 // connection on Chain B. message MsgConnectionOpenTry { - string client_id = 1 [ - (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\"" - ]; - 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 - ]; + string client_id = 1 [(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\""]; + 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 -> // INIT` bytes proof_init = 7 [(gogoproto.moretags) = "yaml:\"proof_init\""]; // proof of client state included in message bytes proof_client = 8 [(gogoproto.moretags) = "yaml:\"proof_client\""]; // proof of client consensus state - bytes proof_consensus = 9 [(gogoproto.moretags) = "yaml:\"proof_consensus\""]; - ibc.client.Height consensus_height = 10 [ - (gogoproto.moretags) = "yaml:\"consensus_height\"", - (gogoproto.nullable) = false - ]; - bytes signer = 11 - [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + bytes proof_consensus = 9 [(gogoproto.moretags) = "yaml:\"proof_consensus\""]; + ibc.client.Height consensus_height = 10 + [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; + bytes signer = 11 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; } // MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to // acknowledge the change of connection state to TRYOPEN on Chain B. message MsgConnectionOpenAck { - string connection_id = 1 [ - (gogoproto.moretags) = "yaml:\"connection_id\"" - ]; - string version = 2; - 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 - ]; + string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + string version = 2; + 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 -> // TRYOPEN` bytes proof_try = 5 [(gogoproto.moretags) = "yaml:\"proof_try\""]; // proof of client state included in message bytes proof_client = 6 [(gogoproto.moretags) = "yaml:\"proof_client\""]; // proof of client consensus state - bytes proof_consensus = 7 [(gogoproto.moretags) = "yaml:\"proof_consensus\""]; - ibc.client.Height consensus_height = 8 [ - (gogoproto.moretags) = "yaml:\"consensus_height\"", - (gogoproto.nullable) = false - ]; - bytes signer = 9 - [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + bytes proof_consensus = 7 [(gogoproto.moretags) = "yaml:\"proof_consensus\""]; + ibc.client.Height consensus_height = 8 + [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; + bytes signer = 9 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; } // MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to // acknowledge the change of connection state to OPEN on Chain A. message MsgConnectionOpenConfirm { - string connection_id = 1 [ - (gogoproto.moretags) = "yaml:\"connection_id\"" - ]; + string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; // proof for the change of the connection state on Chain A: `INIT -> OPEN` - bytes proof_ack = 2 [(gogoproto.moretags) = "yaml:\"proof_ack\""]; - ibc.client.Height proof_height = 3 [ - (gogoproto.moretags) = "yaml:\"proof_height\"", - (gogoproto.nullable) = false - ]; - bytes signer = 4 - [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + bytes proof_ack = 2 [(gogoproto.moretags) = "yaml:\"proof_ack\""]; + ibc.client.Height proof_height = 3 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + bytes signer = 4 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; } // ICS03 - Connection Data Structures as defined in @@ -110,9 +76,7 @@ message MsgConnectionOpenConfirm { message ConnectionEnd { option (gogoproto.goproto_getters) = false; // client associated with this connection. - string client_id = 1 [ - (gogoproto.moretags) = "yaml:\"client_id\"" - ]; + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; // IBC version which can be utilised to determine encodings or protocols for // channels or packets utilising this connection repeated string versions = 2; @@ -127,12 +91,9 @@ message ConnectionEnd { message IdentifiedConnection { option (gogoproto.goproto_getters) = false; // connection identifier. - string id = 1 - [(gogoproto.moretags) = "yaml:\"id\""]; + string id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; // client associated with this connection. - string client_id = 2 [ - (gogoproto.moretags) = "yaml:\"client_id\"" - ]; + string client_id = 2 [(gogoproto.moretags) = "yaml:\"client_id\""]; // IBC version which can be utilised to determine encodings or protocols for // channels or packets utilising this connection repeated string versions = 3; @@ -148,8 +109,7 @@ enum State { option (gogoproto.goproto_enum_prefix) = false; // Default State - STATE_UNINITIALIZED_UNSPECIFIED = 0 - [(gogoproto.enumvalue_customname) = "UNINITIALIZED"]; + STATE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNINITIALIZED"]; // A connection end has just started the opening handshake. STATE_INIT = 1 [(gogoproto.enumvalue_customname) = "INIT"]; // 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 // connection. - string client_id = 1 [ - (gogoproto.moretags) = "yaml:\"client_id\"" - ]; + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; // identifies the connection end on the counterparty chain associated with a // given connection. - string connection_id = 2 [ - (gogoproto.moretags) = "yaml:\"connection_id\"" - ]; + string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""]; // commitment merkle prefix of the counterparty chain 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. message ConnectionPaths { // client state unique identifier - string client_id = 1 [ - (gogoproto.moretags) = "yaml:\"client_id\"" - ]; + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; // list of connection paths repeated string paths = 2; } diff --git a/proto/ibc/connection/genesis.proto b/proto/ibc/connection/genesis.proto index 128605de68..478458e6f6 100644 --- a/proto/ibc/connection/genesis.proto +++ b/proto/ibc/connection/genesis.proto @@ -6,14 +6,9 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/03-connection/types"; import "gogoproto/gogo.proto"; import "ibc/connection/connection.proto"; - // GenesisState defines the ibc connection submodule's genesis state. message GenesisState { - repeated IdentifiedConnection connections = 1 [ - (gogoproto.nullable) = false - ]; - repeated ConnectionPaths client_connection_paths = 2 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"client_connection_paths\"" - ]; + repeated IdentifiedConnection connections = 1 [(gogoproto.nullable) = false]; + repeated ConnectionPaths client_connection_paths = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_connection_paths\""]; } diff --git a/proto/ibc/connection/query.proto b/proto/ibc/connection/query.proto index 8d099a6461..de53edfa59 100644 --- a/proto/ibc/connection/query.proto +++ b/proto/ibc/connection/query.proto @@ -14,7 +14,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/03-connection/types"; service Query { // Connection queries an IBC connection end. 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. @@ -24,23 +24,21 @@ service Query { // ClientConnections queries the connection paths associated with a client // state. - rpc ClientConnections(QueryClientConnectionsRequest) - returns (QueryClientConnectionsResponse) { - option (google.api.http).get = "/ibc/connection/v1beta1/client_connections/{client_id}"; + rpc ClientConnections(QueryClientConnectionsRequest) returns (QueryClientConnectionsResponse) { + option (google.api.http).get = "/ibc/connection/v1beta1/client_connections/{client_id}"; } // ConnectionClientState queries the client state associated with the // connection. - rpc ConnectionClientState(QueryConnectionClientStateRequest) - returns (QueryConnectionClientStateResponse) { - option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}/client_state"; + rpc ConnectionClientState(QueryConnectionClientStateRequest) returns (QueryConnectionClientStateResponse) { + option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}/client_state"; } // ConnectionConsensusState queries the consensus state associated with the // connection. - rpc ConnectionConsensusState(QueryConnectionConsensusStateRequest) - returns (QueryConnectionConsensusStateResponse) { - option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}/consensus_state/epoch/{epoch_number}/height/{epoch_height}"; + rpc ConnectionConsensusState(QueryConnectionConsensusStateRequest) returns (QueryConnectionConsensusStateResponse) { + option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}/consensus_state/epoch/" + "{epoch_number}/height/{epoch_height}"; } } @@ -62,9 +60,7 @@ message QueryConnectionResponse { // merkle proof path string proof_path = 3; // height at which the proof was retrieved - ibc.client.Height proof_height = 4 [ - (gogoproto.nullable) = false - ]; + ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false]; } // QueryConnectionsRequest is the request type for the Query/Connections RPC @@ -81,9 +77,7 @@ message QueryConnectionsResponse { // pagination response cosmos.base.query.v1beta1.PageResponse pagination = 2; // query block height - ibc.client.Height height = 3 [ - (gogoproto.nullable) = false - ]; + ibc.client.Height height = 3 [(gogoproto.nullable) = false]; } // QueryClientConnectionsRequest is the request type for the @@ -103,18 +97,14 @@ message QueryClientConnectionsResponse { // merkle proof path string proof_path = 3; // height at which the proof was generated - ibc.client.Height proof_height = 4 [ - (gogoproto.nullable) = false - ]; + ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false]; } // QueryConnectionClientStateRequest is the request type for the // Query/ConnectionClientState RPC method message QueryConnectionClientStateRequest { // connection identifier - string connection_id = 1 [ - (gogoproto.moretags) = "yaml:\"connection_id\"" - ]; + string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; } // QueryConnectionClientStateResponse is the response type for the @@ -127,20 +117,16 @@ message QueryConnectionClientStateResponse { // merkle proof path string proof_path = 3; // height at which the proof was retrieved - ibc.client.Height proof_height = 4 [ - (gogoproto.nullable) = false - ]; + ibc.client.Height proof_height = 4 [(gogoproto.nullable) = false]; } // QueryConnectionConsensusStateRequest is the request type for the // Query/ConnectionConsensusState RPC method message QueryConnectionConsensusStateRequest { // connection identifier - string connection_id = 1 [ - (gogoproto.moretags) = "yaml:\"connection_id\"" - ]; - uint64 epoch_number = 2; - uint64 epoch_height = 3; + string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + uint64 epoch_number = 2; + uint64 epoch_height = 3; } // QueryConnectionConsensusStateResponse is the response type for the @@ -155,7 +141,5 @@ message QueryConnectionConsensusStateResponse { // merkle proof path string proof_path = 4; // height at which the proof was retrieved - ibc.client.Height proof_height = 5 [ - (gogoproto.nullable) = false - ]; + ibc.client.Height proof_height = 5 [(gogoproto.nullable) = false]; } diff --git a/proto/ibc/tendermint/tendermint.proto b/proto/ibc/tendermint/tendermint.proto index 2fce5b648f..39e3144e27 100644 --- a/proto/ibc/tendermint/tendermint.proto +++ b/proto/ibc/tendermint/tendermint.proto @@ -18,17 +18,11 @@ message ClientState { option (gogoproto.goproto_getters) = false; string chain_id = 1; - Fraction trust_level = 2 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"trust_level\"" - ]; + Fraction trust_level = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"trust_level\""]; // duration of the period since the LastestTimestamp during which the // submitted headers are valid for upgrade - google.protobuf.Duration trusting_period = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.moretags) = "yaml:\"trusting_period\"" - ]; + google.protobuf.Duration trusting_period = 3 + [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"trusting_period\""]; // duration of the staking unbonding period google.protobuf.Duration unbonding_period = 4 [ (gogoproto.nullable) = false, @@ -36,33 +30,21 @@ message ClientState { (gogoproto.moretags) = "yaml:\"unbonding_period\"" ]; // defines how much new (untrusted) header's Time can drift into the future. - google.protobuf.Duration max_clock_drift = 5 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.moretags) = "yaml:\"max_clock_drift\"" - ]; + google.protobuf.Duration max_clock_drift = 5 + [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"max_clock_drift\""]; // Block height when the client was frozen due to a misbehaviour - ibc.client.Height frozen_height = 6 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"frozen_height\"" - ]; + ibc.client.Height frozen_height = 6 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"frozen_height\""]; // Latest height the client was updated to - ibc.client.Height latest_height = 7 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"latest_height\"" - ]; + ibc.client.Height latest_height = 7 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"latest_height\""]; // Proof specifications used in verifying counterparty state - repeated ics23.ProofSpec proof_specs = 8 - [(gogoproto.moretags) = "yaml:\"proof_specs\""]; + repeated ics23.ProofSpec proof_specs = 8 [(gogoproto.moretags) = "yaml:\"proof_specs\""]; // This flag, when set to true, will allow governance to recover a client // which has expired - bool allow_update_after_expiry = 9 - [(gogoproto.moretags) = "yaml:\"allow_update_after_expiry\""]; + bool allow_update_after_expiry = 9 [(gogoproto.moretags) = "yaml:\"allow_update_after_expiry\""]; // This flag, when set to true, will allow governance to unfreeze a client // whose chain has experienced a misbehaviour event - bool allow_update_after_misbehaviour = 10 - [(gogoproto.moretags) = "yaml:\"allow_update_after_misbehaviour\""]; + bool allow_update_after_misbehaviour = 10 [(gogoproto.moretags) = "yaml:\"allow_update_after_misbehaviour\""]; } // ConsensusState defines the consensus state from Tendermint. @@ -71,15 +53,13 @@ message ConsensusState { // timestamp that corresponds to the block height in which the ConsensusState // was stored. - google.protobuf.Timestamp timestamp = 1 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + google.protobuf.Timestamp timestamp = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; // commitment root (i.e app hash) ibc.commitment.MerkleRoot root = 2 [(gogoproto.nullable) = false]; // height at which the consensus state was stored. ibc.client.Height height = 3 [(gogoproto.nullable) = false]; bytes next_validators_hash = 4 [ - (gogoproto.casttype) = - "github.com/tendermint/tendermint/libs/bytes.HexBytes", + (gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes", (gogoproto.moretags) = "yaml:\"next_validators_hash\"" ]; } @@ -92,14 +72,8 @@ message Misbehaviour { string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; string chain_id = 2 [(gogoproto.moretags) = "yaml:\"chain_id\""]; - Header header_1 = 3 [ - (gogoproto.customname) = "Header1", - (gogoproto.moretags) = "yaml:\"header_1\"" - ]; - Header header_2 = 4 [ - (gogoproto.customname) = "Header2", - (gogoproto.moretags) = "yaml:\"header_2\"" - ]; + Header header_1 = 3 [(gogoproto.customname) = "Header1", (gogoproto.moretags) = "yaml:\"header_1\""]; + Header header_2 = 4 [(gogoproto.customname) = "Header2", (gogoproto.moretags) = "yaml:\"header_2\""]; } // Header defines the Tendermint client consensus Header. @@ -115,19 +89,12 @@ message Misbehaviour { // hash to TrustedConsensusState.NextValidatorsHash since that is the last // trusted validator set at the TrustedHeight. message Header { - .tendermint.types.SignedHeader signed_header = 1 [ - (gogoproto.embed) = true, - (gogoproto.moretags) = "yaml:\"signed_header\"" - ]; + .tendermint.types.SignedHeader signed_header = 1 + [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"signed_header\""]; - .tendermint.types.ValidatorSet validator_set = 2 - [(gogoproto.moretags) = "yaml:\"validator_set\""]; - ibc.client.Height trusted_height = 3 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"trusted_height\"" - ]; - .tendermint.types.ValidatorSet trusted_validators = 4 - [(gogoproto.moretags) = "yaml:\"trusted_validators\""]; + .tendermint.types.ValidatorSet validator_set = 2 [(gogoproto.moretags) = "yaml:\"validator_set\""]; + ibc.client.Height trusted_height = 3 [(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 @@ -135,4 +102,3 @@ message Fraction { int64 numerator = 1; int64 denominator = 2; } - diff --git a/proto/ibc/transfer/genesis.proto b/proto/ibc/transfer/genesis.proto index 56a44470aa..6ec053215b 100644 --- a/proto/ibc/transfer/genesis.proto +++ b/proto/ibc/transfer/genesis.proto @@ -7,16 +7,12 @@ import "gogoproto/gogo.proto"; import "ibc/transfer/transfer.proto"; // GenesisState defines the ibc-transfer genesis state -message GenesisState{ - string port_id = 1 [ - (gogoproto.moretags) = "yaml:\"port_id\"" - ]; - repeated DenomTrace denom_traces = 2 [ - (gogoproto.castrepeated) = "Traces", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"denom_traces\"" - ]; - Params params = 3 [ - (gogoproto.nullable) = false - ]; +message GenesisState { + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + repeated DenomTrace denom_traces = 2 [ + (gogoproto.castrepeated) = "Traces", + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"denom_traces\"" + ]; + Params params = 3 [(gogoproto.nullable) = false]; } diff --git a/proto/ibc/transfer/query.proto b/proto/ibc/transfer/query.proto index 0fa22bbe59..31701531aa 100644 --- a/proto/ibc/transfer/query.proto +++ b/proto/ibc/transfer/query.proto @@ -40,26 +40,23 @@ message QueryDenomTraceResponse { // QueryConnectionsRequest is the request type for the Query/DenomTraces RPC method 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; } // QueryConnectionsResponse is the response type for the Query/DenomTraces RPC method. message QueryDenomTracesResponse { // denom_traces returns all denominations trace information. - repeated DenomTrace denom_traces = 1 [ - (gogoproto.castrepeated) = "Traces", - (gogoproto.nullable) = false - ]; + repeated DenomTrace denom_traces = 1 [(gogoproto.castrepeated) = "Traces", (gogoproto.nullable) = false]; // pagination defines the pagination in the response. cosmos.base.query.v1beta1.PageResponse pagination = 2; } // 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. -message QueryParamsResponse{ +message QueryParamsResponse { // params defines the parameters of the module. Params params = 1; -} +} diff --git a/proto/ibc/transfer/transfer.proto b/proto/ibc/transfer/transfer.proto index f17cd09bd6..56b177b53e 100644 --- a/proto/ibc/transfer/transfer.proto +++ b/proto/ibc/transfer/transfer.proto @@ -23,10 +23,7 @@ message MsgTransfer { string receiver = 5; // Timeout height relative to the current block height. // The timeout is disabled when set to 0. - ibc.client.Height timeout_height = 6 [ - (gogoproto.moretags) = "yaml:\"timeout_height\"", - (gogoproto.nullable) = false - ]; + ibc.client.Height timeout_height = 6 [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; // Timeout timestamp (in nanoseconds) relative to the current block timestamp. // The timeout is disabled when set to 0. uint64 timeout_timestamp = 7 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; @@ -51,8 +48,8 @@ message FungibleTokenPacketData { // onAcknowledgePacket: // https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#packet-relay message FungibleTokenPacketAcknowledgement { - bool success = 1; - string error = 2; + bool success = 1; + string error = 2; } // 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. message Params { // send_enabled enables or disables all cross-chain token transfers from this chain. - bool send_enabled = 1 [ - (gogoproto.moretags) = "yaml:\"send_enabled\"" - ]; + bool send_enabled = 1 [(gogoproto.moretags) = "yaml:\"send_enabled\""]; // receive_enabled enables or disables all cross-chain token transfers to this chain. - bool receive_enabled = 2 [ - (gogoproto.moretags) = "yaml:\"receive_enabled\"" - ]; + bool receive_enabled = 2 [(gogoproto.moretags) = "yaml:\"receive_enabled\""]; } diff --git a/proto/ibc/types/genesis.proto b/proto/ibc/types/genesis.proto index 203d50f0b5..88f7e7c23a 100644 --- a/proto/ibc/types/genesis.proto +++ b/proto/ibc/types/genesis.proto @@ -11,18 +11,12 @@ import "ibc/channel/genesis.proto"; // GenesisState defines the ibc module's genesis state. message GenesisState { // ICS002 - Clients genesis state - ibc.client.GenesisState client_genesis = 1 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"client_genesis\"" - ]; + ibc.client.GenesisState client_genesis = 1 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_genesis\""]; // ICS003 - Connections genesis state - ibc.connection.GenesisState connection_genesis = 2 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"connection_genesis\"" - ]; + ibc.connection.GenesisState connection_genesis = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"connection_genesis\""]; // ICS004 - Channel genesis state - ibc.channel.GenesisState channel_genesis = 3 [ - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"channel_genesis\"" - ]; + ibc.channel.GenesisState channel_genesis = 3 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"channel_genesis\""]; } diff --git a/testutil/testdata/proto.proto b/testutil/testdata/proto.proto index de1e9e5df7..f9d3ad8af9 100644 --- a/testutil/testdata/proto.proto +++ b/testutil/testdata/proto.proto @@ -19,7 +19,7 @@ message Cat { message HasAnimal { google.protobuf.Any animal = 1; - int64 x = 2; + int64 x = 2; } message HasHasAnimal { @@ -57,7 +57,7 @@ message TestAnyRequest { } message TestAnyResponse { - HasAnimal has_animal = 1; + HasAnimal has_animal = 1; } // msg type for testing @@ -68,306 +68,306 @@ message TestMsg { // bad MultiSignature with extra fields message BadMultiSignature { option (gogoproto.goproto_unrecognized) = true; - repeated bytes signatures = 1; - bytes malicious_field = 5; + repeated bytes signatures = 1; + bytes malicious_field = 5; } message Customer1 { - int32 id = 1; - string name = 2; - float subscription_fee = 3; + int32 id = 1; + string name = 2; + float subscription_fee = 3; - string payment = 7; + string payment = 7; } message Customer2 { - int32 id = 1; - int32 industry = 2; - string name = 3; - float fewer = 4; + int32 id = 1; + int32 industry = 2; + string name = 3; + float fewer = 4; - int64 reserved = 1047; + int64 reserved = 1047; - enum City { - Laos = 0; - LosAngeles = 1; - PaloAlto = 2; - Moscow = 3; - Nairobi = 4; - } + enum City { + Laos = 0; + LosAngeles = 1; + PaloAlto = 2; + Moscow = 3; + Nairobi = 4; + } - City city = 6; + City city = 6; - google.protobuf.Any miscellaneous = 10; + google.protobuf.Any miscellaneous = 10; } message Nested4A { - int32 id = 1; - string name = 2; + int32 id = 1; + string name = 2; } message Nested3A { - int32 id = 1; - string name = 2; - repeated Nested4A a4 = 4; - map index = 5; + int32 id = 1; + string name = 2; + repeated Nested4A a4 = 4; + map index = 5; } message Nested2A { - int32 id = 1; - string name = 2; - Nested3A nested = 3; + int32 id = 1; + string name = 2; + Nested3A nested = 3; } message Nested1A { - int32 id = 1; - Nested2A nested = 2; + int32 id = 1; + Nested2A nested = 2; } message Nested4B { - int32 id = 1; - int32 age = 2; - string name = 3; + int32 id = 1; + int32 age = 2; + string name = 3; } message Nested3B { - int32 id = 1; - int32 age = 2; - string name = 3; - repeated Nested4B b4 = 4; + int32 id = 1; + int32 age = 2; + string name = 3; + repeated Nested4B b4 = 4; } message Nested2B { - int32 id = 1; - double fee = 2; - Nested3B nested = 3; - string route = 4; + int32 id = 1; + double fee = 2; + Nested3B nested = 3; + string route = 4; } message Nested1B { - int32 id = 1; - Nested2B nested = 2; - int32 age = 3; + int32 id = 1; + Nested2B nested = 2; + int32 age = 3; } message Customer3 { - int32 id = 1; - string name = 2; - float sf = 3; - float surcharge = 4; - string destination = 5; + int32 id = 1; + string name = 2; + float sf = 3; + float surcharge = 4; + string destination = 5; - oneof payment { - string credit_card_no = 7; - string cheque_no = 8; - } + oneof payment { + string credit_card_no = 7; + string cheque_no = 8; + } - Customer1 original = 9; + Customer1 original = 9; } message TestVersion1 { - int64 x = 1; - TestVersion1 a = 2; - TestVersion1 b = 3; // [(gogoproto.nullable) = false] generates invalid recursive structs; - repeated TestVersion1 c = 4; - repeated TestVersion1 d = 5 [(gogoproto.nullable) = false]; - oneof sum { - int32 e = 6; - TestVersion1 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]; + int64 x = 1; + TestVersion1 a = 2; + TestVersion1 b = 3; // [(gogoproto.nullable) = false] generates invalid recursive structs; + repeated TestVersion1 c = 4; + repeated TestVersion1 d = 5 [(gogoproto.nullable) = false]; + oneof sum { + int32 e = 6; + TestVersion1 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]; } message TestVersion2 { - int64 x = 1; - TestVersion2 a = 2; - TestVersion2 b = 3; // [(gogoproto.nullable) = false]; - repeated TestVersion2 c = 4; - repeated TestVersion2 d = 5; // [(gogoproto.nullable) = false]; - oneof sum { - int32 e = 6; - TestVersion2 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]; - uint64 new_field = 25; + int64 x = 1; + TestVersion2 a = 2; + TestVersion2 b = 3; // [(gogoproto.nullable) = false]; + repeated TestVersion2 c = 4; + repeated TestVersion2 d = 5; // [(gogoproto.nullable) = false]; + oneof sum { + int32 e = 6; + TestVersion2 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]; + uint64 new_field = 25; } message TestVersion3 { - int64 x = 1; - TestVersion3 a = 2; - TestVersion3 b = 3; // [(gogoproto.nullable) = false]; - repeated TestVersion3 c = 4; - repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false]; - oneof sum { - int32 e = 6; - TestVersion3 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; + int64 x = 1; + TestVersion3 a = 2; + TestVersion3 b = 3; // [(gogoproto.nullable) = false]; + repeated TestVersion3 c = 4; + repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false]; + oneof sum { + int32 e = 6; + TestVersion3 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 TestVersion3LoneOneOfValue { - int64 x = 1; - TestVersion3 a = 2; - TestVersion3 b = 3; // [(gogoproto.nullable) = false]; - repeated TestVersion3 c = 4; - repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false]; - oneof sum { - int32 e = 6; - } - 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; + int64 x = 1; + TestVersion3 a = 2; + TestVersion3 b = 3; // [(gogoproto.nullable) = false]; + repeated TestVersion3 c = 4; + repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false]; + oneof sum { + int32 e = 6; + } + 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 TestVersion3LoneNesting { - int64 x = 1; - TestVersion3 a = 2; - TestVersion3 b = 3; // [(gogoproto.nullable) = false]; - repeated TestVersion3 c = 4; - repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false]; - oneof sum { - TestVersion3LoneNesting f = 7; + int64 x = 1; + TestVersion3 a = 2; + TestVersion3 b = 3; // [(gogoproto.nullable) = false]; + repeated TestVersion3 c = 4; + repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false]; + oneof sum { + 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; - 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; + InnerInner inner = 3; + } - message Inner1 { - int64 id = 1; - string name = 2; - message InnerInner { - string id = 1; - string city = 2; - } - InnerInner inner = 3; + Inner1 inner1 = 14; + + message Inner2 { + string id = 1; + string country = 2; + message InnerInner { + string id = 1; + string city = 2; } + InnerInner inner = 3; + } - Inner1 inner1 = 14; - - message Inner2 { - string id = 1; - string country = 2; - message InnerInner { - string id = 1; - string city = 2; - } - InnerInner inner = 3; - } - - Inner2 inner2 = 15; + Inner2 inner2 = 15; } message TestVersion4LoneNesting { - int64 x = 1; - TestVersion3 a = 2; - TestVersion3 b = 3; // [(gogoproto.nullable) = false]; - repeated TestVersion3 c = 4; - repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false]; - oneof sum { - TestVersion3LoneNesting f = 7; + int64 x = 1; + TestVersion3 a = 2; + TestVersion3 b = 3; // [(gogoproto.nullable) = false]; + repeated TestVersion3 c = 4; + repeated TestVersion3 d = 5; // [(gogoproto.nullable) = false]; + oneof sum { + 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; - 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; + InnerInner inner = 3; + } - message Inner1 { - int64 id = 1; - string name = 2; - message InnerInner { - int64 id = 1; - string city = 2; - } - InnerInner inner = 3; + Inner1 inner1 = 14; + + message Inner2 { + string id = 1; + string country = 2; + message InnerInner { + string id = 1; + int64 value = 2; } + InnerInner inner = 3; + } - Inner1 inner1 = 14; - - message Inner2 { - string id = 1; - string country = 2; - message InnerInner { - string id = 1; - int64 value = 2; - } - InnerInner inner = 3; - } - - Inner2 inner2 = 15; + Inner2 inner2 = 15; } message TestVersionFD1 { - int64 x = 1; - TestVersion1 a = 2; - oneof sum { - int32 e = 6; - TestVersion1 f = 7; - } - google.protobuf.Any g = 8; - repeated TestVersion1 h = 9; // [(gogoproto.castrepeated) = "TestVersion1"]; + int64 x = 1; + TestVersion1 a = 2; + oneof sum { + int32 e = 6; + TestVersion1 f = 7; + } + google.protobuf.Any g = 8; + repeated TestVersion1 h = 9; // [(gogoproto.castrepeated) = "TestVersion1"]; } message TestVersionFD1WithExtraAny { - int64 x = 1; - TestVersion1 a = 2; - oneof sum { - int32 e = 6; - TestVersion1 f = 7; - } - AnyWithExtra g = 8; - repeated TestVersion1 h = 9; // [(gogoproto.castrepeated) = "TestVersion1"]; + int64 x = 1; + TestVersion1 a = 2; + oneof sum { + int32 e = 6; + TestVersion1 f = 7; + } + AnyWithExtra g = 8; + repeated TestVersion1 h = 9; // [(gogoproto.castrepeated) = "TestVersion1"]; } message AnyWithExtra { - google.protobuf.Any a = 1 [(gogoproto.embed) = true]; - int64 b = 3; - int64 c = 4; + google.protobuf.Any a = 1 [(gogoproto.embed) = true]; + int64 b = 3; + int64 c = 4; } message TestUpdatedTxRaw { - bytes body_bytes = 1; - bytes auth_info_bytes = 2; - repeated bytes signatures = 3; - bytes new_field_5 = 5; - bytes new_field_1024 = 1024; + bytes body_bytes = 1; + bytes auth_info_bytes = 2; + repeated bytes signatures = 3; + bytes new_field_5 = 5; + bytes new_field_1024 = 1024; } message TestUpdatedTxBody { - repeated google.protobuf.Any messages = 1; - string memo = 2; - int64 timeout_height = 3; - uint64 some_new_field = 4; - string some_new_field_non_critical_field = 1050; - repeated google.protobuf.Any extension_options = 1023; - repeated google.protobuf.Any non_critical_extension_options = 2047; + repeated google.protobuf.Any messages = 1; + string memo = 2; + int64 timeout_height = 3; + uint64 some_new_field = 4; + string some_new_field_non_critical_field = 1050; + repeated google.protobuf.Any extension_options = 1023; + repeated google.protobuf.Any non_critical_extension_options = 2047; } message TestUpdatedAuthInfo { - repeated cosmos.tx.v1beta1.SignerInfo signer_infos = 1; - cosmos.tx.v1beta1.Fee fee = 2; - bytes new_field_3 = 3; - bytes new_field_1024 = 1024; + repeated cosmos.tx.v1beta1.SignerInfo signer_infos = 1; + cosmos.tx.v1beta1.Fee fee = 2; + bytes new_field_3 = 3; + bytes new_field_1024 = 1024; } message TestRepeatedUints { - repeated uint64 nums = 1; + repeated uint64 nums = 1; }