From 1474f190cfee1851cddebaeb2245db82b2530eaa Mon Sep 17 00:00:00 2001 From: atheesh Date: Tue, 19 Jul 2022 12:14:54 +0530 Subject: [PATCH 01/33] wip: deprecate x/params usage in x/gov --- CHANGELOG.md | 18 +- LICENSE | 4 +- .../base/tendermint/v1beta1/query.pulsar.go | 11783 ---------------- .../base/tendermint/v1beta1/query_grpc.pb.go | 343 - api/cosmos/gov/v1/genesis.pulsar.go | 305 +- api/cosmos/gov/v1/gov.pulsar.go | 1084 +- api/cosmos/gov/v1/query.pulsar.go | 637 +- api/cosmos/gov/v1/tx.pulsar.go | 1109 +- api/cosmos/gov/v1/tx_grpc.pb.go | 44 + api/go.mod | 2 +- api/go.sum | 4 +- client/grpc/tmservice/query.pb.go | 300 +- client/grpc/tmservice/service.go | 10 +- client/grpc/tmservice/service_test.go | 24 +- client/grpc/tmservice/types.pb.go | 1368 ++ client/grpc/tmservice/util.go | 38 + client/rpc/status.go | 9 +- client/v2/go.mod | 2 +- client/v2/go.sum | 4 +- contrib/images/simd-dlv/Dockerfile | 1 + contrib/images/simd-env/Dockerfile | 1 + core/appconfig/config_test.go | 1 - core/go.mod | 2 +- core/go.sum | 4 +- cosmovisor/cmd/cosmovisor/init_test.go | 6 +- cosmovisor/go.mod | 10 +- cosmovisor/go.sum | 20 +- crypto/armor_test.go | 12 +- crypto/keys/multisig/multisig_test.go | 10 +- depinject/internal/codegen/file.go | 90 + depinject/internal/codegen/func.go | 31 + depinject/internal/codegen/ident.go | 29 + depinject/internal/codegen/ident_test.go | 48 + depinject/internal/codegen/import.go | 48 + depinject/internal/codegen/import_test.go | 60 + errors/go.mod | 2 +- errors/go.sum | 4 +- go.mod | 80 +- go.sum | 131 +- orm/go.mod | 4 +- orm/go.sum | 7 +- .../base/tendermint/v1beta1/query.proto | 17 +- .../base/tendermint/v1beta1/types.proto | 50 + proto/cosmos/gov/v1/genesis.proto | 8 +- proto/cosmos/gov/v1/gov.proto | 26 + proto/cosmos/gov/v1/query.proto | 16 +- proto/cosmos/gov/v1/tx.proto | 27 + scripts/mockgen.sh | 2 + simapp/app_legacy.go | 1 - store/tools/ics23/go.mod | 36 +- store/tools/ics23/go.sum | 760 +- store/tools/ics23/iavl/helpers/helpers.go | 2 +- testutil/configurator/configurator.go | 109 + types/query/filtered_pagination_test.go | 73 +- types/query/pagination_test.go | 88 +- types/utils.go | 6 +- x/auth/ante/fee.go | 16 +- x/auth/ante/fee_test.go | 9 + x/auth/ante/sigverify.go | 4 +- x/auth/ante/sigverify_test.go | 1 - x/auth/client/cli/tx_sign.go | 39 +- x/auth/client/testutil/suite.go | 21 +- x/auth/keeper/keeper.go | 1 - x/auth/keeper/keeper_test.go | 1 - x/auth/keeper/migrations.go | 10 +- x/auth/migrations/v043/store_test.go | 14 +- x/auth/migrations/v046/store_test.go | 22 +- x/auth/migrations/{v2 => v4}/migrate.go | 7 +- x/auth/migrations/{v2 => v4}/migrator_test.go | 11 +- x/auth/module.go | 11 +- x/capability/keeper/keeper_test.go | 52 +- x/crisis/keeper/keeper.go | 1 - x/crisis/keeper/keeper_test.go | 56 +- x/crisis/keeper/migrator.go | 4 +- x/crisis/keeper/msg_server_test.go | 23 +- x/crisis/migrations/{v046 => v2}/migrate.go | 2 +- .../migrations/{v046 => v2}/migrate_test.go | 13 +- x/crisis/module.go | 4 +- x/crisis/testutil/expected_keepers_mocks.go | 49 + x/crisis/types/keys.go | 4 +- x/distribution/keeper/migrations.go | 4 +- .../migrations/{v046 => v3}/migrate.go | 6 +- .../migrations/{v046 => v3}/migrate_test.go | 13 +- x/distribution/module.go | 6 +- x/feegrant/basic_fee_test.go | 29 +- x/feegrant/filtered_fee_test.go | 41 +- x/feegrant/grant_test.go | 35 +- x/feegrant/keeper/genesis_test.go | 41 +- x/feegrant/keeper/keeper.go | 2 - x/feegrant/keeper/keeper_test.go | 51 +- x/feegrant/module/abci_test.go | 61 +- x/feegrant/periodic_fee_test.go | 30 +- x/feegrant/simulation/decoder_test.go | 1 - x/feegrant/simulation/genesis_test.go | 22 +- x/feegrant/simulation/operations_test.go | 6 +- x/feegrant/testutil/app_config.go | 4 +- x/feegrant/testutil/expected_keepers_mocks.go | 155 + x/gov/client/cli/query.go | 136 +- x/gov/client/testutil/cli_test.go | 11 +- x/gov/client/testutil/grpc.go | 120 +- x/gov/client/testutil/query.go | 94 +- x/gov/exported/exported.go | 18 + x/gov/genesis.go | 18 +- x/gov/keeper/grpc_query.go | 77 +- x/gov/keeper/grpc_query_test.go | 342 +- x/gov/keeper/keeper.go | 12 +- x/gov/keeper/migrations.go | 11 +- x/gov/keeper/msg_server.go | 23 + x/gov/keeper/params.go | 23 + x/gov/migrations/v046/json.go | 11 +- x/gov/migrations/v046/keys.go | 3 + x/gov/migrations/v046/store.go | 39 +- x/gov/module.go | 43 +- x/gov/simulation/genesis.go | 4 +- x/gov/simulation/genesis_test.go | 12 +- x/gov/types/keys.go | 5 + x/gov/types/v1/codec.go | 2 + x/gov/types/v1/genesis.go | 38 +- x/gov/types/v1/genesis.pb.go | 188 +- x/gov/types/v1/genesis_test.go | 154 +- x/gov/types/v1/gov.pb.go | 603 +- x/gov/types/v1/msgs.go | 61 +- x/gov/types/v1/params.go | 174 +- x/gov/types/v1/params_legacy.go | 21 + x/gov/types/v1/query.pb.go | 320 +- x/gov/types/v1/query.pb.gw.go | 38 +- x/gov/types/v1/tx.pb.go | 495 +- x/group/client/cli/tx.go | 153 +- x/group/client/cli/util.go | 19 + x/group/client/testutil/tx.go | 56 +- x/group/spec/05_client.md | 80 +- x/mint/migrations/v2/migrate.go | 4 +- x/params/module.go | 2 +- x/slashing/keeper/keeper.go | 1 - x/slashing/keeper/migrations.go | 4 +- x/slashing/keeper/querier.go | 92 - x/slashing/keeper/querier_test.go | 72 - x/slashing/migrations/{v2 => v3}/migrate.go | 6 +- .../migrations/{v2 => v3}/migrator_test.go | 11 +- x/slashing/module.go | 12 +- x/staking/keeper/val_state_change.go | 2 +- 141 files changed, 8018 insertions(+), 15384 deletions(-) delete mode 100644 api/cosmos/base/tendermint/v1beta1/query.pulsar.go delete mode 100644 api/cosmos/base/tendermint/v1beta1/query_grpc.pb.go create mode 100644 client/grpc/tmservice/types.pb.go create mode 100644 client/grpc/tmservice/util.go create mode 100644 depinject/internal/codegen/file.go create mode 100644 depinject/internal/codegen/func.go create mode 100644 depinject/internal/codegen/ident.go create mode 100644 depinject/internal/codegen/ident_test.go create mode 100644 depinject/internal/codegen/import.go create mode 100644 depinject/internal/codegen/import_test.go create mode 100644 proto/cosmos/base/tendermint/v1beta1/types.proto create mode 100644 testutil/configurator/configurator.go rename x/auth/migrations/{v2 => v4}/migrate.go (94%) rename x/auth/migrations/{v2 => v4}/migrator_test.go (82%) rename x/crisis/migrations/{v046 => v2}/migrate.go (98%) rename x/crisis/migrations/{v046 => v2}/migrate_test.go (81%) create mode 100644 x/crisis/testutil/expected_keepers_mocks.go rename x/distribution/migrations/{v046 => v3}/migrate.go (95%) rename x/distribution/migrations/{v046 => v3}/migrate_test.go (81%) create mode 100644 x/feegrant/testutil/expected_keepers_mocks.go create mode 100644 x/gov/exported/exported.go create mode 100644 x/gov/types/v1/params_legacy.go delete mode 100644 x/slashing/keeper/querier.go delete mode 100644 x/slashing/keeper/querier_test.go rename x/slashing/migrations/{v2 => v3}/migrate.go (94%) rename x/slashing/migrations/{v2 => v3}/migrator_test.go (82%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e0aad63f8c1..45e38b93aa18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,10 +37,6 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] - -### API Breaking Changes - -* (types) [\#12355](https://github.com/cosmos/cosmos-sdk/pull/12355) Remove the compile-time `types.DBbackend` variable. Removes usage of the same in server/util.go ### Features * (cli) [#12028](https://github.com/cosmos/cosmos-sdk/pull/12028) Add the `tendermint key-migrate` to perform Tendermint v0.35 DB key migration. @@ -49,10 +45,14 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements +* [#12596](https://github.com/cosmos/cosmos-sdk/pull/12596) Remove all imports of the non-existent gogo/protobuf v1.3.3 to ease downstream use and go workspaces. +* [#12589](https://github.com/cosmos/cosmos-sdk/pull/12589) Allow zero gas in simulation mode. +* [#12576](https://github.com/cosmos/cosmos-sdk/pull/12576) Remove dependency on cosmos/keyring and upgrade to 99designs/keyring v1.2.1 * [#12089](https://github.com/cosmos/cosmos-sdk/pull/12089) Mark the `TipDecorator` as beta, don't include it in simapp by default. * [#12153](https://github.com/cosmos/cosmos-sdk/pull/12153) Add a new `NewSimulationManagerFromAppModules` constructor, to simplify simulation wiring. * [#12187](https://github.com/cosmos/cosmos-sdk/pull/12187) Add batch operation for x/nft module. * [#12453](https://github.com/cosmos/cosmos-sdk/pull/12453) Add `NewInMemoryWithKeyring` function which allows the creation of in memory `keystore` instances with a specified set of existing items. +* [#11390](https://github.com/cosmos/cosmos-sdk/pull/11390) `LatestBlockResponse` & `BlockByHeightResponse` types' `Block` filed has been deprecated and they now contains new field `sdk_block` with `proposer_address` as `string` ### State Machine Breaking @@ -64,6 +64,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### API Breaking Changes +* (x/slashing) [#12581](https://github.com/cosmos/cosmos-sdk/pull/12581) Remove `x/slashing` legacy querier. +* (types) [\#12355](https://github.com/cosmos/cosmos-sdk/pull/12355) Remove the compile-time `types.DBbackend` variable. Removes usage of the same in server/util.go * (x/gov) [#12368](https://github.com/cosmos/cosmos-sdk/pull/12369) Gov keeper is now passed by reference instead of copy to make post-construction mutation of Hooks and Proposal Handlers possible at a framework level. * (simapp) [#12270](https://github.com/cosmos/cosmos-sdk/pull/12270) Remove `invCheckPeriod uint` attribute from `SimApp` struct as per migration of `x/crisis` to app wiring * (simapp) [#12334](https://github.com/cosmos/cosmos-sdk/pull/12334) Move `simapp.ConvertAddrsToValAddrs` and `simapp.CreateTestPubKeys ` to respectively `simtestutil.ConvertAddrsToValAddrs` and `simtestutil.CreateTestPubKeys` (`testutil/sims`) @@ -76,9 +78,13 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/distribution) [#12434](https://github.com/cosmos/cosmos-sdk/pull/12434) `x/distribution` module `SetParams` keeper method definition is now updated to return `error`. * (x/crisis) [#12445](https://github.com/cosmos/cosmos-sdk/pull/12445) `x/crisis` module `SetConstantFee` keeper method definition is now updated to return `error`. +### CLI Breaking Changes + +* (x/group) [#12551](https://github.com/cosmos/cosmos-sdk/pull/12551) read the decision policy from disk in group CLI commands. ### Bug Fixes +* [#12548](https://github.com/cosmos/cosmos-sdk/pull/12548) Prevent signing from wrong key while using multisig. * [#12416](https://github.com/cosmos/cosmos-sdk/pull/12416) Prevent zero gas transactions in the `DeductFeeDecorator` AnteHandler decorator. * (x/mint) [#12384](https://github.com/cosmos/cosmos-sdk/pull/12384) Ensure `GoalBonded` must be positive when performing `x/mint` parameter validation. * (x/auth) [#12261](https://github.com/cosmos/cosmos-sdk/pull/12261) Deprecate pagination in GetTxsEventRequest/Response in favor of page and limit to align with tendermint `SignClient.TxSearch` @@ -240,7 +246,7 @@ empty coins slice before it is used to create `banktype.MsgSend`. * [\#11797](https://github.com/cosmos/cosmos-sdk/pull/11797) Remove all RegisterRESTRoutes (previously deprecated) * [\#11089](https://github.com/cosmos/cosmos-sdk/pull/11089]) interacting with the node through `grpc.Dial` requires clients to pass a codec refer to [doc](docs/run-node/interact-node.md). -* [\#9594](https://github.com/cosmos/cosmos-sdk/pull/9594) Remove legacy REST API. Please see the [REST Endpoints Migration guide](https://docs.cosmos.network/master/migrations/rest.html) to migrate to the new REST endpoints. +* [\#9594](https://github.com/cosmos/cosmos-sdk/pull/9594) Remove legacy REST API. Please see the [REST Endpoints Migration guide](https://docs.cosmos.network/v0.45/migrations/rest.html) to migrate to the new REST endpoints. * [\#9995](https://github.com/cosmos/cosmos-sdk/pull/9995) Increased gas cost for creating proposals. * [\#11029](https://github.com/cosmos/cosmos-sdk/pull/11029) The deprecated Vote Option field is removed in gov v1beta2 and nil in v1beta1. Use Options instead. * [\#11013](https://github.com/cosmos/cosmos-sdk/pull/11013) The `tx gov submit-proposal` command has changed syntax to support the new Msg-based gov proposals. To access the old CLI command, please use `tx gov submit-legacy-proposal`. @@ -663,7 +669,7 @@ Security Release. No breaking changes related to 0.44.x. ### Client Breaking Changes -* [\#10041](https://github.com/cosmos/cosmos-sdk/pull/10041) Remove broadcast & encode legacy REST endpoints. Please see the [REST Endpoints Migration guide](https://docs.cosmos.network/master/migrations/rest.html) to migrate to the new REST endpoints. +* [\#10041](https://github.com/cosmos/cosmos-sdk/pull/10041) Remove broadcast & encode legacy REST endpoints. Please see the [REST Endpoints Migration guide](https://docs.cosmos.network/v0.45/migrations/rest.html) to migrate to the new REST endpoints. ## [v0.43.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.43.0) - 2021-08-10 diff --git a/LICENSE b/LICENSE index 1931c12a2b33..105133ecf593 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,3 @@ -Cosmos SDK -License: Apache2.0 - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -189,6 +186,7 @@ License: Apache2.0 same "printed page" as the copyright notice for easier identification within third-party archives. + Copyright Cosmos-SDK Authors Copyright 2016 All in Bits, Inc Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/api/cosmos/base/tendermint/v1beta1/query.pulsar.go b/api/cosmos/base/tendermint/v1beta1/query.pulsar.go deleted file mode 100644 index 053f5f9b5534..000000000000 --- a/api/cosmos/base/tendermint/v1beta1/query.pulsar.go +++ /dev/null @@ -1,11783 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package tendermintv1beta1 - -import ( - v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" - p2p "cosmossdk.io/api/tendermint/p2p" - types "cosmossdk.io/api/tendermint/types" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/gogo/protobuf/gogoproto" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_GetValidatorSetByHeightRequest protoreflect.MessageDescriptor - fd_GetValidatorSetByHeightRequest_height protoreflect.FieldDescriptor - fd_GetValidatorSetByHeightRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetValidatorSetByHeightRequest = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetValidatorSetByHeightRequest") - fd_GetValidatorSetByHeightRequest_height = md_GetValidatorSetByHeightRequest.Fields().ByName("height") - fd_GetValidatorSetByHeightRequest_pagination = md_GetValidatorSetByHeightRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_GetValidatorSetByHeightRequest)(nil) - -type fastReflection_GetValidatorSetByHeightRequest GetValidatorSetByHeightRequest - -func (x *GetValidatorSetByHeightRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetValidatorSetByHeightRequest)(x) -} - -func (x *GetValidatorSetByHeightRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetValidatorSetByHeightRequest_messageType fastReflection_GetValidatorSetByHeightRequest_messageType -var _ protoreflect.MessageType = fastReflection_GetValidatorSetByHeightRequest_messageType{} - -type fastReflection_GetValidatorSetByHeightRequest_messageType struct{} - -func (x fastReflection_GetValidatorSetByHeightRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetValidatorSetByHeightRequest)(nil) -} -func (x fastReflection_GetValidatorSetByHeightRequest_messageType) New() protoreflect.Message { - return new(fastReflection_GetValidatorSetByHeightRequest) -} -func (x fastReflection_GetValidatorSetByHeightRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetValidatorSetByHeightRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetValidatorSetByHeightRequest) Descriptor() protoreflect.MessageDescriptor { - return md_GetValidatorSetByHeightRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GetValidatorSetByHeightRequest) Type() protoreflect.MessageType { - return _fastReflection_GetValidatorSetByHeightRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetValidatorSetByHeightRequest) New() protoreflect.Message { - return new(fastReflection_GetValidatorSetByHeightRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetValidatorSetByHeightRequest) Interface() protoreflect.ProtoMessage { - return (*GetValidatorSetByHeightRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GetValidatorSetByHeightRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_GetValidatorSetByHeightRequest_height, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_GetValidatorSetByHeightRequest_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GetValidatorSetByHeightRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.height": - return x.Height != int64(0) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetValidatorSetByHeightRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.height": - x.Height = int64(0) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GetValidatorSetByHeightRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetValidatorSetByHeightRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.height": - x.Height = value.Int() - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetValidatorSetByHeightRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.height": - panic(fmt.Errorf("field height of message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GetValidatorSetByHeightRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.height": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GetValidatorSetByHeightRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GetValidatorSetByHeightRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetValidatorSetByHeightRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GetValidatorSetByHeightRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GetValidatorSetByHeightRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetValidatorSetByHeightRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GetValidatorSetByHeightRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetValidatorSetByHeightRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetValidatorSetByHeightRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetValidatorSetByHeightRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_GetValidatorSetByHeightResponse_2_list)(nil) - -type _GetValidatorSetByHeightResponse_2_list struct { - list *[]*Validator -} - -func (x *_GetValidatorSetByHeightResponse_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GetValidatorSetByHeightResponse_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GetValidatorSetByHeightResponse_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - (*x.list)[i] = concreteValue -} - -func (x *_GetValidatorSetByHeightResponse_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GetValidatorSetByHeightResponse_2_list) AppendMutable() protoreflect.Value { - v := new(Validator) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GetValidatorSetByHeightResponse_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GetValidatorSetByHeightResponse_2_list) NewElement() protoreflect.Value { - v := new(Validator) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GetValidatorSetByHeightResponse_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GetValidatorSetByHeightResponse protoreflect.MessageDescriptor - fd_GetValidatorSetByHeightResponse_block_height protoreflect.FieldDescriptor - fd_GetValidatorSetByHeightResponse_validators protoreflect.FieldDescriptor - fd_GetValidatorSetByHeightResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetValidatorSetByHeightResponse = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetValidatorSetByHeightResponse") - fd_GetValidatorSetByHeightResponse_block_height = md_GetValidatorSetByHeightResponse.Fields().ByName("block_height") - fd_GetValidatorSetByHeightResponse_validators = md_GetValidatorSetByHeightResponse.Fields().ByName("validators") - fd_GetValidatorSetByHeightResponse_pagination = md_GetValidatorSetByHeightResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_GetValidatorSetByHeightResponse)(nil) - -type fastReflection_GetValidatorSetByHeightResponse GetValidatorSetByHeightResponse - -func (x *GetValidatorSetByHeightResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetValidatorSetByHeightResponse)(x) -} - -func (x *GetValidatorSetByHeightResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetValidatorSetByHeightResponse_messageType fastReflection_GetValidatorSetByHeightResponse_messageType -var _ protoreflect.MessageType = fastReflection_GetValidatorSetByHeightResponse_messageType{} - -type fastReflection_GetValidatorSetByHeightResponse_messageType struct{} - -func (x fastReflection_GetValidatorSetByHeightResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetValidatorSetByHeightResponse)(nil) -} -func (x fastReflection_GetValidatorSetByHeightResponse_messageType) New() protoreflect.Message { - return new(fastReflection_GetValidatorSetByHeightResponse) -} -func (x fastReflection_GetValidatorSetByHeightResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetValidatorSetByHeightResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetValidatorSetByHeightResponse) Descriptor() protoreflect.MessageDescriptor { - return md_GetValidatorSetByHeightResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GetValidatorSetByHeightResponse) Type() protoreflect.MessageType { - return _fastReflection_GetValidatorSetByHeightResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetValidatorSetByHeightResponse) New() protoreflect.Message { - return new(fastReflection_GetValidatorSetByHeightResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetValidatorSetByHeightResponse) Interface() protoreflect.ProtoMessage { - return (*GetValidatorSetByHeightResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GetValidatorSetByHeightResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BlockHeight != int64(0) { - value := protoreflect.ValueOfInt64(x.BlockHeight) - if !f(fd_GetValidatorSetByHeightResponse_block_height, value) { - return - } - } - if len(x.Validators) != 0 { - value := protoreflect.ValueOfList(&_GetValidatorSetByHeightResponse_2_list{list: &x.Validators}) - if !f(fd_GetValidatorSetByHeightResponse_validators, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_GetValidatorSetByHeightResponse_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GetValidatorSetByHeightResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.block_height": - return x.BlockHeight != int64(0) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.validators": - return len(x.Validators) != 0 - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetValidatorSetByHeightResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.block_height": - x.BlockHeight = int64(0) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.validators": - x.Validators = nil - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GetValidatorSetByHeightResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.block_height": - value := x.BlockHeight - return protoreflect.ValueOfInt64(value) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.validators": - if len(x.Validators) == 0 { - return protoreflect.ValueOfList(&_GetValidatorSetByHeightResponse_2_list{}) - } - listValue := &_GetValidatorSetByHeightResponse_2_list{list: &x.Validators} - return protoreflect.ValueOfList(listValue) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetValidatorSetByHeightResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.block_height": - x.BlockHeight = value.Int() - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.validators": - lv := value.List() - clv := lv.(*_GetValidatorSetByHeightResponse_2_list) - x.Validators = *clv.list - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetValidatorSetByHeightResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.validators": - if x.Validators == nil { - x.Validators = []*Validator{} - } - value := &_GetValidatorSetByHeightResponse_2_list{list: &x.Validators} - return protoreflect.ValueOfList(value) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.block_height": - panic(fmt.Errorf("field block_height of message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GetValidatorSetByHeightResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.block_height": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.validators": - list := []*Validator{} - return protoreflect.ValueOfList(&_GetValidatorSetByHeightResponse_2_list{list: &list}) - case "cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GetValidatorSetByHeightResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GetValidatorSetByHeightResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetValidatorSetByHeightResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GetValidatorSetByHeightResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GetValidatorSetByHeightResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetValidatorSetByHeightResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.BlockHeight != 0 { - n += 1 + runtime.Sov(uint64(x.BlockHeight)) - } - if len(x.Validators) > 0 { - for _, e := range x.Validators { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GetValidatorSetByHeightResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.Validators) > 0 { - for iNdEx := len(x.Validators) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Validators[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.BlockHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetValidatorSetByHeightResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetValidatorSetByHeightResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetValidatorSetByHeightResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - x.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Validators = append(x.Validators, &Validator{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validators[len(x.Validators)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_GetLatestValidatorSetRequest protoreflect.MessageDescriptor - fd_GetLatestValidatorSetRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetLatestValidatorSetRequest = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetLatestValidatorSetRequest") - fd_GetLatestValidatorSetRequest_pagination = md_GetLatestValidatorSetRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_GetLatestValidatorSetRequest)(nil) - -type fastReflection_GetLatestValidatorSetRequest GetLatestValidatorSetRequest - -func (x *GetLatestValidatorSetRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetLatestValidatorSetRequest)(x) -} - -func (x *GetLatestValidatorSetRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetLatestValidatorSetRequest_messageType fastReflection_GetLatestValidatorSetRequest_messageType -var _ protoreflect.MessageType = fastReflection_GetLatestValidatorSetRequest_messageType{} - -type fastReflection_GetLatestValidatorSetRequest_messageType struct{} - -func (x fastReflection_GetLatestValidatorSetRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetLatestValidatorSetRequest)(nil) -} -func (x fastReflection_GetLatestValidatorSetRequest_messageType) New() protoreflect.Message { - return new(fastReflection_GetLatestValidatorSetRequest) -} -func (x fastReflection_GetLatestValidatorSetRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetLatestValidatorSetRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetLatestValidatorSetRequest) Descriptor() protoreflect.MessageDescriptor { - return md_GetLatestValidatorSetRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GetLatestValidatorSetRequest) Type() protoreflect.MessageType { - return _fastReflection_GetLatestValidatorSetRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetLatestValidatorSetRequest) New() protoreflect.Message { - return new(fastReflection_GetLatestValidatorSetRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetLatestValidatorSetRequest) Interface() protoreflect.ProtoMessage { - return (*GetLatestValidatorSetRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GetLatestValidatorSetRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_GetLatestValidatorSetRequest_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GetLatestValidatorSetRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetLatestValidatorSetRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GetLatestValidatorSetRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetLatestValidatorSetRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetLatestValidatorSetRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GetLatestValidatorSetRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GetLatestValidatorSetRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GetLatestValidatorSetRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetLatestValidatorSetRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GetLatestValidatorSetRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GetLatestValidatorSetRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetLatestValidatorSetRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GetLatestValidatorSetRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetLatestValidatorSetRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetLatestValidatorSetRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetLatestValidatorSetRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_GetLatestValidatorSetResponse_2_list)(nil) - -type _GetLatestValidatorSetResponse_2_list struct { - list *[]*Validator -} - -func (x *_GetLatestValidatorSetResponse_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GetLatestValidatorSetResponse_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GetLatestValidatorSetResponse_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - (*x.list)[i] = concreteValue -} - -func (x *_GetLatestValidatorSetResponse_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GetLatestValidatorSetResponse_2_list) AppendMutable() protoreflect.Value { - v := new(Validator) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GetLatestValidatorSetResponse_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GetLatestValidatorSetResponse_2_list) NewElement() protoreflect.Value { - v := new(Validator) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GetLatestValidatorSetResponse_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GetLatestValidatorSetResponse protoreflect.MessageDescriptor - fd_GetLatestValidatorSetResponse_block_height protoreflect.FieldDescriptor - fd_GetLatestValidatorSetResponse_validators protoreflect.FieldDescriptor - fd_GetLatestValidatorSetResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetLatestValidatorSetResponse = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetLatestValidatorSetResponse") - fd_GetLatestValidatorSetResponse_block_height = md_GetLatestValidatorSetResponse.Fields().ByName("block_height") - fd_GetLatestValidatorSetResponse_validators = md_GetLatestValidatorSetResponse.Fields().ByName("validators") - fd_GetLatestValidatorSetResponse_pagination = md_GetLatestValidatorSetResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_GetLatestValidatorSetResponse)(nil) - -type fastReflection_GetLatestValidatorSetResponse GetLatestValidatorSetResponse - -func (x *GetLatestValidatorSetResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetLatestValidatorSetResponse)(x) -} - -func (x *GetLatestValidatorSetResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetLatestValidatorSetResponse_messageType fastReflection_GetLatestValidatorSetResponse_messageType -var _ protoreflect.MessageType = fastReflection_GetLatestValidatorSetResponse_messageType{} - -type fastReflection_GetLatestValidatorSetResponse_messageType struct{} - -func (x fastReflection_GetLatestValidatorSetResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetLatestValidatorSetResponse)(nil) -} -func (x fastReflection_GetLatestValidatorSetResponse_messageType) New() protoreflect.Message { - return new(fastReflection_GetLatestValidatorSetResponse) -} -func (x fastReflection_GetLatestValidatorSetResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetLatestValidatorSetResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetLatestValidatorSetResponse) Descriptor() protoreflect.MessageDescriptor { - return md_GetLatestValidatorSetResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GetLatestValidatorSetResponse) Type() protoreflect.MessageType { - return _fastReflection_GetLatestValidatorSetResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetLatestValidatorSetResponse) New() protoreflect.Message { - return new(fastReflection_GetLatestValidatorSetResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetLatestValidatorSetResponse) Interface() protoreflect.ProtoMessage { - return (*GetLatestValidatorSetResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GetLatestValidatorSetResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BlockHeight != int64(0) { - value := protoreflect.ValueOfInt64(x.BlockHeight) - if !f(fd_GetLatestValidatorSetResponse_block_height, value) { - return - } - } - if len(x.Validators) != 0 { - value := protoreflect.ValueOfList(&_GetLatestValidatorSetResponse_2_list{list: &x.Validators}) - if !f(fd_GetLatestValidatorSetResponse_validators, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_GetLatestValidatorSetResponse_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GetLatestValidatorSetResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.block_height": - return x.BlockHeight != int64(0) - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.validators": - return len(x.Validators) != 0 - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetLatestValidatorSetResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.block_height": - x.BlockHeight = int64(0) - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.validators": - x.Validators = nil - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GetLatestValidatorSetResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.block_height": - value := x.BlockHeight - return protoreflect.ValueOfInt64(value) - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.validators": - if len(x.Validators) == 0 { - return protoreflect.ValueOfList(&_GetLatestValidatorSetResponse_2_list{}) - } - listValue := &_GetLatestValidatorSetResponse_2_list{list: &x.Validators} - return protoreflect.ValueOfList(listValue) - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetLatestValidatorSetResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.block_height": - x.BlockHeight = value.Int() - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.validators": - lv := value.List() - clv := lv.(*_GetLatestValidatorSetResponse_2_list) - x.Validators = *clv.list - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetLatestValidatorSetResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.validators": - if x.Validators == nil { - x.Validators = []*Validator{} - } - value := &_GetLatestValidatorSetResponse_2_list{list: &x.Validators} - return protoreflect.ValueOfList(value) - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.block_height": - panic(fmt.Errorf("field block_height of message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GetLatestValidatorSetResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.block_height": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.validators": - list := []*Validator{} - return protoreflect.ValueOfList(&_GetLatestValidatorSetResponse_2_list{list: &list}) - case "cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GetLatestValidatorSetResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GetLatestValidatorSetResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetLatestValidatorSetResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GetLatestValidatorSetResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GetLatestValidatorSetResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetLatestValidatorSetResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.BlockHeight != 0 { - n += 1 + runtime.Sov(uint64(x.BlockHeight)) - } - if len(x.Validators) > 0 { - for _, e := range x.Validators { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GetLatestValidatorSetResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.Validators) > 0 { - for iNdEx := len(x.Validators) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Validators[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.BlockHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetLatestValidatorSetResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetLatestValidatorSetResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetLatestValidatorSetResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - x.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Validators = append(x.Validators, &Validator{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validators[len(x.Validators)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Validator protoreflect.MessageDescriptor - fd_Validator_address protoreflect.FieldDescriptor - fd_Validator_pub_key protoreflect.FieldDescriptor - fd_Validator_voting_power protoreflect.FieldDescriptor - fd_Validator_proposer_priority protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_Validator = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("Validator") - fd_Validator_address = md_Validator.Fields().ByName("address") - fd_Validator_pub_key = md_Validator.Fields().ByName("pub_key") - fd_Validator_voting_power = md_Validator.Fields().ByName("voting_power") - fd_Validator_proposer_priority = md_Validator.Fields().ByName("proposer_priority") -} - -var _ protoreflect.Message = (*fastReflection_Validator)(nil) - -type fastReflection_Validator Validator - -func (x *Validator) ProtoReflect() protoreflect.Message { - return (*fastReflection_Validator)(x) -} - -func (x *Validator) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Validator_messageType fastReflection_Validator_messageType -var _ protoreflect.MessageType = fastReflection_Validator_messageType{} - -type fastReflection_Validator_messageType struct{} - -func (x fastReflection_Validator_messageType) Zero() protoreflect.Message { - return (*fastReflection_Validator)(nil) -} -func (x fastReflection_Validator_messageType) New() protoreflect.Message { - return new(fastReflection_Validator) -} -func (x fastReflection_Validator_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Validator -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Validator) Descriptor() protoreflect.MessageDescriptor { - return md_Validator -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Validator) Type() protoreflect.MessageType { - return _fastReflection_Validator_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Validator) New() protoreflect.Message { - return new(fastReflection_Validator) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Validator) Interface() protoreflect.ProtoMessage { - return (*Validator)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Validator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_Validator_address, value) { - return - } - } - if x.PubKey != nil { - value := protoreflect.ValueOfMessage(x.PubKey.ProtoReflect()) - if !f(fd_Validator_pub_key, value) { - return - } - } - if x.VotingPower != int64(0) { - value := protoreflect.ValueOfInt64(x.VotingPower) - if !f(fd_Validator_voting_power, value) { - return - } - } - if x.ProposerPriority != int64(0) { - value := protoreflect.ValueOfInt64(x.ProposerPriority) - if !f(fd_Validator_proposer_priority, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Validator) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.Validator.address": - return x.Address != "" - case "cosmos.base.tendermint.v1beta1.Validator.pub_key": - return x.PubKey != nil - case "cosmos.base.tendermint.v1beta1.Validator.voting_power": - return x.VotingPower != int64(0) - case "cosmos.base.tendermint.v1beta1.Validator.proposer_priority": - return x.ProposerPriority != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Validator")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Validator does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Validator) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.Validator.address": - x.Address = "" - case "cosmos.base.tendermint.v1beta1.Validator.pub_key": - x.PubKey = nil - case "cosmos.base.tendermint.v1beta1.Validator.voting_power": - x.VotingPower = int64(0) - case "cosmos.base.tendermint.v1beta1.Validator.proposer_priority": - x.ProposerPriority = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Validator")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Validator does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Validator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.Validator.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.Validator.pub_key": - value := x.PubKey - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.Validator.voting_power": - value := x.VotingPower - return protoreflect.ValueOfInt64(value) - case "cosmos.base.tendermint.v1beta1.Validator.proposer_priority": - value := x.ProposerPriority - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Validator")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Validator does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Validator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.Validator.address": - x.Address = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.Validator.pub_key": - x.PubKey = value.Message().Interface().(*anypb.Any) - case "cosmos.base.tendermint.v1beta1.Validator.voting_power": - x.VotingPower = value.Int() - case "cosmos.base.tendermint.v1beta1.Validator.proposer_priority": - x.ProposerPriority = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Validator")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Validator does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Validator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.Validator.pub_key": - if x.PubKey == nil { - x.PubKey = new(anypb.Any) - } - return protoreflect.ValueOfMessage(x.PubKey.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.Validator.address": - panic(fmt.Errorf("field address of message cosmos.base.tendermint.v1beta1.Validator is not mutable")) - case "cosmos.base.tendermint.v1beta1.Validator.voting_power": - panic(fmt.Errorf("field voting_power of message cosmos.base.tendermint.v1beta1.Validator is not mutable")) - case "cosmos.base.tendermint.v1beta1.Validator.proposer_priority": - panic(fmt.Errorf("field proposer_priority of message cosmos.base.tendermint.v1beta1.Validator is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Validator")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Validator does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Validator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.Validator.address": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.Validator.pub_key": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.Validator.voting_power": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.base.tendermint.v1beta1.Validator.proposer_priority": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Validator")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Validator does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Validator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.Validator", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Validator) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Validator) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Validator) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Validator) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Validator) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.PubKey != nil { - l = options.Size(x.PubKey) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.VotingPower != 0 { - n += 1 + runtime.Sov(uint64(x.VotingPower)) - } - if x.ProposerPriority != 0 { - n += 1 + runtime.Sov(uint64(x.ProposerPriority)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Validator) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.ProposerPriority != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposerPriority)) - i-- - dAtA[i] = 0x20 - } - if x.VotingPower != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.VotingPower)) - i-- - dAtA[i] = 0x18 - } - if x.PubKey != nil { - encoded, err := options.Marshal(x.PubKey) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Validator) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Validator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.PubKey == nil { - x.PubKey = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PubKey); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VotingPower", wireType) - } - x.VotingPower = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.VotingPower |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposerPriority", wireType) - } - x.ProposerPriority = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ProposerPriority |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_GetBlockByHeightRequest protoreflect.MessageDescriptor - fd_GetBlockByHeightRequest_height protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetBlockByHeightRequest = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetBlockByHeightRequest") - fd_GetBlockByHeightRequest_height = md_GetBlockByHeightRequest.Fields().ByName("height") -} - -var _ protoreflect.Message = (*fastReflection_GetBlockByHeightRequest)(nil) - -type fastReflection_GetBlockByHeightRequest GetBlockByHeightRequest - -func (x *GetBlockByHeightRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetBlockByHeightRequest)(x) -} - -func (x *GetBlockByHeightRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetBlockByHeightRequest_messageType fastReflection_GetBlockByHeightRequest_messageType -var _ protoreflect.MessageType = fastReflection_GetBlockByHeightRequest_messageType{} - -type fastReflection_GetBlockByHeightRequest_messageType struct{} - -func (x fastReflection_GetBlockByHeightRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetBlockByHeightRequest)(nil) -} -func (x fastReflection_GetBlockByHeightRequest_messageType) New() protoreflect.Message { - return new(fastReflection_GetBlockByHeightRequest) -} -func (x fastReflection_GetBlockByHeightRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetBlockByHeightRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetBlockByHeightRequest) Descriptor() protoreflect.MessageDescriptor { - return md_GetBlockByHeightRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GetBlockByHeightRequest) Type() protoreflect.MessageType { - return _fastReflection_GetBlockByHeightRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetBlockByHeightRequest) New() protoreflect.Message { - return new(fastReflection_GetBlockByHeightRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetBlockByHeightRequest) Interface() protoreflect.ProtoMessage { - return (*GetBlockByHeightRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GetBlockByHeightRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_GetBlockByHeightRequest_height, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GetBlockByHeightRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest.height": - return x.Height != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetBlockByHeightRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest.height": - x.Height = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GetBlockByHeightRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetBlockByHeightRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest.height": - x.Height = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetBlockByHeightRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest.height": - panic(fmt.Errorf("field height of message cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GetBlockByHeightRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest.height": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GetBlockByHeightRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GetBlockByHeightRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetBlockByHeightRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GetBlockByHeightRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GetBlockByHeightRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetBlockByHeightRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GetBlockByHeightRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetBlockByHeightRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetBlockByHeightRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetBlockByHeightRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_GetBlockByHeightResponse protoreflect.MessageDescriptor - fd_GetBlockByHeightResponse_block_id protoreflect.FieldDescriptor - fd_GetBlockByHeightResponse_block protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetBlockByHeightResponse = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetBlockByHeightResponse") - fd_GetBlockByHeightResponse_block_id = md_GetBlockByHeightResponse.Fields().ByName("block_id") - fd_GetBlockByHeightResponse_block = md_GetBlockByHeightResponse.Fields().ByName("block") -} - -var _ protoreflect.Message = (*fastReflection_GetBlockByHeightResponse)(nil) - -type fastReflection_GetBlockByHeightResponse GetBlockByHeightResponse - -func (x *GetBlockByHeightResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetBlockByHeightResponse)(x) -} - -func (x *GetBlockByHeightResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetBlockByHeightResponse_messageType fastReflection_GetBlockByHeightResponse_messageType -var _ protoreflect.MessageType = fastReflection_GetBlockByHeightResponse_messageType{} - -type fastReflection_GetBlockByHeightResponse_messageType struct{} - -func (x fastReflection_GetBlockByHeightResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetBlockByHeightResponse)(nil) -} -func (x fastReflection_GetBlockByHeightResponse_messageType) New() protoreflect.Message { - return new(fastReflection_GetBlockByHeightResponse) -} -func (x fastReflection_GetBlockByHeightResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetBlockByHeightResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetBlockByHeightResponse) Descriptor() protoreflect.MessageDescriptor { - return md_GetBlockByHeightResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GetBlockByHeightResponse) Type() protoreflect.MessageType { - return _fastReflection_GetBlockByHeightResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetBlockByHeightResponse) New() protoreflect.Message { - return new(fastReflection_GetBlockByHeightResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetBlockByHeightResponse) Interface() protoreflect.ProtoMessage { - return (*GetBlockByHeightResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GetBlockByHeightResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BlockId != nil { - value := protoreflect.ValueOfMessage(x.BlockId.ProtoReflect()) - if !f(fd_GetBlockByHeightResponse_block_id, value) { - return - } - } - if x.Block != nil { - value := protoreflect.ValueOfMessage(x.Block.ProtoReflect()) - if !f(fd_GetBlockByHeightResponse_block, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GetBlockByHeightResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block_id": - return x.BlockId != nil - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block": - return x.Block != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetBlockByHeightResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block_id": - x.BlockId = nil - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block": - x.Block = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GetBlockByHeightResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block_id": - value := x.BlockId - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block": - value := x.Block - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetBlockByHeightResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block_id": - x.BlockId = value.Message().Interface().(*types.BlockID) - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block": - x.Block = value.Message().Interface().(*types.Block) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetBlockByHeightResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block_id": - if x.BlockId == nil { - x.BlockId = new(types.BlockID) - } - return protoreflect.ValueOfMessage(x.BlockId.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block": - if x.Block == nil { - x.Block = new(types.Block) - } - return protoreflect.ValueOfMessage(x.Block.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GetBlockByHeightResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block_id": - m := new(types.BlockID) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block": - m := new(types.Block) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GetBlockByHeightResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GetBlockByHeightResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetBlockByHeightResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GetBlockByHeightResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GetBlockByHeightResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetBlockByHeightResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.BlockId != nil { - l = options.Size(x.BlockId) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Block != nil { - l = options.Size(x.Block) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GetBlockByHeightResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Block != nil { - encoded, err := options.Marshal(x.Block) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.BlockId != nil { - encoded, err := options.Marshal(x.BlockId) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetBlockByHeightResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetBlockByHeightResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetBlockByHeightResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.BlockId == nil { - x.BlockId = &types.BlockID{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BlockId); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Block == nil { - x.Block = &types.Block{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Block); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_GetLatestBlockRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetLatestBlockRequest = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetLatestBlockRequest") -} - -var _ protoreflect.Message = (*fastReflection_GetLatestBlockRequest)(nil) - -type fastReflection_GetLatestBlockRequest GetLatestBlockRequest - -func (x *GetLatestBlockRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetLatestBlockRequest)(x) -} - -func (x *GetLatestBlockRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetLatestBlockRequest_messageType fastReflection_GetLatestBlockRequest_messageType -var _ protoreflect.MessageType = fastReflection_GetLatestBlockRequest_messageType{} - -type fastReflection_GetLatestBlockRequest_messageType struct{} - -func (x fastReflection_GetLatestBlockRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetLatestBlockRequest)(nil) -} -func (x fastReflection_GetLatestBlockRequest_messageType) New() protoreflect.Message { - return new(fastReflection_GetLatestBlockRequest) -} -func (x fastReflection_GetLatestBlockRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetLatestBlockRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetLatestBlockRequest) Descriptor() protoreflect.MessageDescriptor { - return md_GetLatestBlockRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GetLatestBlockRequest) Type() protoreflect.MessageType { - return _fastReflection_GetLatestBlockRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetLatestBlockRequest) New() protoreflect.Message { - return new(fastReflection_GetLatestBlockRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetLatestBlockRequest) Interface() protoreflect.ProtoMessage { - return (*GetLatestBlockRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GetLatestBlockRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GetLatestBlockRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetLatestBlockRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GetLatestBlockRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetLatestBlockRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetLatestBlockRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GetLatestBlockRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GetLatestBlockRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetLatestBlockRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GetLatestBlockRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetLatestBlockRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GetLatestBlockRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GetLatestBlockRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetLatestBlockRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GetLatestBlockRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetLatestBlockRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetLatestBlockRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetLatestBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_GetLatestBlockResponse protoreflect.MessageDescriptor - fd_GetLatestBlockResponse_block_id protoreflect.FieldDescriptor - fd_GetLatestBlockResponse_block protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetLatestBlockResponse = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetLatestBlockResponse") - fd_GetLatestBlockResponse_block_id = md_GetLatestBlockResponse.Fields().ByName("block_id") - fd_GetLatestBlockResponse_block = md_GetLatestBlockResponse.Fields().ByName("block") -} - -var _ protoreflect.Message = (*fastReflection_GetLatestBlockResponse)(nil) - -type fastReflection_GetLatestBlockResponse GetLatestBlockResponse - -func (x *GetLatestBlockResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetLatestBlockResponse)(x) -} - -func (x *GetLatestBlockResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetLatestBlockResponse_messageType fastReflection_GetLatestBlockResponse_messageType -var _ protoreflect.MessageType = fastReflection_GetLatestBlockResponse_messageType{} - -type fastReflection_GetLatestBlockResponse_messageType struct{} - -func (x fastReflection_GetLatestBlockResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetLatestBlockResponse)(nil) -} -func (x fastReflection_GetLatestBlockResponse_messageType) New() protoreflect.Message { - return new(fastReflection_GetLatestBlockResponse) -} -func (x fastReflection_GetLatestBlockResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetLatestBlockResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetLatestBlockResponse) Descriptor() protoreflect.MessageDescriptor { - return md_GetLatestBlockResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GetLatestBlockResponse) Type() protoreflect.MessageType { - return _fastReflection_GetLatestBlockResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetLatestBlockResponse) New() protoreflect.Message { - return new(fastReflection_GetLatestBlockResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetLatestBlockResponse) Interface() protoreflect.ProtoMessage { - return (*GetLatestBlockResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GetLatestBlockResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BlockId != nil { - value := protoreflect.ValueOfMessage(x.BlockId.ProtoReflect()) - if !f(fd_GetLatestBlockResponse_block_id, value) { - return - } - } - if x.Block != nil { - value := protoreflect.ValueOfMessage(x.Block.ProtoReflect()) - if !f(fd_GetLatestBlockResponse_block, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GetLatestBlockResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block_id": - return x.BlockId != nil - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block": - return x.Block != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetLatestBlockResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block_id": - x.BlockId = nil - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block": - x.Block = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GetLatestBlockResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block_id": - value := x.BlockId - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block": - value := x.Block - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetLatestBlockResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block_id": - x.BlockId = value.Message().Interface().(*types.BlockID) - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block": - x.Block = value.Message().Interface().(*types.Block) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetLatestBlockResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block_id": - if x.BlockId == nil { - x.BlockId = new(types.BlockID) - } - return protoreflect.ValueOfMessage(x.BlockId.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block": - if x.Block == nil { - x.Block = new(types.Block) - } - return protoreflect.ValueOfMessage(x.Block.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GetLatestBlockResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block_id": - m := new(types.BlockID) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block": - m := new(types.Block) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetLatestBlockResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetLatestBlockResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GetLatestBlockResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetLatestBlockResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GetLatestBlockResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetLatestBlockResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GetLatestBlockResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GetLatestBlockResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetLatestBlockResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.BlockId != nil { - l = options.Size(x.BlockId) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Block != nil { - l = options.Size(x.Block) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GetLatestBlockResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Block != nil { - encoded, err := options.Marshal(x.Block) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.BlockId != nil { - encoded, err := options.Marshal(x.BlockId) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetLatestBlockResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetLatestBlockResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetLatestBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.BlockId == nil { - x.BlockId = &types.BlockID{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BlockId); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Block == nil { - x.Block = &types.Block{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Block); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_GetSyncingRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetSyncingRequest = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetSyncingRequest") -} - -var _ protoreflect.Message = (*fastReflection_GetSyncingRequest)(nil) - -type fastReflection_GetSyncingRequest GetSyncingRequest - -func (x *GetSyncingRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetSyncingRequest)(x) -} - -func (x *GetSyncingRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetSyncingRequest_messageType fastReflection_GetSyncingRequest_messageType -var _ protoreflect.MessageType = fastReflection_GetSyncingRequest_messageType{} - -type fastReflection_GetSyncingRequest_messageType struct{} - -func (x fastReflection_GetSyncingRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetSyncingRequest)(nil) -} -func (x fastReflection_GetSyncingRequest_messageType) New() protoreflect.Message { - return new(fastReflection_GetSyncingRequest) -} -func (x fastReflection_GetSyncingRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetSyncingRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetSyncingRequest) Descriptor() protoreflect.MessageDescriptor { - return md_GetSyncingRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GetSyncingRequest) Type() protoreflect.MessageType { - return _fastReflection_GetSyncingRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetSyncingRequest) New() protoreflect.Message { - return new(fastReflection_GetSyncingRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetSyncingRequest) Interface() protoreflect.ProtoMessage { - return (*GetSyncingRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GetSyncingRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GetSyncingRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetSyncingRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GetSyncingRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetSyncingRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetSyncingRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GetSyncingRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GetSyncingRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetSyncingRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GetSyncingRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetSyncingRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GetSyncingRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GetSyncingRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetSyncingRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GetSyncingRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetSyncingRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetSyncingRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetSyncingRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_GetSyncingResponse protoreflect.MessageDescriptor - fd_GetSyncingResponse_syncing protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetSyncingResponse = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetSyncingResponse") - fd_GetSyncingResponse_syncing = md_GetSyncingResponse.Fields().ByName("syncing") -} - -var _ protoreflect.Message = (*fastReflection_GetSyncingResponse)(nil) - -type fastReflection_GetSyncingResponse GetSyncingResponse - -func (x *GetSyncingResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetSyncingResponse)(x) -} - -func (x *GetSyncingResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetSyncingResponse_messageType fastReflection_GetSyncingResponse_messageType -var _ protoreflect.MessageType = fastReflection_GetSyncingResponse_messageType{} - -type fastReflection_GetSyncingResponse_messageType struct{} - -func (x fastReflection_GetSyncingResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetSyncingResponse)(nil) -} -func (x fastReflection_GetSyncingResponse_messageType) New() protoreflect.Message { - return new(fastReflection_GetSyncingResponse) -} -func (x fastReflection_GetSyncingResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetSyncingResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetSyncingResponse) Descriptor() protoreflect.MessageDescriptor { - return md_GetSyncingResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GetSyncingResponse) Type() protoreflect.MessageType { - return _fastReflection_GetSyncingResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetSyncingResponse) New() protoreflect.Message { - return new(fastReflection_GetSyncingResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetSyncingResponse) Interface() protoreflect.ProtoMessage { - return (*GetSyncingResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GetSyncingResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Syncing != false { - value := protoreflect.ValueOfBool(x.Syncing) - if !f(fd_GetSyncingResponse_syncing, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GetSyncingResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetSyncingResponse.syncing": - return x.Syncing != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetSyncingResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetSyncingResponse.syncing": - x.Syncing = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GetSyncingResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.GetSyncingResponse.syncing": - value := x.Syncing - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetSyncingResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetSyncingResponse.syncing": - x.Syncing = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetSyncingResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetSyncingResponse.syncing": - panic(fmt.Errorf("field syncing of message cosmos.base.tendermint.v1beta1.GetSyncingResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GetSyncingResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetSyncingResponse.syncing": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetSyncingResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetSyncingResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GetSyncingResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetSyncingResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GetSyncingResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetSyncingResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GetSyncingResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GetSyncingResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetSyncingResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Syncing { - n += 2 - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GetSyncingResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Syncing { - i-- - if x.Syncing { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetSyncingResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetSyncingResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetSyncingResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Syncing", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Syncing = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_GetNodeInfoRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetNodeInfoRequest = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetNodeInfoRequest") -} - -var _ protoreflect.Message = (*fastReflection_GetNodeInfoRequest)(nil) - -type fastReflection_GetNodeInfoRequest GetNodeInfoRequest - -func (x *GetNodeInfoRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetNodeInfoRequest)(x) -} - -func (x *GetNodeInfoRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetNodeInfoRequest_messageType fastReflection_GetNodeInfoRequest_messageType -var _ protoreflect.MessageType = fastReflection_GetNodeInfoRequest_messageType{} - -type fastReflection_GetNodeInfoRequest_messageType struct{} - -func (x fastReflection_GetNodeInfoRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetNodeInfoRequest)(nil) -} -func (x fastReflection_GetNodeInfoRequest_messageType) New() protoreflect.Message { - return new(fastReflection_GetNodeInfoRequest) -} -func (x fastReflection_GetNodeInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetNodeInfoRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetNodeInfoRequest) Descriptor() protoreflect.MessageDescriptor { - return md_GetNodeInfoRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GetNodeInfoRequest) Type() protoreflect.MessageType { - return _fastReflection_GetNodeInfoRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetNodeInfoRequest) New() protoreflect.Message { - return new(fastReflection_GetNodeInfoRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetNodeInfoRequest) Interface() protoreflect.ProtoMessage { - return (*GetNodeInfoRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GetNodeInfoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GetNodeInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetNodeInfoRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GetNodeInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetNodeInfoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetNodeInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GetNodeInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GetNodeInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetNodeInfoRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GetNodeInfoRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetNodeInfoRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GetNodeInfoRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GetNodeInfoRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetNodeInfoRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GetNodeInfoRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetNodeInfoRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetNodeInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetNodeInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_GetNodeInfoResponse protoreflect.MessageDescriptor - fd_GetNodeInfoResponse_node_info protoreflect.FieldDescriptor - fd_GetNodeInfoResponse_application_version protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_GetNodeInfoResponse = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("GetNodeInfoResponse") - fd_GetNodeInfoResponse_node_info = md_GetNodeInfoResponse.Fields().ByName("node_info") - fd_GetNodeInfoResponse_application_version = md_GetNodeInfoResponse.Fields().ByName("application_version") -} - -var _ protoreflect.Message = (*fastReflection_GetNodeInfoResponse)(nil) - -type fastReflection_GetNodeInfoResponse GetNodeInfoResponse - -func (x *GetNodeInfoResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_GetNodeInfoResponse)(x) -} - -func (x *GetNodeInfoResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GetNodeInfoResponse_messageType fastReflection_GetNodeInfoResponse_messageType -var _ protoreflect.MessageType = fastReflection_GetNodeInfoResponse_messageType{} - -type fastReflection_GetNodeInfoResponse_messageType struct{} - -func (x fastReflection_GetNodeInfoResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_GetNodeInfoResponse)(nil) -} -func (x fastReflection_GetNodeInfoResponse_messageType) New() protoreflect.Message { - return new(fastReflection_GetNodeInfoResponse) -} -func (x fastReflection_GetNodeInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GetNodeInfoResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GetNodeInfoResponse) Descriptor() protoreflect.MessageDescriptor { - return md_GetNodeInfoResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GetNodeInfoResponse) Type() protoreflect.MessageType { - return _fastReflection_GetNodeInfoResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GetNodeInfoResponse) New() protoreflect.Message { - return new(fastReflection_GetNodeInfoResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GetNodeInfoResponse) Interface() protoreflect.ProtoMessage { - return (*GetNodeInfoResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GetNodeInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.NodeInfo != nil { - value := protoreflect.ValueOfMessage(x.NodeInfo.ProtoReflect()) - if !f(fd_GetNodeInfoResponse_node_info, value) { - return - } - } - if x.ApplicationVersion != nil { - value := protoreflect.ValueOfMessage(x.ApplicationVersion.ProtoReflect()) - if !f(fd_GetNodeInfoResponse_application_version, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GetNodeInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.node_info": - return x.NodeInfo != nil - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.application_version": - return x.ApplicationVersion != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetNodeInfoResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.node_info": - x.NodeInfo = nil - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.application_version": - x.ApplicationVersion = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GetNodeInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.node_info": - value := x.NodeInfo - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.application_version": - value := x.ApplicationVersion - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetNodeInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.node_info": - x.NodeInfo = value.Message().Interface().(*p2p.NodeInfo) - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.application_version": - x.ApplicationVersion = value.Message().Interface().(*VersionInfo) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetNodeInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.node_info": - if x.NodeInfo == nil { - x.NodeInfo = new(p2p.NodeInfo) - } - return protoreflect.ValueOfMessage(x.NodeInfo.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.application_version": - if x.ApplicationVersion == nil { - x.ApplicationVersion = new(VersionInfo) - } - return protoreflect.ValueOfMessage(x.ApplicationVersion.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GetNodeInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.node_info": - m := new(p2p.NodeInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.application_version": - m := new(VersionInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.GetNodeInfoResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.GetNodeInfoResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GetNodeInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.GetNodeInfoResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GetNodeInfoResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GetNodeInfoResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GetNodeInfoResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GetNodeInfoResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GetNodeInfoResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.NodeInfo != nil { - l = options.Size(x.NodeInfo) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.ApplicationVersion != nil { - l = options.Size(x.ApplicationVersion) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GetNodeInfoResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.ApplicationVersion != nil { - encoded, err := options.Marshal(x.ApplicationVersion) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.NodeInfo != nil { - encoded, err := options.Marshal(x.NodeInfo) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GetNodeInfoResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetNodeInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetNodeInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NodeInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.NodeInfo == nil { - x.NodeInfo = &p2p.NodeInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.NodeInfo); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ApplicationVersion", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.ApplicationVersion == nil { - x.ApplicationVersion = &VersionInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ApplicationVersion); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_VersionInfo_7_list)(nil) - -type _VersionInfo_7_list struct { - list *[]*Module -} - -func (x *_VersionInfo_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_VersionInfo_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_VersionInfo_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Module) - (*x.list)[i] = concreteValue -} - -func (x *_VersionInfo_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Module) - *x.list = append(*x.list, concreteValue) -} - -func (x *_VersionInfo_7_list) AppendMutable() protoreflect.Value { - v := new(Module) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_VersionInfo_7_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_VersionInfo_7_list) NewElement() protoreflect.Value { - v := new(Module) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_VersionInfo_7_list) IsValid() bool { - return x.list != nil -} - -var ( - md_VersionInfo protoreflect.MessageDescriptor - fd_VersionInfo_name protoreflect.FieldDescriptor - fd_VersionInfo_app_name protoreflect.FieldDescriptor - fd_VersionInfo_version protoreflect.FieldDescriptor - fd_VersionInfo_git_commit protoreflect.FieldDescriptor - fd_VersionInfo_build_tags protoreflect.FieldDescriptor - fd_VersionInfo_go_version protoreflect.FieldDescriptor - fd_VersionInfo_build_deps protoreflect.FieldDescriptor - fd_VersionInfo_cosmos_sdk_version protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_VersionInfo = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("VersionInfo") - fd_VersionInfo_name = md_VersionInfo.Fields().ByName("name") - fd_VersionInfo_app_name = md_VersionInfo.Fields().ByName("app_name") - fd_VersionInfo_version = md_VersionInfo.Fields().ByName("version") - fd_VersionInfo_git_commit = md_VersionInfo.Fields().ByName("git_commit") - fd_VersionInfo_build_tags = md_VersionInfo.Fields().ByName("build_tags") - fd_VersionInfo_go_version = md_VersionInfo.Fields().ByName("go_version") - fd_VersionInfo_build_deps = md_VersionInfo.Fields().ByName("build_deps") - fd_VersionInfo_cosmos_sdk_version = md_VersionInfo.Fields().ByName("cosmos_sdk_version") -} - -var _ protoreflect.Message = (*fastReflection_VersionInfo)(nil) - -type fastReflection_VersionInfo VersionInfo - -func (x *VersionInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_VersionInfo)(x) -} - -func (x *VersionInfo) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_VersionInfo_messageType fastReflection_VersionInfo_messageType -var _ protoreflect.MessageType = fastReflection_VersionInfo_messageType{} - -type fastReflection_VersionInfo_messageType struct{} - -func (x fastReflection_VersionInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_VersionInfo)(nil) -} -func (x fastReflection_VersionInfo_messageType) New() protoreflect.Message { - return new(fastReflection_VersionInfo) -} -func (x fastReflection_VersionInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_VersionInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_VersionInfo) Descriptor() protoreflect.MessageDescriptor { - return md_VersionInfo -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_VersionInfo) Type() protoreflect.MessageType { - return _fastReflection_VersionInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_VersionInfo) New() protoreflect.Message { - return new(fastReflection_VersionInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_VersionInfo) Interface() protoreflect.ProtoMessage { - return (*VersionInfo)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_VersionInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_VersionInfo_name, value) { - return - } - } - if x.AppName != "" { - value := protoreflect.ValueOfString(x.AppName) - if !f(fd_VersionInfo_app_name, value) { - return - } - } - if x.Version != "" { - value := protoreflect.ValueOfString(x.Version) - if !f(fd_VersionInfo_version, value) { - return - } - } - if x.GitCommit != "" { - value := protoreflect.ValueOfString(x.GitCommit) - if !f(fd_VersionInfo_git_commit, value) { - return - } - } - if x.BuildTags != "" { - value := protoreflect.ValueOfString(x.BuildTags) - if !f(fd_VersionInfo_build_tags, value) { - return - } - } - if x.GoVersion != "" { - value := protoreflect.ValueOfString(x.GoVersion) - if !f(fd_VersionInfo_go_version, value) { - return - } - } - if len(x.BuildDeps) != 0 { - value := protoreflect.ValueOfList(&_VersionInfo_7_list{list: &x.BuildDeps}) - if !f(fd_VersionInfo_build_deps, value) { - return - } - } - if x.CosmosSdkVersion != "" { - value := protoreflect.ValueOfString(x.CosmosSdkVersion) - if !f(fd_VersionInfo_cosmos_sdk_version, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_VersionInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.VersionInfo.name": - return x.Name != "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.app_name": - return x.AppName != "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.version": - return x.Version != "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.git_commit": - return x.GitCommit != "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_tags": - return x.BuildTags != "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.go_version": - return x.GoVersion != "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_deps": - return len(x.BuildDeps) != 0 - case "cosmos.base.tendermint.v1beta1.VersionInfo.cosmos_sdk_version": - return x.CosmosSdkVersion != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.VersionInfo")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.VersionInfo does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_VersionInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.VersionInfo.name": - x.Name = "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.app_name": - x.AppName = "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.version": - x.Version = "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.git_commit": - x.GitCommit = "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_tags": - x.BuildTags = "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.go_version": - x.GoVersion = "" - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_deps": - x.BuildDeps = nil - case "cosmos.base.tendermint.v1beta1.VersionInfo.cosmos_sdk_version": - x.CosmosSdkVersion = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.VersionInfo")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.VersionInfo does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_VersionInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.VersionInfo.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.VersionInfo.app_name": - value := x.AppName - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.VersionInfo.version": - value := x.Version - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.VersionInfo.git_commit": - value := x.GitCommit - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_tags": - value := x.BuildTags - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.VersionInfo.go_version": - value := x.GoVersion - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_deps": - if len(x.BuildDeps) == 0 { - return protoreflect.ValueOfList(&_VersionInfo_7_list{}) - } - listValue := &_VersionInfo_7_list{list: &x.BuildDeps} - return protoreflect.ValueOfList(listValue) - case "cosmos.base.tendermint.v1beta1.VersionInfo.cosmos_sdk_version": - value := x.CosmosSdkVersion - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.VersionInfo")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.VersionInfo does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_VersionInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.VersionInfo.name": - x.Name = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.VersionInfo.app_name": - x.AppName = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.VersionInfo.version": - x.Version = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.VersionInfo.git_commit": - x.GitCommit = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_tags": - x.BuildTags = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.VersionInfo.go_version": - x.GoVersion = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_deps": - lv := value.List() - clv := lv.(*_VersionInfo_7_list) - x.BuildDeps = *clv.list - case "cosmos.base.tendermint.v1beta1.VersionInfo.cosmos_sdk_version": - x.CosmosSdkVersion = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.VersionInfo")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.VersionInfo does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_VersionInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_deps": - if x.BuildDeps == nil { - x.BuildDeps = []*Module{} - } - value := &_VersionInfo_7_list{list: &x.BuildDeps} - return protoreflect.ValueOfList(value) - case "cosmos.base.tendermint.v1beta1.VersionInfo.name": - panic(fmt.Errorf("field name of message cosmos.base.tendermint.v1beta1.VersionInfo is not mutable")) - case "cosmos.base.tendermint.v1beta1.VersionInfo.app_name": - panic(fmt.Errorf("field app_name of message cosmos.base.tendermint.v1beta1.VersionInfo is not mutable")) - case "cosmos.base.tendermint.v1beta1.VersionInfo.version": - panic(fmt.Errorf("field version of message cosmos.base.tendermint.v1beta1.VersionInfo is not mutable")) - case "cosmos.base.tendermint.v1beta1.VersionInfo.git_commit": - panic(fmt.Errorf("field git_commit of message cosmos.base.tendermint.v1beta1.VersionInfo is not mutable")) - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_tags": - panic(fmt.Errorf("field build_tags of message cosmos.base.tendermint.v1beta1.VersionInfo is not mutable")) - case "cosmos.base.tendermint.v1beta1.VersionInfo.go_version": - panic(fmt.Errorf("field go_version of message cosmos.base.tendermint.v1beta1.VersionInfo is not mutable")) - case "cosmos.base.tendermint.v1beta1.VersionInfo.cosmos_sdk_version": - panic(fmt.Errorf("field cosmos_sdk_version of message cosmos.base.tendermint.v1beta1.VersionInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.VersionInfo")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.VersionInfo does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_VersionInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.VersionInfo.name": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.VersionInfo.app_name": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.VersionInfo.version": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.VersionInfo.git_commit": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_tags": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.VersionInfo.go_version": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.VersionInfo.build_deps": - list := []*Module{} - return protoreflect.ValueOfList(&_VersionInfo_7_list{list: &list}) - case "cosmos.base.tendermint.v1beta1.VersionInfo.cosmos_sdk_version": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.VersionInfo")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.VersionInfo does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_VersionInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.VersionInfo", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_VersionInfo) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_VersionInfo) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_VersionInfo) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_VersionInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*VersionInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.AppName) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Version) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.GitCommit) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.BuildTags) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.GoVersion) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.BuildDeps) > 0 { - for _, e := range x.BuildDeps { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.CosmosSdkVersion) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*VersionInfo) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.CosmosSdkVersion) > 0 { - i -= len(x.CosmosSdkVersion) - copy(dAtA[i:], x.CosmosSdkVersion) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CosmosSdkVersion))) - i-- - dAtA[i] = 0x42 - } - if len(x.BuildDeps) > 0 { - for iNdEx := len(x.BuildDeps) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.BuildDeps[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - } - if len(x.GoVersion) > 0 { - i -= len(x.GoVersion) - copy(dAtA[i:], x.GoVersion) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GoVersion))) - i-- - dAtA[i] = 0x32 - } - if len(x.BuildTags) > 0 { - i -= len(x.BuildTags) - copy(dAtA[i:], x.BuildTags) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BuildTags))) - i-- - dAtA[i] = 0x2a - } - if len(x.GitCommit) > 0 { - i -= len(x.GitCommit) - copy(dAtA[i:], x.GitCommit) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GitCommit))) - i-- - dAtA[i] = 0x22 - } - if len(x.Version) > 0 { - i -= len(x.Version) - copy(dAtA[i:], x.Version) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Version))) - i-- - dAtA[i] = 0x1a - } - if len(x.AppName) > 0 { - i -= len(x.AppName) - copy(dAtA[i:], x.AppName) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AppName))) - i-- - dAtA[i] = 0x12 - } - if len(x.Name) > 0 { - i -= len(x.Name) - copy(dAtA[i:], x.Name) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*VersionInfo) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: VersionInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: VersionInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AppName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AppName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GitCommit", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.GitCommit = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BuildTags", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.BuildTags = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GoVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.GoVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BuildDeps", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.BuildDeps = append(x.BuildDeps, &Module{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BuildDeps[len(x.BuildDeps)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CosmosSdkVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CosmosSdkVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Module protoreflect.MessageDescriptor - fd_Module_path protoreflect.FieldDescriptor - fd_Module_version protoreflect.FieldDescriptor - fd_Module_sum protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_Module = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("Module") - fd_Module_path = md_Module.Fields().ByName("path") - fd_Module_version = md_Module.Fields().ByName("version") - fd_Module_sum = md_Module.Fields().ByName("sum") -} - -var _ protoreflect.Message = (*fastReflection_Module)(nil) - -type fastReflection_Module Module - -func (x *Module) ProtoReflect() protoreflect.Message { - return (*fastReflection_Module)(x) -} - -func (x *Module) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Module_messageType fastReflection_Module_messageType -var _ protoreflect.MessageType = fastReflection_Module_messageType{} - -type fastReflection_Module_messageType struct{} - -func (x fastReflection_Module_messageType) Zero() protoreflect.Message { - return (*fastReflection_Module)(nil) -} -func (x fastReflection_Module_messageType) New() protoreflect.Message { - return new(fastReflection_Module) -} -func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Module -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { - return md_Module -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Module) Type() protoreflect.MessageType { - return _fastReflection_Module_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Module) New() protoreflect.Message { - return new(fastReflection_Module) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { - return (*Module)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Path != "" { - value := protoreflect.ValueOfString(x.Path) - if !f(fd_Module_path, value) { - return - } - } - if x.Version != "" { - value := protoreflect.ValueOfString(x.Version) - if !f(fd_Module_version, value) { - return - } - } - if x.Sum != "" { - value := protoreflect.ValueOfString(x.Sum) - if !f(fd_Module_sum, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.Module.path": - return x.Path != "" - case "cosmos.base.tendermint.v1beta1.Module.version": - return x.Version != "" - case "cosmos.base.tendermint.v1beta1.Module.sum": - return x.Sum != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Module")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Module does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.Module.path": - x.Path = "" - case "cosmos.base.tendermint.v1beta1.Module.version": - x.Version = "" - case "cosmos.base.tendermint.v1beta1.Module.sum": - x.Sum = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Module")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Module does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.Module.path": - value := x.Path - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.Module.version": - value := x.Version - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.Module.sum": - value := x.Sum - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Module")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Module does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.Module.path": - x.Path = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.Module.version": - x.Version = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.Module.sum": - x.Sum = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Module")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Module does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.Module.path": - panic(fmt.Errorf("field path of message cosmos.base.tendermint.v1beta1.Module is not mutable")) - case "cosmos.base.tendermint.v1beta1.Module.version": - panic(fmt.Errorf("field version of message cosmos.base.tendermint.v1beta1.Module is not mutable")) - case "cosmos.base.tendermint.v1beta1.Module.sum": - panic(fmt.Errorf("field sum of message cosmos.base.tendermint.v1beta1.Module is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Module")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Module does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.Module.path": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.Module.version": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.Module.sum": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.Module")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.Module does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.Module", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Module) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Module) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Module) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Module) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Path) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Version) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Sum) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Module) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Sum) > 0 { - i -= len(x.Sum) - copy(dAtA[i:], x.Sum) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sum))) - i-- - dAtA[i] = 0x1a - } - if len(x.Version) > 0 { - i -= len(x.Version) - copy(dAtA[i:], x.Version) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Version))) - i-- - dAtA[i] = 0x12 - } - if len(x.Path) > 0 { - i -= len(x.Path) - copy(dAtA[i:], x.Path) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Path))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Module) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Sum = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ABCIQueryRequest protoreflect.MessageDescriptor - fd_ABCIQueryRequest_data protoreflect.FieldDescriptor - fd_ABCIQueryRequest_path protoreflect.FieldDescriptor - fd_ABCIQueryRequest_height protoreflect.FieldDescriptor - fd_ABCIQueryRequest_prove protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_ABCIQueryRequest = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("ABCIQueryRequest") - fd_ABCIQueryRequest_data = md_ABCIQueryRequest.Fields().ByName("data") - fd_ABCIQueryRequest_path = md_ABCIQueryRequest.Fields().ByName("path") - fd_ABCIQueryRequest_height = md_ABCIQueryRequest.Fields().ByName("height") - fd_ABCIQueryRequest_prove = md_ABCIQueryRequest.Fields().ByName("prove") -} - -var _ protoreflect.Message = (*fastReflection_ABCIQueryRequest)(nil) - -type fastReflection_ABCIQueryRequest ABCIQueryRequest - -func (x *ABCIQueryRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_ABCIQueryRequest)(x) -} - -func (x *ABCIQueryRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ABCIQueryRequest_messageType fastReflection_ABCIQueryRequest_messageType -var _ protoreflect.MessageType = fastReflection_ABCIQueryRequest_messageType{} - -type fastReflection_ABCIQueryRequest_messageType struct{} - -func (x fastReflection_ABCIQueryRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_ABCIQueryRequest)(nil) -} -func (x fastReflection_ABCIQueryRequest_messageType) New() protoreflect.Message { - return new(fastReflection_ABCIQueryRequest) -} -func (x fastReflection_ABCIQueryRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ABCIQueryRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ABCIQueryRequest) Descriptor() protoreflect.MessageDescriptor { - return md_ABCIQueryRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ABCIQueryRequest) Type() protoreflect.MessageType { - return _fastReflection_ABCIQueryRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ABCIQueryRequest) New() protoreflect.Message { - return new(fastReflection_ABCIQueryRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ABCIQueryRequest) Interface() protoreflect.ProtoMessage { - return (*ABCIQueryRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ABCIQueryRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Data) != 0 { - value := protoreflect.ValueOfBytes(x.Data) - if !f(fd_ABCIQueryRequest_data, value) { - return - } - } - if x.Path != "" { - value := protoreflect.ValueOfString(x.Path) - if !f(fd_ABCIQueryRequest_path, value) { - return - } - } - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_ABCIQueryRequest_height, value) { - return - } - } - if x.Prove != false { - value := protoreflect.ValueOfBool(x.Prove) - if !f(fd_ABCIQueryRequest_prove, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ABCIQueryRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.data": - return len(x.Data) != 0 - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.path": - return x.Path != "" - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.height": - return x.Height != int64(0) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.prove": - return x.Prove != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ABCIQueryRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.data": - x.Data = nil - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.path": - x.Path = "" - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.height": - x.Height = int64(0) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.prove": - x.Prove = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ABCIQueryRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.data": - value := x.Data - return protoreflect.ValueOfBytes(value) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.path": - value := x.Path - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.prove": - value := x.Prove - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ABCIQueryRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.data": - x.Data = value.Bytes() - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.path": - x.Path = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.height": - x.Height = value.Int() - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.prove": - x.Prove = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ABCIQueryRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.data": - panic(fmt.Errorf("field data of message cosmos.base.tendermint.v1beta1.ABCIQueryRequest is not mutable")) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.path": - panic(fmt.Errorf("field path of message cosmos.base.tendermint.v1beta1.ABCIQueryRequest is not mutable")) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.height": - panic(fmt.Errorf("field height of message cosmos.base.tendermint.v1beta1.ABCIQueryRequest is not mutable")) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.prove": - panic(fmt.Errorf("field prove of message cosmos.base.tendermint.v1beta1.ABCIQueryRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ABCIQueryRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.data": - return protoreflect.ValueOfBytes(nil) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.path": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.height": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.base.tendermint.v1beta1.ABCIQueryRequest.prove": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryRequest")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ABCIQueryRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.ABCIQueryRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ABCIQueryRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ABCIQueryRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ABCIQueryRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ABCIQueryRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ABCIQueryRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Data) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Path) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - if x.Prove { - n += 2 - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ABCIQueryRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Prove { - i-- - if x.Prove { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x18 - } - if len(x.Path) > 0 { - i -= len(x.Path) - copy(dAtA[i:], x.Path) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Path))) - i-- - dAtA[i] = 0x12 - } - if len(x.Data) > 0 { - i -= len(x.Data) - copy(dAtA[i:], x.Data) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Data))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ABCIQueryRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ABCIQueryRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ABCIQueryRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Data = append(x.Data[:0], dAtA[iNdEx:postIndex]...) - if x.Data == nil { - x.Data = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Prove", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Prove = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ABCIQueryResponse protoreflect.MessageDescriptor - fd_ABCIQueryResponse_code protoreflect.FieldDescriptor - fd_ABCIQueryResponse_log protoreflect.FieldDescriptor - fd_ABCIQueryResponse_info protoreflect.FieldDescriptor - fd_ABCIQueryResponse_index protoreflect.FieldDescriptor - fd_ABCIQueryResponse_key protoreflect.FieldDescriptor - fd_ABCIQueryResponse_value protoreflect.FieldDescriptor - fd_ABCIQueryResponse_proof_ops protoreflect.FieldDescriptor - fd_ABCIQueryResponse_height protoreflect.FieldDescriptor - fd_ABCIQueryResponse_codespace protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_ABCIQueryResponse = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("ABCIQueryResponse") - fd_ABCIQueryResponse_code = md_ABCIQueryResponse.Fields().ByName("code") - fd_ABCIQueryResponse_log = md_ABCIQueryResponse.Fields().ByName("log") - fd_ABCIQueryResponse_info = md_ABCIQueryResponse.Fields().ByName("info") - fd_ABCIQueryResponse_index = md_ABCIQueryResponse.Fields().ByName("index") - fd_ABCIQueryResponse_key = md_ABCIQueryResponse.Fields().ByName("key") - fd_ABCIQueryResponse_value = md_ABCIQueryResponse.Fields().ByName("value") - fd_ABCIQueryResponse_proof_ops = md_ABCIQueryResponse.Fields().ByName("proof_ops") - fd_ABCIQueryResponse_height = md_ABCIQueryResponse.Fields().ByName("height") - fd_ABCIQueryResponse_codespace = md_ABCIQueryResponse.Fields().ByName("codespace") -} - -var _ protoreflect.Message = (*fastReflection_ABCIQueryResponse)(nil) - -type fastReflection_ABCIQueryResponse ABCIQueryResponse - -func (x *ABCIQueryResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_ABCIQueryResponse)(x) -} - -func (x *ABCIQueryResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ABCIQueryResponse_messageType fastReflection_ABCIQueryResponse_messageType -var _ protoreflect.MessageType = fastReflection_ABCIQueryResponse_messageType{} - -type fastReflection_ABCIQueryResponse_messageType struct{} - -func (x fastReflection_ABCIQueryResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_ABCIQueryResponse)(nil) -} -func (x fastReflection_ABCIQueryResponse_messageType) New() protoreflect.Message { - return new(fastReflection_ABCIQueryResponse) -} -func (x fastReflection_ABCIQueryResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ABCIQueryResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ABCIQueryResponse) Descriptor() protoreflect.MessageDescriptor { - return md_ABCIQueryResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ABCIQueryResponse) Type() protoreflect.MessageType { - return _fastReflection_ABCIQueryResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ABCIQueryResponse) New() protoreflect.Message { - return new(fastReflection_ABCIQueryResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ABCIQueryResponse) Interface() protoreflect.ProtoMessage { - return (*ABCIQueryResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ABCIQueryResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Code != uint32(0) { - value := protoreflect.ValueOfUint32(x.Code) - if !f(fd_ABCIQueryResponse_code, value) { - return - } - } - if x.Log != "" { - value := protoreflect.ValueOfString(x.Log) - if !f(fd_ABCIQueryResponse_log, value) { - return - } - } - if x.Info != "" { - value := protoreflect.ValueOfString(x.Info) - if !f(fd_ABCIQueryResponse_info, value) { - return - } - } - if x.Index != int64(0) { - value := protoreflect.ValueOfInt64(x.Index) - if !f(fd_ABCIQueryResponse_index, value) { - return - } - } - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_ABCIQueryResponse_key, value) { - return - } - } - if len(x.Value) != 0 { - value := protoreflect.ValueOfBytes(x.Value) - if !f(fd_ABCIQueryResponse_value, value) { - return - } - } - if x.ProofOps != nil { - value := protoreflect.ValueOfMessage(x.ProofOps.ProtoReflect()) - if !f(fd_ABCIQueryResponse_proof_ops, value) { - return - } - } - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_ABCIQueryResponse_height, value) { - return - } - } - if x.Codespace != "" { - value := protoreflect.ValueOfString(x.Codespace) - if !f(fd_ABCIQueryResponse_codespace, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ABCIQueryResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.code": - return x.Code != uint32(0) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.log": - return x.Log != "" - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.info": - return x.Info != "" - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.index": - return x.Index != int64(0) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.key": - return len(x.Key) != 0 - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.value": - return len(x.Value) != 0 - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.proof_ops": - return x.ProofOps != nil - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.height": - return x.Height != int64(0) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.codespace": - return x.Codespace != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ABCIQueryResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.code": - x.Code = uint32(0) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.log": - x.Log = "" - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.info": - x.Info = "" - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.index": - x.Index = int64(0) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.key": - x.Key = nil - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.value": - x.Value = nil - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.proof_ops": - x.ProofOps = nil - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.height": - x.Height = int64(0) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.codespace": - x.Codespace = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ABCIQueryResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.code": - value := x.Code - return protoreflect.ValueOfUint32(value) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.log": - value := x.Log - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.info": - value := x.Info - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.index": - value := x.Index - return protoreflect.ValueOfInt64(value) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.value": - value := x.Value - return protoreflect.ValueOfBytes(value) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.proof_ops": - value := x.ProofOps - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.codespace": - value := x.Codespace - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ABCIQueryResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.code": - x.Code = uint32(value.Uint()) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.log": - x.Log = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.info": - x.Info = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.index": - x.Index = value.Int() - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.key": - x.Key = value.Bytes() - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.value": - x.Value = value.Bytes() - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.proof_ops": - x.ProofOps = value.Message().Interface().(*ProofOps) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.height": - x.Height = value.Int() - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.codespace": - x.Codespace = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ABCIQueryResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.proof_ops": - if x.ProofOps == nil { - x.ProofOps = new(ProofOps) - } - return protoreflect.ValueOfMessage(x.ProofOps.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.code": - panic(fmt.Errorf("field code of message cosmos.base.tendermint.v1beta1.ABCIQueryResponse is not mutable")) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.log": - panic(fmt.Errorf("field log of message cosmos.base.tendermint.v1beta1.ABCIQueryResponse is not mutable")) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.info": - panic(fmt.Errorf("field info of message cosmos.base.tendermint.v1beta1.ABCIQueryResponse is not mutable")) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.index": - panic(fmt.Errorf("field index of message cosmos.base.tendermint.v1beta1.ABCIQueryResponse is not mutable")) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.key": - panic(fmt.Errorf("field key of message cosmos.base.tendermint.v1beta1.ABCIQueryResponse is not mutable")) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.value": - panic(fmt.Errorf("field value of message cosmos.base.tendermint.v1beta1.ABCIQueryResponse is not mutable")) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.height": - panic(fmt.Errorf("field height of message cosmos.base.tendermint.v1beta1.ABCIQueryResponse is not mutable")) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.codespace": - panic(fmt.Errorf("field codespace of message cosmos.base.tendermint.v1beta1.ABCIQueryResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ABCIQueryResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.code": - return protoreflect.ValueOfUint32(uint32(0)) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.log": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.info": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.index": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.key": - return protoreflect.ValueOfBytes(nil) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.value": - return protoreflect.ValueOfBytes(nil) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.proof_ops": - m := new(ProofOps) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.height": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.base.tendermint.v1beta1.ABCIQueryResponse.codespace": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ABCIQueryResponse")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ABCIQueryResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ABCIQueryResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.ABCIQueryResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ABCIQueryResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ABCIQueryResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ABCIQueryResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ABCIQueryResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ABCIQueryResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Code != 0 { - n += 1 + runtime.Sov(uint64(x.Code)) - } - l = len(x.Log) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Info) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Index != 0 { - n += 1 + runtime.Sov(uint64(x.Index)) - } - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Value) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.ProofOps != nil { - l = options.Size(x.ProofOps) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - l = len(x.Codespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ABCIQueryResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Codespace) > 0 { - i -= len(x.Codespace) - copy(dAtA[i:], x.Codespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Codespace))) - i-- - dAtA[i] = 0x52 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x48 - } - if x.ProofOps != nil { - encoded, err := options.Marshal(x.ProofOps) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - if len(x.Value) > 0 { - i -= len(x.Value) - copy(dAtA[i:], x.Value) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) - i-- - dAtA[i] = 0x3a - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - i-- - dAtA[i] = 0x32 - } - if x.Index != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Index)) - i-- - dAtA[i] = 0x28 - } - if len(x.Info) > 0 { - i -= len(x.Info) - copy(dAtA[i:], x.Info) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Info))) - i-- - dAtA[i] = 0x22 - } - if len(x.Log) > 0 { - i -= len(x.Log) - copy(dAtA[i:], x.Log) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Log))) - i-- - dAtA[i] = 0x1a - } - if x.Code != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Code)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ABCIQueryResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ABCIQueryResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ABCIQueryResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - x.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Code |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Log", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Log = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Info = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - x.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Index |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Value = append(x.Value[:0], dAtA[iNdEx:postIndex]...) - if x.Value == nil { - x.Value = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProofOps", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.ProofOps == nil { - x.ProofOps = &ProofOps{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ProofOps); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Codespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ProofOp protoreflect.MessageDescriptor - fd_ProofOp_type protoreflect.FieldDescriptor - fd_ProofOp_key protoreflect.FieldDescriptor - fd_ProofOp_data protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_ProofOp = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("ProofOp") - fd_ProofOp_type = md_ProofOp.Fields().ByName("type") - fd_ProofOp_key = md_ProofOp.Fields().ByName("key") - fd_ProofOp_data = md_ProofOp.Fields().ByName("data") -} - -var _ protoreflect.Message = (*fastReflection_ProofOp)(nil) - -type fastReflection_ProofOp ProofOp - -func (x *ProofOp) ProtoReflect() protoreflect.Message { - return (*fastReflection_ProofOp)(x) -} - -func (x *ProofOp) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ProofOp_messageType fastReflection_ProofOp_messageType -var _ protoreflect.MessageType = fastReflection_ProofOp_messageType{} - -type fastReflection_ProofOp_messageType struct{} - -func (x fastReflection_ProofOp_messageType) Zero() protoreflect.Message { - return (*fastReflection_ProofOp)(nil) -} -func (x fastReflection_ProofOp_messageType) New() protoreflect.Message { - return new(fastReflection_ProofOp) -} -func (x fastReflection_ProofOp_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ProofOp -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ProofOp) Descriptor() protoreflect.MessageDescriptor { - return md_ProofOp -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ProofOp) Type() protoreflect.MessageType { - return _fastReflection_ProofOp_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ProofOp) New() protoreflect.Message { - return new(fastReflection_ProofOp) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ProofOp) Interface() protoreflect.ProtoMessage { - return (*ProofOp)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ProofOp) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Type_ != "" { - value := protoreflect.ValueOfString(x.Type_) - if !f(fd_ProofOp_type, value) { - return - } - } - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_ProofOp_key, value) { - return - } - } - if len(x.Data) != 0 { - value := protoreflect.ValueOfBytes(x.Data) - if !f(fd_ProofOp_data, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ProofOp) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOp.type": - return x.Type_ != "" - case "cosmos.base.tendermint.v1beta1.ProofOp.key": - return len(x.Key) != 0 - case "cosmos.base.tendermint.v1beta1.ProofOp.data": - return len(x.Data) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOp")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOp does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ProofOp) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOp.type": - x.Type_ = "" - case "cosmos.base.tendermint.v1beta1.ProofOp.key": - x.Key = nil - case "cosmos.base.tendermint.v1beta1.ProofOp.data": - x.Data = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOp")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOp does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ProofOp) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOp.type": - value := x.Type_ - return protoreflect.ValueOfString(value) - case "cosmos.base.tendermint.v1beta1.ProofOp.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - case "cosmos.base.tendermint.v1beta1.ProofOp.data": - value := x.Data - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOp")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOp does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ProofOp) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOp.type": - x.Type_ = value.Interface().(string) - case "cosmos.base.tendermint.v1beta1.ProofOp.key": - x.Key = value.Bytes() - case "cosmos.base.tendermint.v1beta1.ProofOp.data": - x.Data = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOp")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOp does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ProofOp) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOp.type": - panic(fmt.Errorf("field type of message cosmos.base.tendermint.v1beta1.ProofOp is not mutable")) - case "cosmos.base.tendermint.v1beta1.ProofOp.key": - panic(fmt.Errorf("field key of message cosmos.base.tendermint.v1beta1.ProofOp is not mutable")) - case "cosmos.base.tendermint.v1beta1.ProofOp.data": - panic(fmt.Errorf("field data of message cosmos.base.tendermint.v1beta1.ProofOp is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOp")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOp does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ProofOp) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOp.type": - return protoreflect.ValueOfString("") - case "cosmos.base.tendermint.v1beta1.ProofOp.key": - return protoreflect.ValueOfBytes(nil) - case "cosmos.base.tendermint.v1beta1.ProofOp.data": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOp")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOp does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ProofOp) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.ProofOp", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ProofOp) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ProofOp) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ProofOp) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ProofOp) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ProofOp) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Type_) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Data) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ProofOp) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Data) > 0 { - i -= len(x.Data) - copy(dAtA[i:], x.Data) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Data))) - i-- - dAtA[i] = 0x1a - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - i-- - dAtA[i] = 0x12 - } - if len(x.Type_) > 0 { - i -= len(x.Type_) - copy(dAtA[i:], x.Type_) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Type_))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ProofOp) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ProofOp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ProofOp: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Type_", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Type_ = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Data = append(x.Data[:0], dAtA[iNdEx:postIndex]...) - if x.Data == nil { - x.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ProofOps_1_list)(nil) - -type _ProofOps_1_list struct { - list *[]*ProofOp -} - -func (x *_ProofOps_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ProofOps_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ProofOps_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ProofOp) - (*x.list)[i] = concreteValue -} - -func (x *_ProofOps_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ProofOp) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ProofOps_1_list) AppendMutable() protoreflect.Value { - v := new(ProofOp) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ProofOps_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ProofOps_1_list) NewElement() protoreflect.Value { - v := new(ProofOp) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ProofOps_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ProofOps protoreflect.MessageDescriptor - fd_ProofOps_ops protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_base_tendermint_v1beta1_query_proto_init() - md_ProofOps = File_cosmos_base_tendermint_v1beta1_query_proto.Messages().ByName("ProofOps") - fd_ProofOps_ops = md_ProofOps.Fields().ByName("ops") -} - -var _ protoreflect.Message = (*fastReflection_ProofOps)(nil) - -type fastReflection_ProofOps ProofOps - -func (x *ProofOps) ProtoReflect() protoreflect.Message { - return (*fastReflection_ProofOps)(x) -} - -func (x *ProofOps) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ProofOps_messageType fastReflection_ProofOps_messageType -var _ protoreflect.MessageType = fastReflection_ProofOps_messageType{} - -type fastReflection_ProofOps_messageType struct{} - -func (x fastReflection_ProofOps_messageType) Zero() protoreflect.Message { - return (*fastReflection_ProofOps)(nil) -} -func (x fastReflection_ProofOps_messageType) New() protoreflect.Message { - return new(fastReflection_ProofOps) -} -func (x fastReflection_ProofOps_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ProofOps -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ProofOps) Descriptor() protoreflect.MessageDescriptor { - return md_ProofOps -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ProofOps) Type() protoreflect.MessageType { - return _fastReflection_ProofOps_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ProofOps) New() protoreflect.Message { - return new(fastReflection_ProofOps) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ProofOps) Interface() protoreflect.ProtoMessage { - return (*ProofOps)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ProofOps) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Ops) != 0 { - value := protoreflect.ValueOfList(&_ProofOps_1_list{list: &x.Ops}) - if !f(fd_ProofOps_ops, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ProofOps) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOps.ops": - return len(x.Ops) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOps")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOps does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ProofOps) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOps.ops": - x.Ops = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOps")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOps does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ProofOps) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOps.ops": - if len(x.Ops) == 0 { - return protoreflect.ValueOfList(&_ProofOps_1_list{}) - } - listValue := &_ProofOps_1_list{list: &x.Ops} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOps")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOps does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ProofOps) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOps.ops": - lv := value.List() - clv := lv.(*_ProofOps_1_list) - x.Ops = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOps")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOps does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ProofOps) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOps.ops": - if x.Ops == nil { - x.Ops = []*ProofOp{} - } - value := &_ProofOps_1_list{list: &x.Ops} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOps")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOps does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ProofOps) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.base.tendermint.v1beta1.ProofOps.ops": - list := []*ProofOp{} - return protoreflect.ValueOfList(&_ProofOps_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.base.tendermint.v1beta1.ProofOps")) - } - panic(fmt.Errorf("message cosmos.base.tendermint.v1beta1.ProofOps does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ProofOps) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.base.tendermint.v1beta1.ProofOps", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ProofOps) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ProofOps) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ProofOps) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ProofOps) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ProofOps) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Ops) > 0 { - for _, e := range x.Ops { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ProofOps) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Ops) > 0 { - for iNdEx := len(x.Ops) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Ops[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ProofOps) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ProofOps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ProofOps: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Ops", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Ops = append(x.Ops, &ProofOp{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Ops[len(x.Ops)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/base/tendermint/v1beta1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. -type GetValidatorSetByHeightRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - // pagination defines an pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *GetValidatorSetByHeightRequest) Reset() { - *x = GetValidatorSetByHeightRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetValidatorSetByHeightRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetValidatorSetByHeightRequest) ProtoMessage() {} - -// Deprecated: Use GetValidatorSetByHeightRequest.ProtoReflect.Descriptor instead. -func (*GetValidatorSetByHeightRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{0} -} - -func (x *GetValidatorSetByHeightRequest) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *GetValidatorSetByHeightRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. -type GetValidatorSetByHeightResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - Validators []*Validator `protobuf:"bytes,2,rep,name=validators,proto3" json:"validators,omitempty"` - // pagination defines an pagination for the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *GetValidatorSetByHeightResponse) Reset() { - *x = GetValidatorSetByHeightResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetValidatorSetByHeightResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetValidatorSetByHeightResponse) ProtoMessage() {} - -// Deprecated: Use GetValidatorSetByHeightResponse.ProtoReflect.Descriptor instead. -func (*GetValidatorSetByHeightResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *GetValidatorSetByHeightResponse) GetBlockHeight() int64 { - if x != nil { - return x.BlockHeight - } - return 0 -} - -func (x *GetValidatorSetByHeightResponse) GetValidators() []*Validator { - if x != nil { - return x.Validators - } - return nil -} - -func (x *GetValidatorSetByHeightResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. -type GetLatestValidatorSetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // pagination defines an pagination for the request. - Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *GetLatestValidatorSetRequest) Reset() { - *x = GetLatestValidatorSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetLatestValidatorSetRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetLatestValidatorSetRequest) ProtoMessage() {} - -// Deprecated: Use GetLatestValidatorSetRequest.ProtoReflect.Descriptor instead. -func (*GetLatestValidatorSetRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{2} -} - -func (x *GetLatestValidatorSetRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -// GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. -type GetLatestValidatorSetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - Validators []*Validator `protobuf:"bytes,2,rep,name=validators,proto3" json:"validators,omitempty"` - // pagination defines an pagination for the response. - Pagination *v1beta1.PageResponse `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *GetLatestValidatorSetResponse) Reset() { - *x = GetLatestValidatorSetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetLatestValidatorSetResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetLatestValidatorSetResponse) ProtoMessage() {} - -// Deprecated: Use GetLatestValidatorSetResponse.ProtoReflect.Descriptor instead. -func (*GetLatestValidatorSetResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *GetLatestValidatorSetResponse) GetBlockHeight() int64 { - if x != nil { - return x.BlockHeight - } - return 0 -} - -func (x *GetLatestValidatorSetResponse) GetValidators() []*Validator { - if x != nil { - return x.Validators - } - return nil -} - -func (x *GetLatestValidatorSetResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// Validator is the type for the validator-set. -type Validator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - PubKey *anypb.Any `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` - VotingPower int64 `protobuf:"varint,3,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"` - ProposerPriority int64 `protobuf:"varint,4,opt,name=proposer_priority,json=proposerPriority,proto3" json:"proposer_priority,omitempty"` -} - -func (x *Validator) Reset() { - *x = Validator{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Validator) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Validator) ProtoMessage() {} - -// Deprecated: Use Validator.ProtoReflect.Descriptor instead. -func (*Validator) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{4} -} - -func (x *Validator) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *Validator) GetPubKey() *anypb.Any { - if x != nil { - return x.PubKey - } - return nil -} - -func (x *Validator) GetVotingPower() int64 { - if x != nil { - return x.VotingPower - } - return 0 -} - -func (x *Validator) GetProposerPriority() int64 { - if x != nil { - return x.ProposerPriority - } - return 0 -} - -// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. -type GetBlockByHeightRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` -} - -func (x *GetBlockByHeightRequest) Reset() { - *x = GetBlockByHeightRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetBlockByHeightRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBlockByHeightRequest) ProtoMessage() {} - -// Deprecated: Use GetBlockByHeightRequest.ProtoReflect.Descriptor instead. -func (*GetBlockByHeightRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{5} -} - -func (x *GetBlockByHeightRequest) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. -type GetBlockByHeightResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BlockId *types.BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - Block *types.Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` -} - -func (x *GetBlockByHeightResponse) Reset() { - *x = GetBlockByHeightResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetBlockByHeightResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBlockByHeightResponse) ProtoMessage() {} - -// Deprecated: Use GetBlockByHeightResponse.ProtoReflect.Descriptor instead. -func (*GetBlockByHeightResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{6} -} - -func (x *GetBlockByHeightResponse) GetBlockId() *types.BlockID { - if x != nil { - return x.BlockId - } - return nil -} - -func (x *GetBlockByHeightResponse) GetBlock() *types.Block { - if x != nil { - return x.Block - } - return nil -} - -// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. -type GetLatestBlockRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetLatestBlockRequest) Reset() { - *x = GetLatestBlockRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetLatestBlockRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetLatestBlockRequest) ProtoMessage() {} - -// Deprecated: Use GetLatestBlockRequest.ProtoReflect.Descriptor instead. -func (*GetLatestBlockRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{7} -} - -// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. -type GetLatestBlockResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BlockId *types.BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - Block *types.Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` -} - -func (x *GetLatestBlockResponse) Reset() { - *x = GetLatestBlockResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetLatestBlockResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetLatestBlockResponse) ProtoMessage() {} - -// Deprecated: Use GetLatestBlockResponse.ProtoReflect.Descriptor instead. -func (*GetLatestBlockResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{8} -} - -func (x *GetLatestBlockResponse) GetBlockId() *types.BlockID { - if x != nil { - return x.BlockId - } - return nil -} - -func (x *GetLatestBlockResponse) GetBlock() *types.Block { - if x != nil { - return x.Block - } - return nil -} - -// GetSyncingRequest is the request type for the Query/GetSyncing RPC method. -type GetSyncingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetSyncingRequest) Reset() { - *x = GetSyncingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSyncingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSyncingRequest) ProtoMessage() {} - -// Deprecated: Use GetSyncingRequest.ProtoReflect.Descriptor instead. -func (*GetSyncingRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{9} -} - -// GetSyncingResponse is the response type for the Query/GetSyncing RPC method. -type GetSyncingResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Syncing bool `protobuf:"varint,1,opt,name=syncing,proto3" json:"syncing,omitempty"` -} - -func (x *GetSyncingResponse) Reset() { - *x = GetSyncingResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSyncingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSyncingResponse) ProtoMessage() {} - -// Deprecated: Use GetSyncingResponse.ProtoReflect.Descriptor instead. -func (*GetSyncingResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{10} -} - -func (x *GetSyncingResponse) GetSyncing() bool { - if x != nil { - return x.Syncing - } - return false -} - -// GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. -type GetNodeInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetNodeInfoRequest) Reset() { - *x = GetNodeInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNodeInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNodeInfoRequest) ProtoMessage() {} - -// Deprecated: Use GetNodeInfoRequest.ProtoReflect.Descriptor instead. -func (*GetNodeInfoRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{11} -} - -// GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method. -type GetNodeInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NodeInfo *p2p.NodeInfo `protobuf:"bytes,1,opt,name=node_info,json=nodeInfo,proto3" json:"node_info,omitempty"` - ApplicationVersion *VersionInfo `protobuf:"bytes,2,opt,name=application_version,json=applicationVersion,proto3" json:"application_version,omitempty"` -} - -func (x *GetNodeInfoResponse) Reset() { - *x = GetNodeInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNodeInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNodeInfoResponse) ProtoMessage() {} - -// Deprecated: Use GetNodeInfoResponse.ProtoReflect.Descriptor instead. -func (*GetNodeInfoResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{12} -} - -func (x *GetNodeInfoResponse) GetNodeInfo() *p2p.NodeInfo { - if x != nil { - return x.NodeInfo - } - return nil -} - -func (x *GetNodeInfoResponse) GetApplicationVersion() *VersionInfo { - if x != nil { - return x.ApplicationVersion - } - return nil -} - -// VersionInfo is the type for the GetNodeInfoResponse message. -type VersionInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - AppName string `protobuf:"bytes,2,opt,name=app_name,json=appName,proto3" json:"app_name,omitempty"` - Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` - GitCommit string `protobuf:"bytes,4,opt,name=git_commit,json=gitCommit,proto3" json:"git_commit,omitempty"` - BuildTags string `protobuf:"bytes,5,opt,name=build_tags,json=buildTags,proto3" json:"build_tags,omitempty"` - GoVersion string `protobuf:"bytes,6,opt,name=go_version,json=goVersion,proto3" json:"go_version,omitempty"` - BuildDeps []*Module `protobuf:"bytes,7,rep,name=build_deps,json=buildDeps,proto3" json:"build_deps,omitempty"` - // Since: cosmos-sdk 0.43 - CosmosSdkVersion string `protobuf:"bytes,8,opt,name=cosmos_sdk_version,json=cosmosSdkVersion,proto3" json:"cosmos_sdk_version,omitempty"` -} - -func (x *VersionInfo) Reset() { - *x = VersionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VersionInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VersionInfo) ProtoMessage() {} - -// Deprecated: Use VersionInfo.ProtoReflect.Descriptor instead. -func (*VersionInfo) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{13} -} - -func (x *VersionInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *VersionInfo) GetAppName() string { - if x != nil { - return x.AppName - } - return "" -} - -func (x *VersionInfo) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *VersionInfo) GetGitCommit() string { - if x != nil { - return x.GitCommit - } - return "" -} - -func (x *VersionInfo) GetBuildTags() string { - if x != nil { - return x.BuildTags - } - return "" -} - -func (x *VersionInfo) GetGoVersion() string { - if x != nil { - return x.GoVersion - } - return "" -} - -func (x *VersionInfo) GetBuildDeps() []*Module { - if x != nil { - return x.BuildDeps - } - return nil -} - -func (x *VersionInfo) GetCosmosSdkVersion() string { - if x != nil { - return x.CosmosSdkVersion - } - return "" -} - -// Module is the type for VersionInfo -type Module struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // module path - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // module version - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - // checksum - Sum string `protobuf:"bytes,3,opt,name=sum,proto3" json:"sum,omitempty"` -} - -func (x *Module) Reset() { - *x = Module{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Module) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Module) ProtoMessage() {} - -// Deprecated: Use Module.ProtoReflect.Descriptor instead. -func (*Module) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{14} -} - -func (x *Module) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *Module) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *Module) GetSum() string { - if x != nil { - return x.Sum - } - return "" -} - -// ABCIQueryRequest defines the request structure for the ABCIQuery gRPC query. -type ABCIQueryRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` - Prove bool `protobuf:"varint,4,opt,name=prove,proto3" json:"prove,omitempty"` -} - -func (x *ABCIQueryRequest) Reset() { - *x = ABCIQueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ABCIQueryRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ABCIQueryRequest) ProtoMessage() {} - -// Deprecated: Use ABCIQueryRequest.ProtoReflect.Descriptor instead. -func (*ABCIQueryRequest) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{15} -} - -func (x *ABCIQueryRequest) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -func (x *ABCIQueryRequest) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *ABCIQueryRequest) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *ABCIQueryRequest) GetProve() bool { - if x != nil { - return x.Prove - } - return false -} - -// ABCIQueryResponse defines the response structure for the ABCIQuery gRPC query. -// -// Note: This type is a duplicate of the ResponseQuery proto type defined in -// Tendermint. -type ABCIQueryResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` // nondeterministic - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` // nondeterministic - Index int64 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"` - Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"` - ProofOps *ProofOps `protobuf:"bytes,8,opt,name=proof_ops,json=proofOps,proto3" json:"proof_ops,omitempty"` - Height int64 `protobuf:"varint,9,opt,name=height,proto3" json:"height,omitempty"` - Codespace string `protobuf:"bytes,10,opt,name=codespace,proto3" json:"codespace,omitempty"` -} - -func (x *ABCIQueryResponse) Reset() { - *x = ABCIQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ABCIQueryResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ABCIQueryResponse) ProtoMessage() {} - -// Deprecated: Use ABCIQueryResponse.ProtoReflect.Descriptor instead. -func (*ABCIQueryResponse) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{16} -} - -func (x *ABCIQueryResponse) GetCode() uint32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *ABCIQueryResponse) GetLog() string { - if x != nil { - return x.Log - } - return "" -} - -func (x *ABCIQueryResponse) GetInfo() string { - if x != nil { - return x.Info - } - return "" -} - -func (x *ABCIQueryResponse) GetIndex() int64 { - if x != nil { - return x.Index - } - return 0 -} - -func (x *ABCIQueryResponse) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -func (x *ABCIQueryResponse) GetValue() []byte { - if x != nil { - return x.Value - } - return nil -} - -func (x *ABCIQueryResponse) GetProofOps() *ProofOps { - if x != nil { - return x.ProofOps - } - return nil -} - -func (x *ABCIQueryResponse) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *ABCIQueryResponse) GetCodespace() string { - if x != nil { - return x.Codespace - } - return "" -} - -// ProofOp defines an operation used for calculating Merkle root. The data could -// be arbitrary format, providing nessecary data for example neighbouring node -// hash. -// -// Note: This type is a duplicate of the ProofOp proto type defined in Tendermint. -type ProofOp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type_ string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *ProofOp) Reset() { - *x = ProofOp{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProofOp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProofOp) ProtoMessage() {} - -// Deprecated: Use ProofOp.ProtoReflect.Descriptor instead. -func (*ProofOp) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{17} -} - -func (x *ProofOp) GetType_() string { - if x != nil { - return x.Type_ - } - return "" -} - -func (x *ProofOp) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -func (x *ProofOp) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -// ProofOps is Merkle proof defined by the list of ProofOps. -// -// Note: This type is a duplicate of the ProofOps proto type defined in Tendermint. -type ProofOps struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ops []*ProofOp `protobuf:"bytes,1,rep,name=ops,proto3" json:"ops,omitempty"` -} - -func (x *ProofOps) Reset() { - *x = ProofOps{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ProofOps) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProofOps) ProtoMessage() {} - -// Deprecated: Use ProofOps.ProtoReflect.Descriptor instead. -func (*ProofOps) Descriptor() ([]byte, []int) { - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP(), []int{18} -} - -func (x *ProofOps) GetOps() []*ProofOp { - if x != nil { - return x.Ops - } - return nil -} - -var File_cosmos_base_tendermint_v1beta1_query_proto protoreflect.FileDescriptor - -var file_cosmos_base_tendermint_v1beta1_query_proto_rawDesc = []byte{ - 0x0a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, - 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x74, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x70, 0x32, 0x70, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, - 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x80, 0x01, 0x0a, 0x1e, 0x47, - 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x42, 0x79, - 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd8, 0x01, - 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, - 0x74, 0x42, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x12, 0x49, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, - 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x66, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x4c, - 0x61, 0x74, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0xd6, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x49, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, - 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbe, 0x01, 0x0a, 0x09, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2d, 0x0a, 0x07, 0x70, - 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, - 0x6e, 0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x6f, - 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0b, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x2b, 0x0a, - 0x11, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x65, 0x72, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x31, 0x0a, 0x17, 0x47, 0x65, - 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x7f, 0x0a, - 0x18, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x12, - 0x2d, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x17, - 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x7d, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4c, 0x61, - 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x34, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x52, 0x07, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, - 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x13, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, - 0x63, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2e, 0x0a, 0x12, 0x47, - 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x79, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x73, 0x79, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x22, 0x14, 0x0a, 0x12, 0x47, - 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0xaa, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x32, 0x70, 0x2e, 0x4e, 0x6f, - 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x5c, 0x0a, 0x13, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x12, 0x61, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa8, - 0x02, 0x0a, 0x0b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x74, 0x5f, 0x63, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x69, 0x74, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, - 0x74, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, - 0x64, 0x54, 0x61, 0x67, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x64, 0x65, - 0x70, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x44, 0x65, 0x70, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x73, 0x64, 0x6b, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x53, - 0x64, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x48, 0x0a, 0x06, 0x4d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x73, 0x75, 0x6d, 0x22, 0x68, 0x0a, 0x10, 0x41, 0x42, 0x43, 0x49, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, - 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x76, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x22, 0x8e, 0x02, - 0x0a, 0x11, 0x41, 0x42, 0x43, 0x49, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, - 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, - 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x45, 0x0a, 0x09, 0x70, - 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x6f, 0x70, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x70, 0x73, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x4f, - 0x70, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, - 0x64, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, - 0x6f, 0x64, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x43, - 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x22, 0x4b, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4f, 0x70, 0x73, 0x12, - 0x3f, 0x0a, 0x03, 0x6f, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, - 0x6f, 0x6f, 0x66, 0x4f, 0x70, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x03, 0x6f, 0x70, 0x73, - 0x32, 0xaf, 0x0a, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa9, 0x01, 0x0a, - 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x32, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6e, - 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0xa4, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, - 0x53, 0x79, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, - 0x79, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x62, 0x61, 0x73, 0x65, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x12, - 0xb6, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x12, 0x35, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, - 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x73, 0x2f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x12, 0xbe, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x37, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x42, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, - 0x2f, 0x7b, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, 0x12, 0xd2, 0x01, 0x0a, 0x15, 0x47, 0x65, - 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x53, 0x65, 0x74, 0x12, 0x3c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x3d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x12, 0xda, - 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, - 0x65, 0x74, 0x42, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x3e, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x42, 0x79, 0x48, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x42, 0x79, 0x48, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, - 0x65, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x65, - 0x74, 0x73, 0x2f, 0x7b, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, 0x12, 0xa4, 0x01, 0x0a, 0x09, - 0x41, 0x42, 0x43, 0x49, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x42, 0x43, 0x49, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x42, 0x43, - 0x49, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x62, 0x61, 0x73, 0x65, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x62, 0x63, 0x69, 0x5f, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x42, 0x8e, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, - 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, 0x54, - 0xaa, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x2e, 0x54, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xca, 0x02, 0x1e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, - 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0xe2, 0x02, 0x2a, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, - 0x5c, 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x21, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x42, 0x61, 0x73, 0x65, 0x3a, 0x3a, - 0x54, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_base_tendermint_v1beta1_query_proto_rawDescOnce sync.Once - file_cosmos_base_tendermint_v1beta1_query_proto_rawDescData = file_cosmos_base_tendermint_v1beta1_query_proto_rawDesc -) - -func file_cosmos_base_tendermint_v1beta1_query_proto_rawDescGZIP() []byte { - file_cosmos_base_tendermint_v1beta1_query_proto_rawDescOnce.Do(func() { - file_cosmos_base_tendermint_v1beta1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_base_tendermint_v1beta1_query_proto_rawDescData) - }) - return file_cosmos_base_tendermint_v1beta1_query_proto_rawDescData -} - -var file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 19) -var file_cosmos_base_tendermint_v1beta1_query_proto_goTypes = []interface{}{ - (*GetValidatorSetByHeightRequest)(nil), // 0: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest - (*GetValidatorSetByHeightResponse)(nil), // 1: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse - (*GetLatestValidatorSetRequest)(nil), // 2: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest - (*GetLatestValidatorSetResponse)(nil), // 3: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse - (*Validator)(nil), // 4: cosmos.base.tendermint.v1beta1.Validator - (*GetBlockByHeightRequest)(nil), // 5: cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest - (*GetBlockByHeightResponse)(nil), // 6: cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse - (*GetLatestBlockRequest)(nil), // 7: cosmos.base.tendermint.v1beta1.GetLatestBlockRequest - (*GetLatestBlockResponse)(nil), // 8: cosmos.base.tendermint.v1beta1.GetLatestBlockResponse - (*GetSyncingRequest)(nil), // 9: cosmos.base.tendermint.v1beta1.GetSyncingRequest - (*GetSyncingResponse)(nil), // 10: cosmos.base.tendermint.v1beta1.GetSyncingResponse - (*GetNodeInfoRequest)(nil), // 11: cosmos.base.tendermint.v1beta1.GetNodeInfoRequest - (*GetNodeInfoResponse)(nil), // 12: cosmos.base.tendermint.v1beta1.GetNodeInfoResponse - (*VersionInfo)(nil), // 13: cosmos.base.tendermint.v1beta1.VersionInfo - (*Module)(nil), // 14: cosmos.base.tendermint.v1beta1.Module - (*ABCIQueryRequest)(nil), // 15: cosmos.base.tendermint.v1beta1.ABCIQueryRequest - (*ABCIQueryResponse)(nil), // 16: cosmos.base.tendermint.v1beta1.ABCIQueryResponse - (*ProofOp)(nil), // 17: cosmos.base.tendermint.v1beta1.ProofOp - (*ProofOps)(nil), // 18: cosmos.base.tendermint.v1beta1.ProofOps - (*v1beta1.PageRequest)(nil), // 19: cosmos.base.query.v1beta1.PageRequest - (*v1beta1.PageResponse)(nil), // 20: cosmos.base.query.v1beta1.PageResponse - (*anypb.Any)(nil), // 21: google.protobuf.Any - (*types.BlockID)(nil), // 22: tendermint.types.BlockID - (*types.Block)(nil), // 23: tendermint.types.Block - (*p2p.NodeInfo)(nil), // 24: tendermint.p2p.NodeInfo -} -var file_cosmos_base_tendermint_v1beta1_query_proto_depIdxs = []int32{ - 19, // 0: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 4, // 1: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.validators:type_name -> cosmos.base.tendermint.v1beta1.Validator - 20, // 2: cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 19, // 3: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 4, // 4: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.validators:type_name -> cosmos.base.tendermint.v1beta1.Validator - 20, // 5: cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 21, // 6: cosmos.base.tendermint.v1beta1.Validator.pub_key:type_name -> google.protobuf.Any - 22, // 7: cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block_id:type_name -> tendermint.types.BlockID - 23, // 8: cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block:type_name -> tendermint.types.Block - 22, // 9: cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block_id:type_name -> tendermint.types.BlockID - 23, // 10: cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block:type_name -> tendermint.types.Block - 24, // 11: cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.node_info:type_name -> tendermint.p2p.NodeInfo - 13, // 12: cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.application_version:type_name -> cosmos.base.tendermint.v1beta1.VersionInfo - 14, // 13: cosmos.base.tendermint.v1beta1.VersionInfo.build_deps:type_name -> cosmos.base.tendermint.v1beta1.Module - 18, // 14: cosmos.base.tendermint.v1beta1.ABCIQueryResponse.proof_ops:type_name -> cosmos.base.tendermint.v1beta1.ProofOps - 17, // 15: cosmos.base.tendermint.v1beta1.ProofOps.ops:type_name -> cosmos.base.tendermint.v1beta1.ProofOp - 11, // 16: cosmos.base.tendermint.v1beta1.Service.GetNodeInfo:input_type -> cosmos.base.tendermint.v1beta1.GetNodeInfoRequest - 9, // 17: cosmos.base.tendermint.v1beta1.Service.GetSyncing:input_type -> cosmos.base.tendermint.v1beta1.GetSyncingRequest - 7, // 18: cosmos.base.tendermint.v1beta1.Service.GetLatestBlock:input_type -> cosmos.base.tendermint.v1beta1.GetLatestBlockRequest - 5, // 19: cosmos.base.tendermint.v1beta1.Service.GetBlockByHeight:input_type -> cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest - 2, // 20: cosmos.base.tendermint.v1beta1.Service.GetLatestValidatorSet:input_type -> cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest - 0, // 21: cosmos.base.tendermint.v1beta1.Service.GetValidatorSetByHeight:input_type -> cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest - 15, // 22: cosmos.base.tendermint.v1beta1.Service.ABCIQuery:input_type -> cosmos.base.tendermint.v1beta1.ABCIQueryRequest - 12, // 23: cosmos.base.tendermint.v1beta1.Service.GetNodeInfo:output_type -> cosmos.base.tendermint.v1beta1.GetNodeInfoResponse - 10, // 24: cosmos.base.tendermint.v1beta1.Service.GetSyncing:output_type -> cosmos.base.tendermint.v1beta1.GetSyncingResponse - 8, // 25: cosmos.base.tendermint.v1beta1.Service.GetLatestBlock:output_type -> cosmos.base.tendermint.v1beta1.GetLatestBlockResponse - 6, // 26: cosmos.base.tendermint.v1beta1.Service.GetBlockByHeight:output_type -> cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse - 3, // 27: cosmos.base.tendermint.v1beta1.Service.GetLatestValidatorSet:output_type -> cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse - 1, // 28: cosmos.base.tendermint.v1beta1.Service.GetValidatorSetByHeight:output_type -> cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse - 16, // 29: cosmos.base.tendermint.v1beta1.Service.ABCIQuery:output_type -> cosmos.base.tendermint.v1beta1.ABCIQueryResponse - 23, // [23:30] is the sub-list for method output_type - 16, // [16:23] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name -} - -func init() { file_cosmos_base_tendermint_v1beta1_query_proto_init() } -func file_cosmos_base_tendermint_v1beta1_query_proto_init() { - if File_cosmos_base_tendermint_v1beta1_query_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetValidatorSetByHeightRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetValidatorSetByHeightResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLatestValidatorSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLatestValidatorSetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Validator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBlockByHeightRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBlockByHeightResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLatestBlockRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLatestBlockResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSyncingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSyncingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNodeInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNodeInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VersionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Module); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ABCIQueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ABCIQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProofOp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProofOps); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_base_tendermint_v1beta1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 19, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_base_tendermint_v1beta1_query_proto_goTypes, - DependencyIndexes: file_cosmos_base_tendermint_v1beta1_query_proto_depIdxs, - MessageInfos: file_cosmos_base_tendermint_v1beta1_query_proto_msgTypes, - }.Build() - File_cosmos_base_tendermint_v1beta1_query_proto = out.File - file_cosmos_base_tendermint_v1beta1_query_proto_rawDesc = nil - file_cosmos_base_tendermint_v1beta1_query_proto_goTypes = nil - file_cosmos_base_tendermint_v1beta1_query_proto_depIdxs = nil -} diff --git a/api/cosmos/base/tendermint/v1beta1/query_grpc.pb.go b/api/cosmos/base/tendermint/v1beta1/query_grpc.pb.go deleted file mode 100644 index b21c4f7f8459..000000000000 --- a/api/cosmos/base/tendermint/v1beta1/query_grpc.pb.go +++ /dev/null @@ -1,343 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/base/tendermint/v1beta1/query.proto - -package tendermintv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// ServiceClient is the client API for Service service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type ServiceClient interface { - // GetNodeInfo queries the current node info. - GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoResponse, error) - // GetSyncing queries node syncing. - GetSyncing(ctx context.Context, in *GetSyncingRequest, opts ...grpc.CallOption) (*GetSyncingResponse, error) - // GetLatestBlock returns the latest block. - GetLatestBlock(ctx context.Context, in *GetLatestBlockRequest, opts ...grpc.CallOption) (*GetLatestBlockResponse, error) - // GetBlockByHeight queries block for given height. - GetBlockByHeight(ctx context.Context, in *GetBlockByHeightRequest, opts ...grpc.CallOption) (*GetBlockByHeightResponse, error) - // GetLatestValidatorSet queries latest validator-set. - GetLatestValidatorSet(ctx context.Context, in *GetLatestValidatorSetRequest, opts ...grpc.CallOption) (*GetLatestValidatorSetResponse, error) - // GetValidatorSetByHeight queries validator-set at a given height. - GetValidatorSetByHeight(ctx context.Context, in *GetValidatorSetByHeightRequest, opts ...grpc.CallOption) (*GetValidatorSetByHeightResponse, error) - // ABCIQuery defines a query handler that supports ABCI queries directly to the - // application, bypassing Tendermint completely. The ABCI query must contain - // a valid and supported path, including app, custom, p2p, and store. - // - // Since: cosmos-sdk 0.46 - ABCIQuery(ctx context.Context, in *ABCIQueryRequest, opts ...grpc.CallOption) (*ABCIQueryResponse, error) -} - -type serviceClient struct { - cc grpc.ClientConnInterface -} - -func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient { - return &serviceClient{cc} -} - -func (c *serviceClient) GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoResponse, error) { - out := new(GetNodeInfoResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.tendermint.v1beta1.Service/GetNodeInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) GetSyncing(ctx context.Context, in *GetSyncingRequest, opts ...grpc.CallOption) (*GetSyncingResponse, error) { - out := new(GetSyncingResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.tendermint.v1beta1.Service/GetSyncing", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) GetLatestBlock(ctx context.Context, in *GetLatestBlockRequest, opts ...grpc.CallOption) (*GetLatestBlockResponse, error) { - out := new(GetLatestBlockResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.tendermint.v1beta1.Service/GetLatestBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) GetBlockByHeight(ctx context.Context, in *GetBlockByHeightRequest, opts ...grpc.CallOption) (*GetBlockByHeightResponse, error) { - out := new(GetBlockByHeightResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) GetLatestValidatorSet(ctx context.Context, in *GetLatestValidatorSetRequest, opts ...grpc.CallOption) (*GetLatestValidatorSetResponse, error) { - out := new(GetLatestValidatorSetResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) GetValidatorSetByHeight(ctx context.Context, in *GetValidatorSetByHeightRequest, opts ...grpc.CallOption) (*GetValidatorSetByHeightResponse, error) { - out := new(GetValidatorSetByHeightResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) ABCIQuery(ctx context.Context, in *ABCIQueryRequest, opts ...grpc.CallOption) (*ABCIQueryResponse, error) { - out := new(ABCIQueryResponse) - err := c.cc.Invoke(ctx, "/cosmos.base.tendermint.v1beta1.Service/ABCIQuery", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ServiceServer is the server API for Service service. -// All implementations must embed UnimplementedServiceServer -// for forward compatibility -type ServiceServer interface { - // GetNodeInfo queries the current node info. - GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error) - // GetSyncing queries node syncing. - GetSyncing(context.Context, *GetSyncingRequest) (*GetSyncingResponse, error) - // GetLatestBlock returns the latest block. - GetLatestBlock(context.Context, *GetLatestBlockRequest) (*GetLatestBlockResponse, error) - // GetBlockByHeight queries block for given height. - GetBlockByHeight(context.Context, *GetBlockByHeightRequest) (*GetBlockByHeightResponse, error) - // GetLatestValidatorSet queries latest validator-set. - GetLatestValidatorSet(context.Context, *GetLatestValidatorSetRequest) (*GetLatestValidatorSetResponse, error) - // GetValidatorSetByHeight queries validator-set at a given height. - GetValidatorSetByHeight(context.Context, *GetValidatorSetByHeightRequest) (*GetValidatorSetByHeightResponse, error) - // ABCIQuery defines a query handler that supports ABCI queries directly to the - // application, bypassing Tendermint completely. The ABCI query must contain - // a valid and supported path, including app, custom, p2p, and store. - // - // Since: cosmos-sdk 0.46 - ABCIQuery(context.Context, *ABCIQueryRequest) (*ABCIQueryResponse, error) - mustEmbedUnimplementedServiceServer() -} - -// UnimplementedServiceServer must be embedded to have forward compatible implementations. -type UnimplementedServiceServer struct { -} - -func (UnimplementedServiceServer) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNodeInfo not implemented") -} -func (UnimplementedServiceServer) GetSyncing(context.Context, *GetSyncingRequest) (*GetSyncingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSyncing not implemented") -} -func (UnimplementedServiceServer) GetLatestBlock(context.Context, *GetLatestBlockRequest) (*GetLatestBlockResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetLatestBlock not implemented") -} -func (UnimplementedServiceServer) GetBlockByHeight(context.Context, *GetBlockByHeightRequest) (*GetBlockByHeightResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockByHeight not implemented") -} -func (UnimplementedServiceServer) GetLatestValidatorSet(context.Context, *GetLatestValidatorSetRequest) (*GetLatestValidatorSetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetLatestValidatorSet not implemented") -} -func (UnimplementedServiceServer) GetValidatorSetByHeight(context.Context, *GetValidatorSetByHeightRequest) (*GetValidatorSetByHeightResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetValidatorSetByHeight not implemented") -} -func (UnimplementedServiceServer) ABCIQuery(context.Context, *ABCIQueryRequest) (*ABCIQueryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ABCIQuery not implemented") -} -func (UnimplementedServiceServer) mustEmbedUnimplementedServiceServer() {} - -// UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ServiceServer will -// result in compilation errors. -type UnsafeServiceServer interface { - mustEmbedUnimplementedServiceServer() -} - -func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer) { - s.RegisterService(&Service_ServiceDesc, srv) -} - -func _Service_GetNodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNodeInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetNodeInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.tendermint.v1beta1.Service/GetNodeInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetNodeInfo(ctx, req.(*GetNodeInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_GetSyncing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSyncingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetSyncing(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.tendermint.v1beta1.Service/GetSyncing", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetSyncing(ctx, req.(*GetSyncingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_GetLatestBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetLatestBlockRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetLatestBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.tendermint.v1beta1.Service/GetLatestBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetLatestBlock(ctx, req.(*GetLatestBlockRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_GetBlockByHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBlockByHeightRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetBlockByHeight(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetBlockByHeight(ctx, req.(*GetBlockByHeightRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_GetLatestValidatorSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetLatestValidatorSetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetLatestValidatorSet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetLatestValidatorSet(ctx, req.(*GetLatestValidatorSetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_GetValidatorSetByHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetValidatorSetByHeightRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetValidatorSetByHeight(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetValidatorSetByHeight(ctx, req.(*GetValidatorSetByHeightRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_ABCIQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ABCIQueryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).ABCIQuery(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.base.tendermint.v1beta1.Service/ABCIQuery", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).ABCIQuery(ctx, req.(*ABCIQueryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Service_ServiceDesc is the grpc.ServiceDesc for Service service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Service_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.base.tendermint.v1beta1.Service", - HandlerType: (*ServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetNodeInfo", - Handler: _Service_GetNodeInfo_Handler, - }, - { - MethodName: "GetSyncing", - Handler: _Service_GetSyncing_Handler, - }, - { - MethodName: "GetLatestBlock", - Handler: _Service_GetLatestBlock_Handler, - }, - { - MethodName: "GetBlockByHeight", - Handler: _Service_GetBlockByHeight_Handler, - }, - { - MethodName: "GetLatestValidatorSet", - Handler: _Service_GetLatestValidatorSet_Handler, - }, - { - MethodName: "GetValidatorSetByHeight", - Handler: _Service_GetValidatorSetByHeight_Handler, - }, - { - MethodName: "ABCIQuery", - Handler: _Service_ABCIQuery_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/base/tendermint/v1beta1/query.proto", -} diff --git a/api/cosmos/gov/v1/genesis.pulsar.go b/api/cosmos/gov/v1/genesis.pulsar.go index 147979b91962..56fa30e58d89 100644 --- a/api/cosmos/gov/v1/genesis.pulsar.go +++ b/api/cosmos/gov/v1/genesis.pulsar.go @@ -171,9 +171,7 @@ var ( fd_GenesisState_deposits protoreflect.FieldDescriptor fd_GenesisState_votes protoreflect.FieldDescriptor fd_GenesisState_proposals protoreflect.FieldDescriptor - fd_GenesisState_deposit_params protoreflect.FieldDescriptor - fd_GenesisState_voting_params protoreflect.FieldDescriptor - fd_GenesisState_tally_params protoreflect.FieldDescriptor + fd_GenesisState_params protoreflect.FieldDescriptor ) func init() { @@ -183,9 +181,7 @@ func init() { fd_GenesisState_deposits = md_GenesisState.Fields().ByName("deposits") fd_GenesisState_votes = md_GenesisState.Fields().ByName("votes") fd_GenesisState_proposals = md_GenesisState.Fields().ByName("proposals") - fd_GenesisState_deposit_params = md_GenesisState.Fields().ByName("deposit_params") - fd_GenesisState_voting_params = md_GenesisState.Fields().ByName("voting_params") - fd_GenesisState_tally_params = md_GenesisState.Fields().ByName("tally_params") + fd_GenesisState_params = md_GenesisState.Fields().ByName("params") } var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) @@ -277,21 +273,9 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, return } } - if x.DepositParams != nil { - value := protoreflect.ValueOfMessage(x.DepositParams.ProtoReflect()) - if !f(fd_GenesisState_deposit_params, value) { - return - } - } - if x.VotingParams != nil { - value := protoreflect.ValueOfMessage(x.VotingParams.ProtoReflect()) - if !f(fd_GenesisState_voting_params, value) { - return - } - } - if x.TallyParams != nil { - value := protoreflect.ValueOfMessage(x.TallyParams.ProtoReflect()) - if !f(fd_GenesisState_tally_params, value) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_GenesisState_params, value) { return } } @@ -318,12 +302,8 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool return len(x.Votes) != 0 case "cosmos.gov.v1.GenesisState.proposals": return len(x.Proposals) != 0 - case "cosmos.gov.v1.GenesisState.deposit_params": - return x.DepositParams != nil - case "cosmos.gov.v1.GenesisState.voting_params": - return x.VotingParams != nil - case "cosmos.gov.v1.GenesisState.tally_params": - return x.TallyParams != nil + case "cosmos.gov.v1.GenesisState.params": + return x.Params != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.GenesisState")) @@ -348,12 +328,8 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { x.Votes = nil case "cosmos.gov.v1.GenesisState.proposals": x.Proposals = nil - case "cosmos.gov.v1.GenesisState.deposit_params": - x.DepositParams = nil - case "cosmos.gov.v1.GenesisState.voting_params": - x.VotingParams = nil - case "cosmos.gov.v1.GenesisState.tally_params": - x.TallyParams = nil + case "cosmos.gov.v1.GenesisState.params": + x.Params = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.GenesisState")) @@ -391,14 +367,8 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto } listValue := &_GenesisState_4_list{list: &x.Proposals} return protoreflect.ValueOfList(listValue) - case "cosmos.gov.v1.GenesisState.deposit_params": - value := x.DepositParams - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1.GenesisState.voting_params": - value := x.VotingParams - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1.GenesisState.tally_params": - value := x.TallyParams + case "cosmos.gov.v1.GenesisState.params": + value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { @@ -434,12 +404,8 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value lv := value.List() clv := lv.(*_GenesisState_4_list) x.Proposals = *clv.list - case "cosmos.gov.v1.GenesisState.deposit_params": - x.DepositParams = value.Message().Interface().(*DepositParams) - case "cosmos.gov.v1.GenesisState.voting_params": - x.VotingParams = value.Message().Interface().(*VotingParams) - case "cosmos.gov.v1.GenesisState.tally_params": - x.TallyParams = value.Message().Interface().(*TallyParams) + case "cosmos.gov.v1.GenesisState.params": + x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.GenesisState")) @@ -478,21 +444,11 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p } value := &_GenesisState_4_list{list: &x.Proposals} return protoreflect.ValueOfList(value) - case "cosmos.gov.v1.GenesisState.deposit_params": - if x.DepositParams == nil { - x.DepositParams = new(DepositParams) - } - return protoreflect.ValueOfMessage(x.DepositParams.ProtoReflect()) - case "cosmos.gov.v1.GenesisState.voting_params": - if x.VotingParams == nil { - x.VotingParams = new(VotingParams) + case "cosmos.gov.v1.GenesisState.params": + if x.Params == nil { + x.Params = new(Params) } - return protoreflect.ValueOfMessage(x.VotingParams.ProtoReflect()) - case "cosmos.gov.v1.GenesisState.tally_params": - if x.TallyParams == nil { - x.TallyParams = new(TallyParams) - } - return protoreflect.ValueOfMessage(x.TallyParams.ProtoReflect()) + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) case "cosmos.gov.v1.GenesisState.starting_proposal_id": panic(fmt.Errorf("field starting_proposal_id of message cosmos.gov.v1.GenesisState is not mutable")) default: @@ -519,14 +475,8 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) case "cosmos.gov.v1.GenesisState.proposals": list := []*Proposal{} return protoreflect.ValueOfList(&_GenesisState_4_list{list: &list}) - case "cosmos.gov.v1.GenesisState.deposit_params": - m := new(DepositParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1.GenesisState.voting_params": - m := new(VotingParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1.GenesisState.tally_params": - m := new(TallyParams) + case "cosmos.gov.v1.GenesisState.params": + m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { @@ -618,16 +568,8 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } - if x.DepositParams != nil { - l = options.Size(x.DepositParams) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.VotingParams != nil { - l = options.Size(x.VotingParams) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.TallyParams != nil { - l = options.Size(x.TallyParams) + if x.Params != nil { + l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -659,36 +601,8 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.TallyParams != nil { - encoded, err := options.Marshal(x.TallyParams) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - if x.VotingParams != nil { - encoded, err := options.Marshal(x.VotingParams) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - if x.DepositParams != nil { - encoded, err := options.Marshal(x.DepositParams) + if x.Params != nil { + encoded, err := options.Marshal(x.Params) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -926,43 +840,7 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 5: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DepositParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.DepositParams == nil { - x.DepositParams = &DepositParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DepositParams); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VotingParams", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -989,46 +867,10 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.VotingParams == nil { - x.VotingParams = &VotingParams{} + if x.Params == nil { + x.Params = &Params{} } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VotingParams); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TallyParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.TallyParams == nil { - x.TallyParams = &TallyParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TallyParams); err != nil { + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -1096,12 +938,8 @@ type GenesisState struct { Votes []*Vote `protobuf:"bytes,3,rep,name=votes,proto3" json:"votes,omitempty"` // proposals defines all the proposals present at genesis. Proposals []*Proposal `protobuf:"bytes,4,rep,name=proposals,proto3" json:"proposals,omitempty"` - // params defines all the paramaters of related to deposit. - DepositParams *DepositParams `protobuf:"bytes,5,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"` - // params defines all the paramaters of related to voting. - VotingParams *VotingParams `protobuf:"bytes,6,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"` - // params defines all the paramaters of related to tally. - TallyParams *TallyParams `protobuf:"bytes,7,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` + // params defines all the paramaters of x/gov module. + Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` } func (x *GenesisState) Reset() { @@ -1152,23 +990,9 @@ func (x *GenesisState) GetProposals() []*Proposal { return nil } -func (x *GenesisState) GetDepositParams() *DepositParams { - if x != nil { - return x.DepositParams - } - return nil -} - -func (x *GenesisState) GetVotingParams() *VotingParams { - if x != nil { - return x.VotingParams - } - return nil -} - -func (x *GenesisState) GetTallyParams() *TallyParams { +func (x *GenesisState) GetParams() *Params { if x != nil { - return x.TallyParams + return x.Params } return nil } @@ -1180,7 +1004,7 @@ var file_cosmos_gov_v1_genesis_proto_rawDesc = []byte{ 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x76, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x03, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x02, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, @@ -1193,30 +1017,21 @@ var file_cosmos_gov_v1_genesis_proto_rawDesc = []byte{ 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x43, - 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x69, 0x6e, - 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x42, 0x9d, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, - 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x61, 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x2d, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x9d, 0x01, + 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, + 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, + 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, + 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, + 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1233,26 +1048,22 @@ func file_cosmos_gov_v1_genesis_proto_rawDescGZIP() []byte { var file_cosmos_gov_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_cosmos_gov_v1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: cosmos.gov.v1.GenesisState - (*Deposit)(nil), // 1: cosmos.gov.v1.Deposit - (*Vote)(nil), // 2: cosmos.gov.v1.Vote - (*Proposal)(nil), // 3: cosmos.gov.v1.Proposal - (*DepositParams)(nil), // 4: cosmos.gov.v1.DepositParams - (*VotingParams)(nil), // 5: cosmos.gov.v1.VotingParams - (*TallyParams)(nil), // 6: cosmos.gov.v1.TallyParams + (*GenesisState)(nil), // 0: cosmos.gov.v1.GenesisState + (*Deposit)(nil), // 1: cosmos.gov.v1.Deposit + (*Vote)(nil), // 2: cosmos.gov.v1.Vote + (*Proposal)(nil), // 3: cosmos.gov.v1.Proposal + (*Params)(nil), // 4: cosmos.gov.v1.Params } var file_cosmos_gov_v1_genesis_proto_depIdxs = []int32{ 1, // 0: cosmos.gov.v1.GenesisState.deposits:type_name -> cosmos.gov.v1.Deposit 2, // 1: cosmos.gov.v1.GenesisState.votes:type_name -> cosmos.gov.v1.Vote 3, // 2: cosmos.gov.v1.GenesisState.proposals:type_name -> cosmos.gov.v1.Proposal - 4, // 3: cosmos.gov.v1.GenesisState.deposit_params:type_name -> cosmos.gov.v1.DepositParams - 5, // 4: cosmos.gov.v1.GenesisState.voting_params:type_name -> cosmos.gov.v1.VotingParams - 6, // 5: cosmos.gov.v1.GenesisState.tally_params:type_name -> cosmos.gov.v1.TallyParams - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 4, // 3: cosmos.gov.v1.GenesisState.params:type_name -> cosmos.gov.v1.Params + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_cosmos_gov_v1_genesis_proto_init() } diff --git a/api/cosmos/gov/v1/gov.pulsar.go b/api/cosmos/gov/v1/gov.pulsar.go index 3506e799b877..32da270571fa 100644 --- a/api/cosmos/gov/v1/gov.pulsar.go +++ b/api/cosmos/gov/v1/gov.pulsar.go @@ -5117,6 +5117,850 @@ func (x *fastReflection_TallyParams) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.List = (*_Params_1_list)(nil) + +type _Params_1_list struct { + list *[]*v1beta1.Coin +} + +func (x *_Params_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Params_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Params_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_Params_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Params_1_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Params_1_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Params protoreflect.MessageDescriptor + fd_Params_min_deposit protoreflect.FieldDescriptor + fd_Params_max_deposit_period protoreflect.FieldDescriptor + fd_Params_voting_period protoreflect.FieldDescriptor + fd_Params_quorum protoreflect.FieldDescriptor + fd_Params_threshold protoreflect.FieldDescriptor + fd_Params_veto_threshold protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_gov_v1_gov_proto_init() + md_Params = File_cosmos_gov_v1_gov_proto.Messages().ByName("Params") + fd_Params_min_deposit = md_Params.Fields().ByName("min_deposit") + fd_Params_max_deposit_period = md_Params.Fields().ByName("max_deposit_period") + fd_Params_voting_period = md_Params.Fields().ByName("voting_period") + fd_Params_quorum = md_Params.Fields().ByName("quorum") + fd_Params_threshold = md_Params.Fields().ByName("threshold") + fd_Params_veto_threshold = md_Params.Fields().ByName("veto_threshold") +} + +var _ protoreflect.Message = (*fastReflection_Params)(nil) + +type fastReflection_Params Params + +func (x *Params) ProtoReflect() protoreflect.Message { + return (*fastReflection_Params)(x) +} + +func (x *Params) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_gov_v1_gov_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Params_messageType fastReflection_Params_messageType +var _ protoreflect.MessageType = fastReflection_Params_messageType{} + +type fastReflection_Params_messageType struct{} + +func (x fastReflection_Params_messageType) Zero() protoreflect.Message { + return (*fastReflection_Params)(nil) +} +func (x fastReflection_Params_messageType) New() protoreflect.Message { + return new(fastReflection_Params) +} +func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Params) Type() protoreflect.MessageType { + return _fastReflection_Params_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Params) New() protoreflect.Message { + return new(fastReflection_Params) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { + return (*Params)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.MinDeposit) != 0 { + value := protoreflect.ValueOfList(&_Params_1_list{list: &x.MinDeposit}) + if !f(fd_Params_min_deposit, value) { + return + } + } + if x.MaxDepositPeriod != nil { + value := protoreflect.ValueOfMessage(x.MaxDepositPeriod.ProtoReflect()) + if !f(fd_Params_max_deposit_period, value) { + return + } + } + if x.VotingPeriod != nil { + value := protoreflect.ValueOfMessage(x.VotingPeriod.ProtoReflect()) + if !f(fd_Params_voting_period, value) { + return + } + } + if x.Quorum != "" { + value := protoreflect.ValueOfString(x.Quorum) + if !f(fd_Params_quorum, value) { + return + } + } + if x.Threshold != "" { + value := protoreflect.ValueOfString(x.Threshold) + if !f(fd_Params_threshold, value) { + return + } + } + if x.VetoThreshold != "" { + value := protoreflect.ValueOfString(x.VetoThreshold) + if !f(fd_Params_veto_threshold, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.gov.v1.Params.min_deposit": + return len(x.MinDeposit) != 0 + case "cosmos.gov.v1.Params.max_deposit_period": + return x.MaxDepositPeriod != nil + case "cosmos.gov.v1.Params.voting_period": + return x.VotingPeriod != nil + case "cosmos.gov.v1.Params.quorum": + return x.Quorum != "" + case "cosmos.gov.v1.Params.threshold": + return x.Threshold != "" + case "cosmos.gov.v1.Params.veto_threshold": + return x.VetoThreshold != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) + } + panic(fmt.Errorf("message cosmos.gov.v1.Params does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.gov.v1.Params.min_deposit": + x.MinDeposit = nil + case "cosmos.gov.v1.Params.max_deposit_period": + x.MaxDepositPeriod = nil + case "cosmos.gov.v1.Params.voting_period": + x.VotingPeriod = nil + case "cosmos.gov.v1.Params.quorum": + x.Quorum = "" + case "cosmos.gov.v1.Params.threshold": + x.Threshold = "" + case "cosmos.gov.v1.Params.veto_threshold": + x.VetoThreshold = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) + } + panic(fmt.Errorf("message cosmos.gov.v1.Params does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.gov.v1.Params.min_deposit": + if len(x.MinDeposit) == 0 { + return protoreflect.ValueOfList(&_Params_1_list{}) + } + listValue := &_Params_1_list{list: &x.MinDeposit} + return protoreflect.ValueOfList(listValue) + case "cosmos.gov.v1.Params.max_deposit_period": + value := x.MaxDepositPeriod + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.gov.v1.Params.voting_period": + value := x.VotingPeriod + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.gov.v1.Params.quorum": + value := x.Quorum + return protoreflect.ValueOfString(value) + case "cosmos.gov.v1.Params.threshold": + value := x.Threshold + return protoreflect.ValueOfString(value) + case "cosmos.gov.v1.Params.veto_threshold": + value := x.VetoThreshold + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) + } + panic(fmt.Errorf("message cosmos.gov.v1.Params does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.gov.v1.Params.min_deposit": + lv := value.List() + clv := lv.(*_Params_1_list) + x.MinDeposit = *clv.list + case "cosmos.gov.v1.Params.max_deposit_period": + x.MaxDepositPeriod = value.Message().Interface().(*durationpb.Duration) + case "cosmos.gov.v1.Params.voting_period": + x.VotingPeriod = value.Message().Interface().(*durationpb.Duration) + case "cosmos.gov.v1.Params.quorum": + x.Quorum = value.Interface().(string) + case "cosmos.gov.v1.Params.threshold": + x.Threshold = value.Interface().(string) + case "cosmos.gov.v1.Params.veto_threshold": + x.VetoThreshold = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) + } + panic(fmt.Errorf("message cosmos.gov.v1.Params does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.gov.v1.Params.min_deposit": + if x.MinDeposit == nil { + x.MinDeposit = []*v1beta1.Coin{} + } + value := &_Params_1_list{list: &x.MinDeposit} + return protoreflect.ValueOfList(value) + case "cosmos.gov.v1.Params.max_deposit_period": + if x.MaxDepositPeriod == nil { + x.MaxDepositPeriod = new(durationpb.Duration) + } + return protoreflect.ValueOfMessage(x.MaxDepositPeriod.ProtoReflect()) + case "cosmos.gov.v1.Params.voting_period": + if x.VotingPeriod == nil { + x.VotingPeriod = new(durationpb.Duration) + } + return protoreflect.ValueOfMessage(x.VotingPeriod.ProtoReflect()) + case "cosmos.gov.v1.Params.quorum": + panic(fmt.Errorf("field quorum of message cosmos.gov.v1.Params is not mutable")) + case "cosmos.gov.v1.Params.threshold": + panic(fmt.Errorf("field threshold of message cosmos.gov.v1.Params is not mutable")) + case "cosmos.gov.v1.Params.veto_threshold": + panic(fmt.Errorf("field veto_threshold of message cosmos.gov.v1.Params is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) + } + panic(fmt.Errorf("message cosmos.gov.v1.Params does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.gov.v1.Params.min_deposit": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_Params_1_list{list: &list}) + case "cosmos.gov.v1.Params.max_deposit_period": + m := new(durationpb.Duration) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.gov.v1.Params.voting_period": + m := new(durationpb.Duration) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.gov.v1.Params.quorum": + return protoreflect.ValueOfString("") + case "cosmos.gov.v1.Params.threshold": + return protoreflect.ValueOfString("") + case "cosmos.gov.v1.Params.veto_threshold": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) + } + panic(fmt.Errorf("message cosmos.gov.v1.Params does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.Params", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Params) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Params) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.MinDeposit) > 0 { + for _, e := range x.MinDeposit { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.MaxDepositPeriod != nil { + l = options.Size(x.MaxDepositPeriod) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.VotingPeriod != nil { + l = options.Size(x.VotingPeriod) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Quorum) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Threshold) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.VetoThreshold) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Params) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.VetoThreshold) > 0 { + i -= len(x.VetoThreshold) + copy(dAtA[i:], x.VetoThreshold) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.VetoThreshold))) + i-- + dAtA[i] = 0x32 + } + if len(x.Threshold) > 0 { + i -= len(x.Threshold) + copy(dAtA[i:], x.Threshold) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Threshold))) + i-- + dAtA[i] = 0x2a + } + if len(x.Quorum) > 0 { + i -= len(x.Quorum) + copy(dAtA[i:], x.Quorum) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Quorum))) + i-- + dAtA[i] = 0x22 + } + if x.VotingPeriod != nil { + encoded, err := options.Marshal(x.VotingPeriod) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if x.MaxDepositPeriod != nil { + encoded, err := options.Marshal(x.MaxDepositPeriod) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.MinDeposit) > 0 { + for iNdEx := len(x.MinDeposit) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.MinDeposit[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Params) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinDeposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.MinDeposit = append(x.MinDeposit, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MinDeposit[len(x.MinDeposit)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxDepositPeriod", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.MaxDepositPeriod == nil { + x.MaxDepositPeriod = &durationpb.Duration{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MaxDepositPeriod); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VotingPeriod", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.VotingPeriod == nil { + x.VotingPeriod = &durationpb.Duration{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VotingPeriod); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Quorum", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Quorum = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Threshold = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VetoThreshold", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.VetoThreshold = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Since: cosmos-sdk 0.46 // Code generated by protoc-gen-go. DO NOT EDIT. @@ -5735,6 +6579,91 @@ func (x *TallyParams) GetVetoThreshold() string { return "" } +// Params defines the parameters for the x/gov module. +type Params struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Minimum deposit for a proposal to enter voting period. + MinDeposit []*v1beta1.Coin `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3" json:"min_deposit,omitempty"` + // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + // months. + MaxDepositPeriod *durationpb.Duration `protobuf:"bytes,2,opt,name=max_deposit_period,json=maxDepositPeriod,proto3" json:"max_deposit_period,omitempty"` + // Length of the voting period. + VotingPeriod *durationpb.Duration `protobuf:"bytes,3,opt,name=voting_period,json=votingPeriod,proto3" json:"voting_period,omitempty"` + // Minimum percentage of total stake needed to vote for a result to be + // considered valid. + Quorum string `protobuf:"bytes,4,opt,name=quorum,proto3" json:"quorum,omitempty"` + // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. + Threshold string `protobuf:"bytes,5,opt,name=threshold,proto3" json:"threshold,omitempty"` + // Minimum value of Veto votes to Total votes ratio for proposal to be + // vetoed. Default value: 1/3. + VetoThreshold string `protobuf:"bytes,6,opt,name=veto_threshold,json=vetoThreshold,proto3" json:"veto_threshold,omitempty"` +} + +func (x *Params) Reset() { + *x = Params{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_gov_v1_gov_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Params) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Params) ProtoMessage() {} + +// Deprecated: Use Params.ProtoReflect.Descriptor instead. +func (*Params) Descriptor() ([]byte, []int) { + return file_cosmos_gov_v1_gov_proto_rawDescGZIP(), []int{8} +} + +func (x *Params) GetMinDeposit() []*v1beta1.Coin { + if x != nil { + return x.MinDeposit + } + return nil +} + +func (x *Params) GetMaxDepositPeriod() *durationpb.Duration { + if x != nil { + return x.MaxDepositPeriod + } + return nil +} + +func (x *Params) GetVotingPeriod() *durationpb.Duration { + if x != nil { + return x.VotingPeriod + } + return nil +} + +func (x *Params) GetQuorum() string { + if x != nil { + return x.Quorum + } + return "" +} + +func (x *Params) GetThreshold() string { + if x != nil { + return x.Threshold + } + return "" +} + +func (x *Params) GetVetoThreshold() string { + if x != nil { + return x.VetoThreshold + } + return "" +} + var File_cosmos_gov_v1_gov_proto protoreflect.FileDescriptor var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{ @@ -5864,39 +6793,70 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{ 0x18, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2a, 0x89, 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, - 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, 0x10, 0x02, - 0x12, 0x12, 0x0a, 0x0e, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x4e, 0x4f, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x56, 0x45, 0x54, 0x4f, - 0x10, 0x04, 0x2a, 0xce, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, - 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, - 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, - 0x54, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, - 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x4f, - 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, - 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, - 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, - 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, - 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, - 0x44, 0x10, 0x05, 0x42, 0x99, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x47, 0x6f, 0x76, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, - 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, - 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, - 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0xec, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x59, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, + 0x6e, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x15, 0x6d, 0x69, 0x6e, 0x5f, 0x64, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, + 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x6d, 0x0a, 0x12, + 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x24, 0xea, 0xde, 0x1f, 0x1c, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x2c, 0x6f, 0x6d, 0x69, 0x74, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x44, 0x0a, 0x0d, 0x76, + 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, + 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x12, 0x3a, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x22, 0xea, 0xde, 0x1f, 0x10, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2c, 0x6f, 0x6d, + 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x43, 0x0a, + 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x25, 0xea, 0xde, 0x1f, 0x13, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2c, + 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x12, 0x51, 0x0a, 0x0e, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xea, 0xde, 0x1f, 0x18, + 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2c, 0x6f, + 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, + 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2a, 0x89, 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x59, 0x45, 0x53, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, + 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x12, + 0x12, 0x0a, 0x0e, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, + 0x4f, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x56, 0x45, 0x54, 0x4f, 0x10, + 0x04, 0x2a, 0xce, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, + 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, + 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, + 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x4f, 0x54, + 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, + 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, + 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, + 0x43, 0x54, 0x45, 0x44, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, + 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, + 0x10, 0x05, 0x42, 0x99, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x47, 0x6f, 0x76, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, + 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, + 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5912,7 +6872,7 @@ func file_cosmos_gov_v1_gov_proto_rawDescGZIP() []byte { } var file_cosmos_gov_v1_gov_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_cosmos_gov_v1_gov_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_cosmos_gov_v1_gov_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_cosmos_gov_v1_gov_proto_goTypes = []interface{}{ (VoteOption)(0), // 0: cosmos.gov.v1.VoteOption (ProposalStatus)(0), // 1: cosmos.gov.v1.ProposalStatus @@ -5924,31 +6884,35 @@ var file_cosmos_gov_v1_gov_proto_goTypes = []interface{}{ (*DepositParams)(nil), // 7: cosmos.gov.v1.DepositParams (*VotingParams)(nil), // 8: cosmos.gov.v1.VotingParams (*TallyParams)(nil), // 9: cosmos.gov.v1.TallyParams - (*v1beta1.Coin)(nil), // 10: cosmos.base.v1beta1.Coin - (*anypb.Any)(nil), // 11: google.protobuf.Any - (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 13: google.protobuf.Duration + (*Params)(nil), // 10: cosmos.gov.v1.Params + (*v1beta1.Coin)(nil), // 11: cosmos.base.v1beta1.Coin + (*anypb.Any)(nil), // 12: google.protobuf.Any + (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 14: google.protobuf.Duration } var file_cosmos_gov_v1_gov_proto_depIdxs = []int32{ 0, // 0: cosmos.gov.v1.WeightedVoteOption.option:type_name -> cosmos.gov.v1.VoteOption - 10, // 1: cosmos.gov.v1.Deposit.amount:type_name -> cosmos.base.v1beta1.Coin - 11, // 2: cosmos.gov.v1.Proposal.messages:type_name -> google.protobuf.Any + 11, // 1: cosmos.gov.v1.Deposit.amount:type_name -> cosmos.base.v1beta1.Coin + 12, // 2: cosmos.gov.v1.Proposal.messages:type_name -> google.protobuf.Any 1, // 3: cosmos.gov.v1.Proposal.status:type_name -> cosmos.gov.v1.ProposalStatus 5, // 4: cosmos.gov.v1.Proposal.final_tally_result:type_name -> cosmos.gov.v1.TallyResult - 12, // 5: cosmos.gov.v1.Proposal.submit_time:type_name -> google.protobuf.Timestamp - 12, // 6: cosmos.gov.v1.Proposal.deposit_end_time:type_name -> google.protobuf.Timestamp - 10, // 7: cosmos.gov.v1.Proposal.total_deposit:type_name -> cosmos.base.v1beta1.Coin - 12, // 8: cosmos.gov.v1.Proposal.voting_start_time:type_name -> google.protobuf.Timestamp - 12, // 9: cosmos.gov.v1.Proposal.voting_end_time:type_name -> google.protobuf.Timestamp + 13, // 5: cosmos.gov.v1.Proposal.submit_time:type_name -> google.protobuf.Timestamp + 13, // 6: cosmos.gov.v1.Proposal.deposit_end_time:type_name -> google.protobuf.Timestamp + 11, // 7: cosmos.gov.v1.Proposal.total_deposit:type_name -> cosmos.base.v1beta1.Coin + 13, // 8: cosmos.gov.v1.Proposal.voting_start_time:type_name -> google.protobuf.Timestamp + 13, // 9: cosmos.gov.v1.Proposal.voting_end_time:type_name -> google.protobuf.Timestamp 2, // 10: cosmos.gov.v1.Vote.options:type_name -> cosmos.gov.v1.WeightedVoteOption - 10, // 11: cosmos.gov.v1.DepositParams.min_deposit:type_name -> cosmos.base.v1beta1.Coin - 13, // 12: cosmos.gov.v1.DepositParams.max_deposit_period:type_name -> google.protobuf.Duration - 13, // 13: cosmos.gov.v1.VotingParams.voting_period:type_name -> google.protobuf.Duration - 14, // [14:14] is the sub-list for method output_type - 14, // [14:14] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 11, // 11: cosmos.gov.v1.DepositParams.min_deposit:type_name -> cosmos.base.v1beta1.Coin + 14, // 12: cosmos.gov.v1.DepositParams.max_deposit_period:type_name -> google.protobuf.Duration + 14, // 13: cosmos.gov.v1.VotingParams.voting_period:type_name -> google.protobuf.Duration + 11, // 14: cosmos.gov.v1.Params.min_deposit:type_name -> cosmos.base.v1beta1.Coin + 14, // 15: cosmos.gov.v1.Params.max_deposit_period:type_name -> google.protobuf.Duration + 14, // 16: cosmos.gov.v1.Params.voting_period:type_name -> google.protobuf.Duration + 17, // [17:17] is the sub-list for method output_type + 17, // [17:17] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name } func init() { file_cosmos_gov_v1_gov_proto_init() } @@ -6053,6 +7017,18 @@ func file_cosmos_gov_v1_gov_proto_init() { return nil } } + file_cosmos_gov_v1_gov_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Params); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -6060,7 +7036,7 @@ func file_cosmos_gov_v1_gov_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_gov_v1_gov_proto_rawDesc, NumEnums: 2, - NumMessages: 8, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, diff --git a/api/cosmos/gov/v1/query.pulsar.go b/api/cosmos/gov/v1/query.pulsar.go index 7ec60a60d831..67a5074177ec 100644 --- a/api/cosmos/gov/v1/query.pulsar.go +++ b/api/cosmos/gov/v1/query.pulsar.go @@ -3998,14 +3998,12 @@ func (x *fastReflection_QueryVotesResponse) ProtoMethods() *protoiface.Methods { } var ( - md_QueryParamsRequest protoreflect.MessageDescriptor - fd_QueryParamsRequest_params_type protoreflect.FieldDescriptor + md_QueryParamsRequest protoreflect.MessageDescriptor ) func init() { file_cosmos_gov_v1_query_proto_init() md_QueryParamsRequest = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryParamsRequest") - fd_QueryParamsRequest_params_type = md_QueryParamsRequest.Fields().ByName("params_type") } var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) @@ -4073,12 +4071,6 @@ func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessag // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ParamsType != "" { - value := protoreflect.ValueOfString(x.ParamsType) - if !f(fd_QueryParamsRequest_params_type, value) { - return - } - } } // Has reports whether a field is populated. @@ -4094,8 +4086,6 @@ func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescr // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.gov.v1.QueryParamsRequest.params_type": - return x.ParamsType != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsRequest")) @@ -4112,8 +4102,6 @@ func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.gov.v1.QueryParamsRequest.params_type": - x.ParamsType = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsRequest")) @@ -4130,9 +4118,6 @@ func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescripto // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.gov.v1.QueryParamsRequest.params_type": - value := x.ParamsType - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsRequest")) @@ -4153,8 +4138,6 @@ func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDes // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.gov.v1.QueryParamsRequest.params_type": - x.ParamsType = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsRequest")) @@ -4175,8 +4158,6 @@ func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.gov.v1.QueryParamsRequest.params_type": - panic(fmt.Errorf("field params_type of message cosmos.gov.v1.QueryParamsRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsRequest")) @@ -4190,8 +4171,6 @@ func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescrip // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.gov.v1.QueryParamsRequest.params_type": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsRequest")) @@ -4261,10 +4240,6 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.ParamsType) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -4294,13 +4269,6 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.ParamsType) > 0 { - i -= len(x.ParamsType) - copy(dAtA[i:], x.ParamsType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ParamsType))) - i-- - dAtA[i] = 0xa - } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -4350,38 +4318,6 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ParamsType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ParamsType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -4418,18 +4354,14 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { } var ( - md_QueryParamsResponse protoreflect.MessageDescriptor - fd_QueryParamsResponse_voting_params protoreflect.FieldDescriptor - fd_QueryParamsResponse_deposit_params protoreflect.FieldDescriptor - fd_QueryParamsResponse_tally_params protoreflect.FieldDescriptor + md_QueryParamsResponse protoreflect.MessageDescriptor + fd_QueryParamsResponse_params protoreflect.FieldDescriptor ) func init() { file_cosmos_gov_v1_query_proto_init() md_QueryParamsResponse = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryParamsResponse") - fd_QueryParamsResponse_voting_params = md_QueryParamsResponse.Fields().ByName("voting_params") - fd_QueryParamsResponse_deposit_params = md_QueryParamsResponse.Fields().ByName("deposit_params") - fd_QueryParamsResponse_tally_params = md_QueryParamsResponse.Fields().ByName("tally_params") + fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") } var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) @@ -4497,21 +4429,9 @@ func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessa // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.VotingParams != nil { - value := protoreflect.ValueOfMessage(x.VotingParams.ProtoReflect()) - if !f(fd_QueryParamsResponse_voting_params, value) { - return - } - } - if x.DepositParams != nil { - value := protoreflect.ValueOfMessage(x.DepositParams.ProtoReflect()) - if !f(fd_QueryParamsResponse_deposit_params, value) { - return - } - } - if x.TallyParams != nil { - value := protoreflect.ValueOfMessage(x.TallyParams.ProtoReflect()) - if !f(fd_QueryParamsResponse_tally_params, value) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_QueryParamsResponse_params, value) { return } } @@ -4530,12 +4450,8 @@ func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDesc // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.gov.v1.QueryParamsResponse.voting_params": - return x.VotingParams != nil - case "cosmos.gov.v1.QueryParamsResponse.deposit_params": - return x.DepositParams != nil - case "cosmos.gov.v1.QueryParamsResponse.tally_params": - return x.TallyParams != nil + case "cosmos.gov.v1.QueryParamsResponse.params": + return x.Params != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsResponse")) @@ -4552,12 +4468,8 @@ func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.gov.v1.QueryParamsResponse.voting_params": - x.VotingParams = nil - case "cosmos.gov.v1.QueryParamsResponse.deposit_params": - x.DepositParams = nil - case "cosmos.gov.v1.QueryParamsResponse.tally_params": - x.TallyParams = nil + case "cosmos.gov.v1.QueryParamsResponse.params": + x.Params = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsResponse")) @@ -4574,14 +4486,8 @@ func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescript // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.gov.v1.QueryParamsResponse.voting_params": - value := x.VotingParams - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1.QueryParamsResponse.deposit_params": - value := x.DepositParams - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.gov.v1.QueryParamsResponse.tally_params": - value := x.TallyParams + case "cosmos.gov.v1.QueryParamsResponse.params": + value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { @@ -4603,12 +4509,8 @@ func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDe // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.gov.v1.QueryParamsResponse.voting_params": - x.VotingParams = value.Message().Interface().(*VotingParams) - case "cosmos.gov.v1.QueryParamsResponse.deposit_params": - x.DepositParams = value.Message().Interface().(*DepositParams) - case "cosmos.gov.v1.QueryParamsResponse.tally_params": - x.TallyParams = value.Message().Interface().(*TallyParams) + case "cosmos.gov.v1.QueryParamsResponse.params": + x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsResponse")) @@ -4629,21 +4531,11 @@ func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.gov.v1.QueryParamsResponse.voting_params": - if x.VotingParams == nil { - x.VotingParams = new(VotingParams) - } - return protoreflect.ValueOfMessage(x.VotingParams.ProtoReflect()) - case "cosmos.gov.v1.QueryParamsResponse.deposit_params": - if x.DepositParams == nil { - x.DepositParams = new(DepositParams) - } - return protoreflect.ValueOfMessage(x.DepositParams.ProtoReflect()) - case "cosmos.gov.v1.QueryParamsResponse.tally_params": - if x.TallyParams == nil { - x.TallyParams = new(TallyParams) + case "cosmos.gov.v1.QueryParamsResponse.params": + if x.Params == nil { + x.Params = new(Params) } - return protoreflect.ValueOfMessage(x.TallyParams.ProtoReflect()) + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsResponse")) @@ -4657,14 +4549,8 @@ func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescri // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.gov.v1.QueryParamsResponse.voting_params": - m := new(VotingParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1.QueryParamsResponse.deposit_params": - m := new(DepositParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.gov.v1.QueryParamsResponse.tally_params": - m := new(TallyParams) + case "cosmos.gov.v1.QueryParamsResponse.params": + m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { @@ -4735,16 +4621,8 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods var n int var l int _ = l - if x.VotingParams != nil { - l = options.Size(x.VotingParams) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.DepositParams != nil { - l = options.Size(x.DepositParams) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.TallyParams != nil { - l = options.Size(x.TallyParams) + if x.Params != nil { + l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -4776,8 +4654,8 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.TallyParams != nil { - encoded, err := options.Marshal(x.TallyParams) + if x.Params != nil { + encoded, err := options.Marshal(x.Params) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4788,35 +4666,7 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x1a - } - if x.DepositParams != nil { - encoded, err := options.Marshal(x.DepositParams) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.VotingParams != nil { - encoded, err := options.Marshal(x.VotingParams) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa + dAtA[i] = 0x2a } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -4867,9 +4717,9 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: + case 5: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VotingParams", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4896,82 +4746,10 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.VotingParams == nil { - x.VotingParams = &VotingParams{} + if x.Params == nil { + x.Params = &Params{} } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VotingParams); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DepositParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.DepositParams == nil { - x.DepositParams = &DepositParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DepositParams); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TallyParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.TallyParams == nil { - x.TallyParams = &TallyParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TallyParams); err != nil { + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -8186,10 +7964,6 @@ type QueryParamsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - // params_type defines which parameters to query for, can be one of "voting", - // "tallying" or "deposit". - ParamsType string `protobuf:"bytes,1,opt,name=params_type,json=paramsType,proto3" json:"params_type,omitempty"` } func (x *QueryParamsRequest) Reset() { @@ -8212,25 +7986,14 @@ func (*QueryParamsRequest) Descriptor() ([]byte, []int) { return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{8} } -func (x *QueryParamsRequest) GetParamsType() string { - if x != nil { - return x.ParamsType - } - return "" -} - // QueryParamsResponse is the response type for the Query/Params RPC method. type QueryParamsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // voting_params defines the parameters related to voting. - VotingParams *VotingParams `protobuf:"bytes,1,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"` - // deposit_params defines the parameters related to deposit. - DepositParams *DepositParams `protobuf:"bytes,2,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"` - // tally_params defines the parameters related to tally. - TallyParams *TallyParams `protobuf:"bytes,3,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` + // params defines all the paramaters of x/gov module. + Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` } func (x *QueryParamsResponse) Reset() { @@ -8253,23 +8016,9 @@ func (*QueryParamsResponse) Descriptor() ([]byte, []int) { return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{9} } -func (x *QueryParamsResponse) GetVotingParams() *VotingParams { - if x != nil { - return x.VotingParams - } - return nil -} - -func (x *QueryParamsResponse) GetDepositParams() *DepositParams { - if x != nil { - return x.DepositParams - } - return nil -} - -func (x *QueryParamsResponse) GetTallyParams() *TallyParams { +func (x *QueryParamsResponse) GetParams() *Params { if x != nil { - return x.TallyParams + return x.Params } return nil } @@ -8597,142 +8346,130 @@ var file_cosmos_gov_v1_query_proto_rawDesc = []byte{ 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x35, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, - 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, - 0xdb, 0x01, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, - 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x56, - 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0c, 0x76, 0x6f, 0x74, - 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x0e, 0x64, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x0d, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3d, - 0x0a, 0x0c, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x0b, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x6e, 0x0a, - 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x22, 0x48, 0x0a, - 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x07, - 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x22, 0x7f, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, - 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x01, 0x0a, 0x15, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x08, 0x64, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x3a, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x22, 0x4c, 0x0a, 0x18, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x74, 0x61, 0x6c, 0x6c, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x52, 0x05, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x32, 0xda, 0x08, 0x0a, 0x05, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x12, 0x85, 0x01, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x44, + 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x22, 0x6e, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x09, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x22, 0x48, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x22, 0x7f, + 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x94, 0x01, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x64, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x47, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, + 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x49, 0x64, 0x22, 0x4c, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, + 0x0a, 0x05, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, + 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x74, 0x61, 0x6c, 0x6c, 0x79, + 0x32, 0xcc, 0x08, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x85, 0x01, 0x0a, 0x08, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, + 0x64, 0x7d, 0x12, 0x7a, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, + 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, - 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x7a, 0x0a, 0x09, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, - 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, - 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x76, 0x6f, 0x74, 0x65, 0x72, - 0x7d, 0x12, 0x82, 0x01, 0x0a, 0x05, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, + 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x87, + 0x01, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x36, 0x12, 0x34, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, + 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x73, + 0x2f, 0x7b, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x7d, 0x12, 0x82, 0x01, 0x0a, 0x05, 0x56, 0x6f, 0x74, + 0x65, 0x73, 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, + 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, + 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, + 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x6e, 0x0a, + 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x97, 0x01, + 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, - 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x7c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, - 0x23, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x7d, 0x12, 0x97, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, + 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, + 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x08, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x3d, 0x12, 0x3b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x94, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, + 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, + 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x7d, 0x12, 0x8e, - 0x01, 0x0a, 0x08, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, - 0x94, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, - 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, - 0x2f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x42, 0x9b, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x42, + 0x9b, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, + 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, + 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, + 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -8770,11 +8507,9 @@ var file_cosmos_gov_v1_query_proto_goTypes = []interface{}{ (*v1beta1.PageRequest)(nil), // 18: cosmos.base.query.v1beta1.PageRequest (*v1beta1.PageResponse)(nil), // 19: cosmos.base.query.v1beta1.PageResponse (*Vote)(nil), // 20: cosmos.gov.v1.Vote - (*VotingParams)(nil), // 21: cosmos.gov.v1.VotingParams - (*DepositParams)(nil), // 22: cosmos.gov.v1.DepositParams - (*TallyParams)(nil), // 23: cosmos.gov.v1.TallyParams - (*Deposit)(nil), // 24: cosmos.gov.v1.Deposit - (*TallyResult)(nil), // 25: cosmos.gov.v1.TallyResult + (*Params)(nil), // 21: cosmos.gov.v1.Params + (*Deposit)(nil), // 22: cosmos.gov.v1.Deposit + (*TallyResult)(nil), // 23: cosmos.gov.v1.TallyResult } var file_cosmos_gov_v1_query_proto_depIdxs = []int32{ 16, // 0: cosmos.gov.v1.QueryProposalResponse.proposal:type_name -> cosmos.gov.v1.Proposal @@ -8786,35 +8521,33 @@ var file_cosmos_gov_v1_query_proto_depIdxs = []int32{ 18, // 6: cosmos.gov.v1.QueryVotesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest 20, // 7: cosmos.gov.v1.QueryVotesResponse.votes:type_name -> cosmos.gov.v1.Vote 19, // 8: cosmos.gov.v1.QueryVotesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 21, // 9: cosmos.gov.v1.QueryParamsResponse.voting_params:type_name -> cosmos.gov.v1.VotingParams - 22, // 10: cosmos.gov.v1.QueryParamsResponse.deposit_params:type_name -> cosmos.gov.v1.DepositParams - 23, // 11: cosmos.gov.v1.QueryParamsResponse.tally_params:type_name -> cosmos.gov.v1.TallyParams - 24, // 12: cosmos.gov.v1.QueryDepositResponse.deposit:type_name -> cosmos.gov.v1.Deposit - 18, // 13: cosmos.gov.v1.QueryDepositsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 24, // 14: cosmos.gov.v1.QueryDepositsResponse.deposits:type_name -> cosmos.gov.v1.Deposit - 19, // 15: cosmos.gov.v1.QueryDepositsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 25, // 16: cosmos.gov.v1.QueryTallyResultResponse.tally:type_name -> cosmos.gov.v1.TallyResult - 0, // 17: cosmos.gov.v1.Query.Proposal:input_type -> cosmos.gov.v1.QueryProposalRequest - 2, // 18: cosmos.gov.v1.Query.Proposals:input_type -> cosmos.gov.v1.QueryProposalsRequest - 4, // 19: cosmos.gov.v1.Query.Vote:input_type -> cosmos.gov.v1.QueryVoteRequest - 6, // 20: cosmos.gov.v1.Query.Votes:input_type -> cosmos.gov.v1.QueryVotesRequest - 8, // 21: cosmos.gov.v1.Query.Params:input_type -> cosmos.gov.v1.QueryParamsRequest - 10, // 22: cosmos.gov.v1.Query.Deposit:input_type -> cosmos.gov.v1.QueryDepositRequest - 12, // 23: cosmos.gov.v1.Query.Deposits:input_type -> cosmos.gov.v1.QueryDepositsRequest - 14, // 24: cosmos.gov.v1.Query.TallyResult:input_type -> cosmos.gov.v1.QueryTallyResultRequest - 1, // 25: cosmos.gov.v1.Query.Proposal:output_type -> cosmos.gov.v1.QueryProposalResponse - 3, // 26: cosmos.gov.v1.Query.Proposals:output_type -> cosmos.gov.v1.QueryProposalsResponse - 5, // 27: cosmos.gov.v1.Query.Vote:output_type -> cosmos.gov.v1.QueryVoteResponse - 7, // 28: cosmos.gov.v1.Query.Votes:output_type -> cosmos.gov.v1.QueryVotesResponse - 9, // 29: cosmos.gov.v1.Query.Params:output_type -> cosmos.gov.v1.QueryParamsResponse - 11, // 30: cosmos.gov.v1.Query.Deposit:output_type -> cosmos.gov.v1.QueryDepositResponse - 13, // 31: cosmos.gov.v1.Query.Deposits:output_type -> cosmos.gov.v1.QueryDepositsResponse - 15, // 32: cosmos.gov.v1.Query.TallyResult:output_type -> cosmos.gov.v1.QueryTallyResultResponse - 25, // [25:33] is the sub-list for method output_type - 17, // [17:25] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name + 21, // 9: cosmos.gov.v1.QueryParamsResponse.params:type_name -> cosmos.gov.v1.Params + 22, // 10: cosmos.gov.v1.QueryDepositResponse.deposit:type_name -> cosmos.gov.v1.Deposit + 18, // 11: cosmos.gov.v1.QueryDepositsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 22, // 12: cosmos.gov.v1.QueryDepositsResponse.deposits:type_name -> cosmos.gov.v1.Deposit + 19, // 13: cosmos.gov.v1.QueryDepositsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 23, // 14: cosmos.gov.v1.QueryTallyResultResponse.tally:type_name -> cosmos.gov.v1.TallyResult + 0, // 15: cosmos.gov.v1.Query.Proposal:input_type -> cosmos.gov.v1.QueryProposalRequest + 2, // 16: cosmos.gov.v1.Query.Proposals:input_type -> cosmos.gov.v1.QueryProposalsRequest + 4, // 17: cosmos.gov.v1.Query.Vote:input_type -> cosmos.gov.v1.QueryVoteRequest + 6, // 18: cosmos.gov.v1.Query.Votes:input_type -> cosmos.gov.v1.QueryVotesRequest + 8, // 19: cosmos.gov.v1.Query.Params:input_type -> cosmos.gov.v1.QueryParamsRequest + 10, // 20: cosmos.gov.v1.Query.Deposit:input_type -> cosmos.gov.v1.QueryDepositRequest + 12, // 21: cosmos.gov.v1.Query.Deposits:input_type -> cosmos.gov.v1.QueryDepositsRequest + 14, // 22: cosmos.gov.v1.Query.TallyResult:input_type -> cosmos.gov.v1.QueryTallyResultRequest + 1, // 23: cosmos.gov.v1.Query.Proposal:output_type -> cosmos.gov.v1.QueryProposalResponse + 3, // 24: cosmos.gov.v1.Query.Proposals:output_type -> cosmos.gov.v1.QueryProposalsResponse + 5, // 25: cosmos.gov.v1.Query.Vote:output_type -> cosmos.gov.v1.QueryVoteResponse + 7, // 26: cosmos.gov.v1.Query.Votes:output_type -> cosmos.gov.v1.QueryVotesResponse + 9, // 27: cosmos.gov.v1.Query.Params:output_type -> cosmos.gov.v1.QueryParamsResponse + 11, // 28: cosmos.gov.v1.Query.Deposit:output_type -> cosmos.gov.v1.QueryDepositResponse + 13, // 29: cosmos.gov.v1.Query.Deposits:output_type -> cosmos.gov.v1.QueryDepositsResponse + 15, // 30: cosmos.gov.v1.Query.TallyResult:output_type -> cosmos.gov.v1.QueryTallyResultResponse + 23, // [23:31] is the sub-list for method output_type + 15, // [15:23] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name } func init() { file_cosmos_gov_v1_query_proto_init() } diff --git a/api/cosmos/gov/v1/tx.pulsar.go b/api/cosmos/gov/v1/tx.pulsar.go index bd8e57422aab..b4e8f2d76fb1 100644 --- a/api/cosmos/gov/v1/tx.pulsar.go +++ b/api/cosmos/gov/v1/tx.pulsar.go @@ -4960,6 +4960,861 @@ func (x *fastReflection_MsgDepositResponse) ProtoMethods() *protoiface.Methods { } } +var ( + md_MsgUpdateParams protoreflect.MessageDescriptor + fd_MsgUpdateParams_authority protoreflect.FieldDescriptor + fd_MsgUpdateParams_params protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_gov_v1_tx_proto_init() + md_MsgUpdateParams = File_cosmos_gov_v1_tx_proto.Messages().ByName("MsgUpdateParams") + fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") + fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) + +type fastReflection_MsgUpdateParams MsgUpdateParams + +func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(x) +} + +func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_gov_v1_tx_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} + +type fastReflection_MsgUpdateParams_messageType struct{} + +func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(nil) +} +func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) +} +func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUpdateParams) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParams_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParams)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgUpdateParams_authority, value) { + return + } + } + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_MsgUpdateParams_params, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.gov.v1.MsgUpdateParams.authority": + return x.Authority != "" + case "cosmos.gov.v1.MsgUpdateParams.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateParams does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.gov.v1.MsgUpdateParams.authority": + x.Authority = "" + case "cosmos.gov.v1.MsgUpdateParams.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateParams does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.gov.v1.MsgUpdateParams.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "cosmos.gov.v1.MsgUpdateParams.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateParams does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.gov.v1.MsgUpdateParams.authority": + x.Authority = value.Interface().(string) + case "cosmos.gov.v1.MsgUpdateParams.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateParams does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.gov.v1.MsgUpdateParams.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "cosmos.gov.v1.MsgUpdateParams.authority": + panic(fmt.Errorf("field authority of message cosmos.gov.v1.MsgUpdateParams is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateParams does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.gov.v1.MsgUpdateParams.authority": + return protoreflect.ValueOfString("") + case "cosmos.gov.v1.MsgUpdateParams.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateParams does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.MsgUpdateParams", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUpdateParams) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParams) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUpdateParams) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateParams) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateParams) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateParams) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpdateParamsResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_gov_v1_tx_proto_init() + md_MsgUpdateParamsResponse = File_cosmos_gov_v1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) + +type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse + +func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(x) +} + +func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_gov_v1_tx_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} + +type fastReflection_MsgUpdateParamsResponse_messageType struct{} + +func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(nil) +} +func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) +} +func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUpdateParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParamsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message cosmos.gov.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.gov.v1.MsgUpdateParamsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUpdateParamsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParamsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUpdateParamsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateParamsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateParamsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateParamsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Since: cosmos-sdk 0.46 // Code generated by protoc-gen-go. DO NOT EDIT. @@ -5400,6 +6255,86 @@ func (*MsgDepositResponse) Descriptor() ([]byte, []int) { return file_cosmos_gov_v1_tx_proto_rawDescGZIP(), []int{9} } +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/distribution parameters to update. + // + // NOTE: All parameters must be supplied. + Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *MsgUpdateParams) Reset() { + *x = MsgUpdateParams{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_gov_v1_tx_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParams) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return file_cosmos_gov_v1_tx_proto_rawDescGZIP(), []int{10} +} + +func (x *MsgUpdateParams) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgUpdateParams) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpdateParamsResponse) Reset() { + *x = MsgUpdateParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_gov_v1_tx_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParamsResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return file_cosmos_gov_v1_tx_proto_rawDescGZIP(), []int{11} +} + var File_cosmos_gov_v1_tx_proto protoreflect.FileDescriptor var file_cosmos_gov_v1_tx_proto_rawDesc = []byte{ @@ -5487,44 +6422,60 @@ var file_cosmos_gov_v1_tx_proto_rawDesc = []byte{ 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x22, 0x14, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xab, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x5c, 0x0a, 0x0e, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x20, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, + 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x12, 0x33, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x32, 0x83, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x5c, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, + 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x28, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x11, 0x45, 0x78, 0x65, 0x63, 0x4c, 0x65, + 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, + 0x78, 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, + 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x1e, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, + 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x12, 0x1e, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x1a, 0x26, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x12, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x1a, 0x21, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, + 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x11, 0x45, 0x78, - 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, - 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, - 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x3e, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, - 0x65, 0x1a, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x56, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, - 0x64, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, - 0x64, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x07, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x12, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x1a, - 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0x98, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, - 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, - 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, - 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x26, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x98, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, + 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, + 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5539,7 +6490,7 @@ func file_cosmos_gov_v1_tx_proto_rawDescGZIP() []byte { return file_cosmos_gov_v1_tx_proto_rawDescData } -var file_cosmos_gov_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_cosmos_gov_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_cosmos_gov_v1_tx_proto_goTypes = []interface{}{ (*MsgSubmitProposal)(nil), // 0: cosmos.gov.v1.MsgSubmitProposal (*MsgSubmitProposalResponse)(nil), // 1: cosmos.gov.v1.MsgSubmitProposalResponse @@ -5551,33 +6502,39 @@ var file_cosmos_gov_v1_tx_proto_goTypes = []interface{}{ (*MsgVoteWeightedResponse)(nil), // 7: cosmos.gov.v1.MsgVoteWeightedResponse (*MsgDeposit)(nil), // 8: cosmos.gov.v1.MsgDeposit (*MsgDepositResponse)(nil), // 9: cosmos.gov.v1.MsgDepositResponse - (*anypb.Any)(nil), // 10: google.protobuf.Any - (*v1beta1.Coin)(nil), // 11: cosmos.base.v1beta1.Coin - (VoteOption)(0), // 12: cosmos.gov.v1.VoteOption - (*WeightedVoteOption)(nil), // 13: cosmos.gov.v1.WeightedVoteOption + (*MsgUpdateParams)(nil), // 10: cosmos.gov.v1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 11: cosmos.gov.v1.MsgUpdateParamsResponse + (*anypb.Any)(nil), // 12: google.protobuf.Any + (*v1beta1.Coin)(nil), // 13: cosmos.base.v1beta1.Coin + (VoteOption)(0), // 14: cosmos.gov.v1.VoteOption + (*WeightedVoteOption)(nil), // 15: cosmos.gov.v1.WeightedVoteOption + (*Params)(nil), // 16: cosmos.gov.v1.Params } var file_cosmos_gov_v1_tx_proto_depIdxs = []int32{ - 10, // 0: cosmos.gov.v1.MsgSubmitProposal.messages:type_name -> google.protobuf.Any - 11, // 1: cosmos.gov.v1.MsgSubmitProposal.initial_deposit:type_name -> cosmos.base.v1beta1.Coin - 10, // 2: cosmos.gov.v1.MsgExecLegacyContent.content:type_name -> google.protobuf.Any - 12, // 3: cosmos.gov.v1.MsgVote.option:type_name -> cosmos.gov.v1.VoteOption - 13, // 4: cosmos.gov.v1.MsgVoteWeighted.options:type_name -> cosmos.gov.v1.WeightedVoteOption - 11, // 5: cosmos.gov.v1.MsgDeposit.amount:type_name -> cosmos.base.v1beta1.Coin - 0, // 6: cosmos.gov.v1.Msg.SubmitProposal:input_type -> cosmos.gov.v1.MsgSubmitProposal - 2, // 7: cosmos.gov.v1.Msg.ExecLegacyContent:input_type -> cosmos.gov.v1.MsgExecLegacyContent - 4, // 8: cosmos.gov.v1.Msg.Vote:input_type -> cosmos.gov.v1.MsgVote - 6, // 9: cosmos.gov.v1.Msg.VoteWeighted:input_type -> cosmos.gov.v1.MsgVoteWeighted - 8, // 10: cosmos.gov.v1.Msg.Deposit:input_type -> cosmos.gov.v1.MsgDeposit - 1, // 11: cosmos.gov.v1.Msg.SubmitProposal:output_type -> cosmos.gov.v1.MsgSubmitProposalResponse - 3, // 12: cosmos.gov.v1.Msg.ExecLegacyContent:output_type -> cosmos.gov.v1.MsgExecLegacyContentResponse - 5, // 13: cosmos.gov.v1.Msg.Vote:output_type -> cosmos.gov.v1.MsgVoteResponse - 7, // 14: cosmos.gov.v1.Msg.VoteWeighted:output_type -> cosmos.gov.v1.MsgVoteWeightedResponse - 9, // 15: cosmos.gov.v1.Msg.Deposit:output_type -> cosmos.gov.v1.MsgDepositResponse - 11, // [11:16] is the sub-list for method output_type - 6, // [6:11] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 12, // 0: cosmos.gov.v1.MsgSubmitProposal.messages:type_name -> google.protobuf.Any + 13, // 1: cosmos.gov.v1.MsgSubmitProposal.initial_deposit:type_name -> cosmos.base.v1beta1.Coin + 12, // 2: cosmos.gov.v1.MsgExecLegacyContent.content:type_name -> google.protobuf.Any + 14, // 3: cosmos.gov.v1.MsgVote.option:type_name -> cosmos.gov.v1.VoteOption + 15, // 4: cosmos.gov.v1.MsgVoteWeighted.options:type_name -> cosmos.gov.v1.WeightedVoteOption + 13, // 5: cosmos.gov.v1.MsgDeposit.amount:type_name -> cosmos.base.v1beta1.Coin + 16, // 6: cosmos.gov.v1.MsgUpdateParams.params:type_name -> cosmos.gov.v1.Params + 0, // 7: cosmos.gov.v1.Msg.SubmitProposal:input_type -> cosmos.gov.v1.MsgSubmitProposal + 2, // 8: cosmos.gov.v1.Msg.ExecLegacyContent:input_type -> cosmos.gov.v1.MsgExecLegacyContent + 4, // 9: cosmos.gov.v1.Msg.Vote:input_type -> cosmos.gov.v1.MsgVote + 6, // 10: cosmos.gov.v1.Msg.VoteWeighted:input_type -> cosmos.gov.v1.MsgVoteWeighted + 8, // 11: cosmos.gov.v1.Msg.Deposit:input_type -> cosmos.gov.v1.MsgDeposit + 10, // 12: cosmos.gov.v1.Msg.UpdateParams:input_type -> cosmos.gov.v1.MsgUpdateParams + 1, // 13: cosmos.gov.v1.Msg.SubmitProposal:output_type -> cosmos.gov.v1.MsgSubmitProposalResponse + 3, // 14: cosmos.gov.v1.Msg.ExecLegacyContent:output_type -> cosmos.gov.v1.MsgExecLegacyContentResponse + 5, // 15: cosmos.gov.v1.Msg.Vote:output_type -> cosmos.gov.v1.MsgVoteResponse + 7, // 16: cosmos.gov.v1.Msg.VoteWeighted:output_type -> cosmos.gov.v1.MsgVoteWeightedResponse + 9, // 17: cosmos.gov.v1.Msg.Deposit:output_type -> cosmos.gov.v1.MsgDepositResponse + 11, // 18: cosmos.gov.v1.Msg.UpdateParams:output_type -> cosmos.gov.v1.MsgUpdateParamsResponse + 13, // [13:19] is the sub-list for method output_type + 7, // [7:13] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_cosmos_gov_v1_tx_proto_init() } @@ -5707,6 +6664,30 @@ func file_cosmos_gov_v1_tx_proto_init() { return nil } } + file_cosmos_gov_v1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_gov_v1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParamsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -5714,7 +6695,7 @@ func file_cosmos_gov_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_gov_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 12, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/gov/v1/tx_grpc.pb.go b/api/cosmos/gov/v1/tx_grpc.pb.go index 9085bf5fa03d..05b1f592e04f 100644 --- a/api/cosmos/gov/v1/tx_grpc.pb.go +++ b/api/cosmos/gov/v1/tx_grpc.pb.go @@ -33,6 +33,11 @@ type MsgClient interface { VoteWeighted(ctx context.Context, in *MsgVoteWeighted, opts ...grpc.CallOption) (*MsgVoteWeightedResponse, error) // Deposit defines a method to add deposit on a specific proposal. Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) + // UpdateParams defines a governance operation for updating the x/gov module + // parameters. The authority is defined in the keeper. + // + // Since: cosmos-sdk 0.47 + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } type msgClient struct { @@ -88,6 +93,15 @@ func (c *msgClient) Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.Ca return out, nil } +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -103,6 +117,11 @@ type MsgServer interface { VoteWeighted(context.Context, *MsgVoteWeighted) (*MsgVoteWeightedResponse, error) // Deposit defines a method to add deposit on a specific proposal. Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error) + // UpdateParams defines a governance operation for updating the x/gov module + // parameters. The authority is defined in the keeper. + // + // Since: cosmos-sdk 0.47 + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) mustEmbedUnimplementedMsgServer() } @@ -125,6 +144,9 @@ func (UnimplementedMsgServer) VoteWeighted(context.Context, *MsgVoteWeighted) (* func (UnimplementedMsgServer) Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") } +func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -228,6 +250,24 @@ func _Msg_Deposit_Handler(srv interface{}, ctx context.Context, dec func(interfa return interceptor(ctx, in, info, handler) } +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.gov.v1.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -255,6 +295,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "Deposit", Handler: _Msg_Deposit_Handler, }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/gov/v1/tx.proto", diff --git a/api/go.mod b/api/go.mod index c108b7b207de..6d4f2617d6a2 100644 --- a/api/go.mod +++ b/api/go.mod @@ -6,7 +6,7 @@ require ( github.com/cosmos/cosmos-proto v1.0.0-alpha7 github.com/gogo/protobuf v1.3.2 google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb - google.golang.org/grpc v1.47.0 + google.golang.org/grpc v1.48.0 google.golang.org/protobuf v1.28.0 ) diff --git a/api/go.sum b/api/go.sum index 0cd7aec7c24f..8ba0ac9ae851 100644 --- a/api/go.sum +++ b/api/go.sum @@ -137,8 +137,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/client/grpc/tmservice/query.pb.go b/client/grpc/tmservice/query.pb.go index 2b57ec34431d..1ce38e1c5430 100644 --- a/client/grpc/tmservice/query.pb.go +++ b/client/grpc/tmservice/query.pb.go @@ -375,7 +375,10 @@ func (m *GetBlockByHeightRequest) GetHeight() int64 { // GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. type GetBlockByHeightResponse struct { BlockId *types1.BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - Block *types1.Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` + // Deprecated: please use `sdk_block` instead + Block *types1.Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` + // Since: cosmos-sdk 0.47 + SdkBlock *Block `protobuf:"bytes,3,opt,name=sdk_block,json=sdkBlock,proto3" json:"sdk_block,omitempty"` } func (m *GetBlockByHeightResponse) Reset() { *m = GetBlockByHeightResponse{} } @@ -425,6 +428,13 @@ func (m *GetBlockByHeightResponse) GetBlock() *types1.Block { return nil } +func (m *GetBlockByHeightResponse) GetSdkBlock() *Block { + if m != nil { + return m.SdkBlock + } + return nil +} + // GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. type GetLatestBlockRequest struct { } @@ -465,7 +475,10 @@ var xxx_messageInfo_GetLatestBlockRequest proto.InternalMessageInfo // GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. type GetLatestBlockResponse struct { BlockId *types1.BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - Block *types1.Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` + // Deprecated: please use `sdk_block` instead + Block *types1.Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` + // Since: cosmos-sdk 0.47 + SdkBlock *Block `protobuf:"bytes,3,opt,name=sdk_block,json=sdkBlock,proto3" json:"sdk_block,omitempty"` } func (m *GetLatestBlockResponse) Reset() { *m = GetLatestBlockResponse{} } @@ -515,6 +528,13 @@ func (m *GetLatestBlockResponse) GetBlock() *types1.Block { return nil } +func (m *GetLatestBlockResponse) GetSdkBlock() *Block { + if m != nil { + return m.SdkBlock + } + return nil +} + // GetSyncingRequest is the request type for the Query/GetSyncing RPC method. type GetSyncingRequest struct { } @@ -1173,91 +1193,93 @@ func init() { } var fileDescriptor_40c93fb3ef485c5d = []byte{ - // 1343 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xcf, 0x6f, 0x13, 0xc7, - 0x17, 0xcf, 0xda, 0x21, 0xb6, 0x9f, 0xf9, 0x7e, 0x15, 0x86, 0x14, 0x8c, 0x15, 0x0c, 0xf5, 0x01, - 0xc2, 0x8f, 0xec, 0xd6, 0xe6, 0xe7, 0x81, 0x82, 0x08, 0xd0, 0x90, 0x42, 0x69, 0xba, 0xa9, 0x7a, - 0xa8, 0x2a, 0x59, 0x6b, 0xef, 0x64, 0xb3, 0x8a, 0xbd, 0x33, 0xec, 0x8c, 0xdd, 0x5a, 0x15, 0x6a, - 0xd5, 0x3f, 0xa0, 0xaa, 0xd4, 0x7f, 0x81, 0x43, 0xdb, 0x4b, 0x2f, 0x55, 0x8f, 0x9c, 0x39, 0x22, - 0x2a, 0x55, 0xa8, 0x87, 0xaa, 0x82, 0xfe, 0x21, 0xd5, 0xbc, 0x99, 0x5d, 0xaf, 0x81, 0x60, 0x27, - 0x87, 0x4a, 0x3d, 0x79, 0xf6, 0xfd, 0xfc, 0x7c, 0xde, 0x9b, 0x79, 0x33, 0x86, 0xd3, 0x1d, 0x26, - 0x7a, 0x4c, 0x38, 0x6d, 0x4f, 0x50, 0x47, 0xd2, 0xc8, 0xa7, 0x71, 0x2f, 0x8c, 0xa4, 0x33, 0x68, - 0xb4, 0xa9, 0xf4, 0x1a, 0xce, 0xfd, 0x3e, 0x8d, 0x87, 0x36, 0x8f, 0x99, 0x64, 0xa4, 0xa6, 0x6d, - 0x6d, 0x65, 0x6b, 0x8f, 0x6c, 0x6d, 0x63, 0x5b, 0x5d, 0x08, 0x58, 0xc0, 0xd0, 0xd4, 0x51, 0x2b, - 0xed, 0x55, 0x3d, 0x12, 0x30, 0x16, 0x74, 0xa9, 0x83, 0x5f, 0xed, 0xfe, 0xa6, 0xe3, 0x45, 0x26, - 0x60, 0x75, 0xd1, 0xa8, 0x3c, 0x1e, 0x3a, 0x5e, 0x14, 0x31, 0xe9, 0xc9, 0x90, 0x45, 0xc2, 0x68, - 0xab, 0x19, 0x38, 0xbc, 0xc9, 0x1d, 0x39, 0xe4, 0x34, 0xd1, 0x2d, 0x66, 0x74, 0x28, 0x77, 0xda, - 0x5d, 0xd6, 0xd9, 0xde, 0x51, 0x9b, 0xf5, 0x1d, 0xa3, 0x8c, 0xfc, 0x52, 0xb6, 0xdc, 0x0b, 0xc2, - 0x08, 0x41, 0x24, 0xe0, 0xb5, 0x6d, 0x4b, 0xb3, 0x32, 0xfc, 0xf1, 0xa3, 0xfe, 0xb5, 0x05, 0xb5, - 0x55, 0x2a, 0x3f, 0xf1, 0xba, 0xa1, 0xef, 0x49, 0x16, 0x6f, 0x50, 0xb9, 0x32, 0xbc, 0x4d, 0xc3, - 0x60, 0x4b, 0xba, 0xf4, 0x7e, 0x9f, 0x0a, 0x49, 0x0e, 0xc1, 0xdc, 0x16, 0x0a, 0x2a, 0xd6, 0x71, - 0x6b, 0x29, 0xef, 0x9a, 0x2f, 0xf2, 0x1e, 0xc0, 0x28, 0x53, 0x25, 0x77, 0xdc, 0x5a, 0x2a, 0x37, - 0x4f, 0xd8, 0xd9, 0xea, 0xea, 0xb2, 0x1b, 0x58, 0xf6, 0xba, 0x17, 0x50, 0x13, 0xd3, 0xcd, 0x78, - 0xd6, 0x9f, 0x59, 0x70, 0x6c, 0x47, 0x08, 0x82, 0xb3, 0x48, 0x50, 0xf2, 0x36, 0xec, 0xc7, 0xd2, - 0xb4, 0xc6, 0x90, 0x94, 0x51, 0xa6, 0x4d, 0xc9, 0x1a, 0xc0, 0x20, 0x09, 0x21, 0x2a, 0xb9, 0xe3, - 0xf9, 0xa5, 0x72, 0xf3, 0x94, 0xfd, 0xe6, 0x66, 0xdb, 0x69, 0x52, 0x37, 0xe3, 0x4c, 0x56, 0xc7, - 0x98, 0xe5, 0x91, 0xd9, 0xc9, 0x89, 0xcc, 0x34, 0xd4, 0x31, 0x6a, 0x9b, 0xb0, 0xb8, 0x4a, 0xe5, - 0x5d, 0x4f, 0x52, 0x31, 0xc6, 0x2f, 0x29, 0xed, 0x78, 0x09, 0xad, 0x3d, 0x97, 0xf0, 0x77, 0x0b, - 0x8e, 0xee, 0x90, 0xe8, 0xbf, 0x5d, 0xc0, 0x47, 0x16, 0x94, 0xd2, 0x14, 0xa4, 0x09, 0x05, 0xcf, - 0xf7, 0x63, 0x2a, 0x04, 0xe2, 0x2f, 0xad, 0x54, 0x9e, 0xfe, 0xb2, 0xbc, 0x60, 0xc2, 0x5e, 0xd7, - 0x9a, 0x0d, 0x19, 0x87, 0x51, 0xe0, 0x26, 0x86, 0x64, 0x19, 0x0a, 0xbc, 0xdf, 0x6e, 0x6d, 0xd3, - 0xa1, 0xd9, 0xa2, 0x0b, 0xb6, 0x3e, 0xaf, 0x76, 0x72, 0x94, 0xed, 0xeb, 0xd1, 0xd0, 0x9d, 0xe3, - 0xfd, 0xf6, 0x1d, 0x3a, 0x54, 0x75, 0x1a, 0x30, 0x19, 0x46, 0x41, 0x8b, 0xb3, 0xcf, 0x69, 0x8c, - 0xd8, 0xf3, 0x6e, 0x59, 0xcb, 0xd6, 0x95, 0x88, 0x9c, 0x81, 0x03, 0x3c, 0x66, 0x9c, 0x09, 0x1a, - 0xb7, 0x78, 0x1c, 0xb2, 0x38, 0x94, 0xc3, 0xca, 0x2c, 0xda, 0xcd, 0x27, 0x8a, 0x75, 0x23, 0xaf, - 0x37, 0xe0, 0xf0, 0x2a, 0x95, 0x2b, 0xaa, 0xcc, 0x53, 0x9e, 0xab, 0xfa, 0x57, 0x50, 0x79, 0xd5, - 0xc5, 0xb4, 0xf1, 0x3c, 0x14, 0x75, 0x1b, 0x43, 0xdf, 0x6c, 0x97, 0x23, 0xd9, 0xae, 0xe8, 0x01, - 0x81, 0xae, 0x6b, 0x37, 0xdd, 0x02, 0x9a, 0xae, 0xf9, 0x64, 0x19, 0xf6, 0xe1, 0xd2, 0x54, 0xe0, - 0xf0, 0x0e, 0x2e, 0xae, 0xb6, 0xaa, 0x1f, 0x86, 0xb7, 0xd2, 0xcd, 0xa4, 0x15, 0x1a, 0x71, 0xfd, - 0x01, 0x1c, 0x7a, 0x59, 0xf1, 0x6f, 0xe2, 0x3a, 0x08, 0x07, 0x56, 0xa9, 0xdc, 0x18, 0x46, 0x1d, - 0xd5, 0x61, 0x83, 0xc9, 0x06, 0x92, 0x15, 0x1a, 0x3c, 0x15, 0x28, 0x08, 0x2d, 0x42, 0x38, 0x45, - 0x37, 0xf9, 0xac, 0x2f, 0xa0, 0xfd, 0x3d, 0xe6, 0xd3, 0xb5, 0x68, 0x93, 0x25, 0x51, 0x7e, 0xb2, - 0xe0, 0xe0, 0x98, 0xd8, 0xc4, 0xb9, 0x00, 0xa5, 0x88, 0xf9, 0xb4, 0x15, 0x46, 0x9b, 0xcc, 0x10, - 0xab, 0x64, 0x51, 0xf2, 0x26, 0xb7, 0x53, 0xa7, 0x62, 0x64, 0x56, 0xe4, 0x33, 0x38, 0xe8, 0x71, - 0xde, 0x0d, 0x3b, 0xb8, 0x8b, 0x5b, 0x03, 0x1a, 0x8b, 0xd1, 0x8c, 0x3c, 0x33, 0xf1, 0x4c, 0x69, - 0x73, 0x8c, 0x49, 0x32, 0x71, 0x8c, 0xbc, 0xfe, 0x43, 0x0e, 0xca, 0x19, 0x1b, 0x42, 0x60, 0x36, - 0xf2, 0x7a, 0x54, 0x9f, 0x09, 0x17, 0xd7, 0xe4, 0x08, 0x14, 0x3d, 0xce, 0x5b, 0x28, 0xcf, 0xa1, - 0xbc, 0xe0, 0x71, 0x7e, 0x4f, 0xa9, 0x2a, 0x50, 0x48, 0x00, 0xe5, 0xb5, 0xc6, 0x7c, 0x92, 0xa3, - 0x00, 0x41, 0x28, 0x5b, 0x1d, 0xd6, 0xeb, 0x85, 0x12, 0xb7, 0x74, 0xc9, 0x2d, 0x05, 0xa1, 0xbc, - 0x81, 0x02, 0xa5, 0x6e, 0xf7, 0xc3, 0xae, 0xdf, 0x92, 0x5e, 0x20, 0x2a, 0xfb, 0xb4, 0x1a, 0x25, - 0x1f, 0x7b, 0x81, 0x40, 0x6f, 0x96, 0x72, 0x9d, 0x33, 0xde, 0xcc, 0x20, 0x25, 0xb7, 0x12, 0x6f, - 0x9f, 0x72, 0x51, 0x29, 0xe0, 0x78, 0x39, 0x31, 0xa9, 0x14, 0x1f, 0x30, 0xbf, 0xdf, 0xa5, 0x26, - 0xcb, 0x4d, 0xca, 0x05, 0x39, 0x0b, 0xc4, 0xdc, 0x66, 0xc2, 0xdf, 0x4e, 0xb3, 0x15, 0x31, 0xdb, - 0xbc, 0xd6, 0x6c, 0xf8, 0xdb, 0x49, 0xa9, 0x6e, 0xc3, 0x9c, 0x0e, 0xa1, 0x8a, 0xc4, 0x3d, 0xb9, - 0x95, 0x14, 0x49, 0xad, 0xb3, 0x95, 0xc8, 0x8d, 0x57, 0x62, 0x1e, 0xf2, 0xa2, 0xdf, 0x33, 0xf5, - 0x51, 0xcb, 0xfa, 0x16, 0xcc, 0x5f, 0x5f, 0xb9, 0xb1, 0xf6, 0x91, 0x9a, 0x5b, 0xc9, 0x09, 0x26, - 0x30, 0xeb, 0x7b, 0xd2, 0xc3, 0x98, 0xfb, 0x5d, 0x5c, 0xa7, 0x79, 0x72, 0x99, 0x3c, 0xa3, 0x93, - 0x9e, 0x1f, 0xbb, 0x41, 0x17, 0x60, 0x1f, 0x8f, 0xd9, 0x80, 0x62, 0xa9, 0x8b, 0xae, 0xfe, 0xa8, - 0x7f, 0x9b, 0x83, 0x03, 0x99, 0x54, 0x66, 0x27, 0x12, 0x98, 0xed, 0x30, 0x5f, 0x37, 0xf9, 0x7f, - 0x2e, 0xae, 0x15, 0xca, 0x2e, 0x0b, 0x12, 0x94, 0x5d, 0x16, 0x28, 0x2b, 0xdc, 0xaa, 0xba, 0x77, - 0xb8, 0x56, 0x59, 0xc2, 0xc8, 0xa7, 0x5f, 0x60, 0xc7, 0xf2, 0xae, 0xfe, 0x50, 0xbe, 0x6a, 0x26, - 0xce, 0x21, 0x74, 0xb5, 0x54, 0x76, 0x03, 0xaf, 0xdb, 0xa7, 0x95, 0x02, 0xca, 0xf4, 0x07, 0xb9, - 0x05, 0x25, 0x1e, 0x33, 0xb6, 0xd9, 0x62, 0x5c, 0x60, 0x99, 0xcb, 0xcd, 0xa5, 0x49, 0x5d, 0x5b, - 0x57, 0x0e, 0x1f, 0x72, 0xe1, 0x16, 0xb9, 0x59, 0x65, 0x4a, 0x50, 0x1a, 0x2b, 0xc1, 0x22, 0x94, - 0x14, 0x15, 0xc1, 0xbd, 0x0e, 0xad, 0x80, 0xde, 0x33, 0xa9, 0xe0, 0xfd, 0xd9, 0x62, 0x6e, 0x3e, - 0x5f, 0xbf, 0x01, 0x05, 0x13, 0x51, 0xf1, 0x53, 0x83, 0x21, 0xe9, 0xa2, 0x5a, 0x27, 0x4c, 0x72, - 0x23, 0x26, 0x49, 0x5f, 0xf2, 0xa3, 0xbe, 0xd4, 0xef, 0x40, 0x31, 0x81, 0x45, 0xae, 0x41, 0x5e, - 0xb1, 0xb1, 0x70, 0x0f, 0x9e, 0x9c, 0x92, 0xcd, 0xca, 0xec, 0xe3, 0x3f, 0x8f, 0xcd, 0xb8, 0xca, - 0xb3, 0xf9, 0x33, 0x40, 0x61, 0x83, 0xc6, 0x83, 0xb0, 0x43, 0xc9, 0x8f, 0x16, 0x94, 0x33, 0xa3, - 0x83, 0x34, 0x27, 0xc5, 0x7b, 0x75, 0xfc, 0x54, 0xcf, 0xed, 0xca, 0x47, 0xef, 0x88, 0x7a, 0xe3, - 0x9b, 0xdf, 0xfe, 0xfe, 0x3e, 0x77, 0x86, 0x9c, 0x72, 0x26, 0xbc, 0x7e, 0xd3, 0x09, 0x46, 0x1e, - 0x5a, 0x00, 0xa3, 0x69, 0x49, 0x1a, 0x53, 0xa4, 0x1d, 0x1f, 0xb7, 0xd5, 0xe6, 0x6e, 0x5c, 0x0c, - 0x50, 0x07, 0x81, 0x9e, 0x22, 0x27, 0x27, 0x01, 0x35, 0x33, 0x9a, 0xfc, 0x6a, 0xc1, 0xff, 0xc7, - 0x2f, 0x1a, 0x72, 0x61, 0x8a, 0xbc, 0xaf, 0xde, 0x58, 0xd5, 0x8b, 0xbb, 0x75, 0x33, 0x90, 0x2f, - 0x20, 0x64, 0x87, 0x2c, 0x4f, 0x82, 0x8c, 0x37, 0x93, 0x70, 0xba, 0x18, 0x83, 0x3c, 0xb2, 0x60, - 0xfe, 0xe5, 0xbb, 0x9b, 0x5c, 0x9a, 0x02, 0xc3, 0xeb, 0x1e, 0x08, 0xd5, 0xcb, 0xbb, 0x77, 0x34, - 0xf0, 0x2f, 0x21, 0xfc, 0x06, 0x71, 0xa6, 0x84, 0xff, 0xa5, 0x3e, 0x8d, 0x0f, 0xc8, 0x53, 0x2b, - 0x73, 0xf7, 0x67, 0x1f, 0x92, 0xe4, 0xca, 0xd4, 0x95, 0x7c, 0xcd, 0x43, 0xb7, 0xfa, 0xee, 0x1e, - 0xbd, 0x0d, 0x9f, 0x2b, 0xc8, 0xe7, 0x22, 0x39, 0x3f, 0x89, 0xcf, 0xe8, 0x0d, 0x4a, 0x65, 0xda, - 0x95, 0x3f, 0x2c, 0x7c, 0x84, 0xbd, 0xee, 0x0f, 0x06, 0xb9, 0x3a, 0x05, 0xb0, 0x37, 0xfc, 0x39, - 0xaa, 0x5e, 0xdb, 0xb3, 0xbf, 0xa1, 0x76, 0x15, 0xa9, 0x5d, 0x26, 0x17, 0x77, 0x47, 0x2d, 0xed, - 0xd8, 0x43, 0x0b, 0x4a, 0xe9, 0x6d, 0x41, 0xde, 0x99, 0x04, 0xe7, 0xe5, 0x3b, 0xac, 0xda, 0xd8, - 0x85, 0x87, 0x81, 0xdc, 0x44, 0xc8, 0x67, 0xc9, 0xe9, 0x49, 0x90, 0xbd, 0x76, 0x27, 0x6c, 0xe1, - 0x4b, 0x7f, 0xe5, 0xee, 0xe3, 0xe7, 0x35, 0xeb, 0xc9, 0xf3, 0x9a, 0xf5, 0xd7, 0xf3, 0x9a, 0xf5, - 0xdd, 0x8b, 0xda, 0xcc, 0x93, 0x17, 0xb5, 0x99, 0x67, 0x2f, 0x6a, 0x33, 0x9f, 0x36, 0x83, 0x50, - 0x6e, 0xf5, 0xdb, 0x76, 0x87, 0xf5, 0x92, 0x78, 0xfa, 0x67, 0x59, 0xf8, 0xdb, 0x4e, 0xa7, 0x1b, - 0xd2, 0x48, 0x3a, 0x41, 0xcc, 0x3b, 0x8e, 0xec, 0x09, 0x3d, 0x73, 0xdb, 0x73, 0xf8, 0x76, 0x3f, - 0xf7, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x05, 0xb1, 0xf9, 0xc8, 0xf8, 0x0f, 0x00, 0x00, + // 1370 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xda, 0x69, 0x6c, 0x3f, 0x17, 0x94, 0x4e, 0x43, 0xbb, 0xb1, 0x52, 0xb7, 0xac, 0x44, + 0x9b, 0x7e, 0x64, 0x17, 0xbb, 0x9f, 0x87, 0xd2, 0xaa, 0x6e, 0x4b, 0x1a, 0x5a, 0x4a, 0xd8, 0x20, + 0x0e, 0x08, 0x69, 0xb5, 0xf6, 0x4e, 0x36, 0xab, 0xd8, 0x3b, 0xd3, 0x9d, 0xb1, 0xc1, 0x42, 0x48, + 0x88, 0x3f, 0x00, 0x21, 0xf1, 0x2f, 0xf4, 0x00, 0x5c, 0xb8, 0x20, 0x8e, 0x95, 0x10, 0x97, 0x1e, + 0xab, 0x22, 0xa1, 0x8a, 0x03, 0x42, 0x2d, 0x7f, 0x08, 0x9a, 0x8f, 0xb5, 0x77, 0xdb, 0xa4, 0x76, + 0x7a, 0xeb, 0xc9, 0xb3, 0xef, 0xf3, 0xf7, 0x7b, 0x6f, 0xe6, 0xcd, 0x18, 0x4e, 0x75, 0x08, 0xeb, + 0x11, 0xe6, 0xb4, 0x7d, 0x86, 0x1d, 0x8e, 0xe3, 0x00, 0x27, 0xbd, 0x28, 0xe6, 0xce, 0xa0, 0xd1, + 0xc6, 0xdc, 0x6f, 0x38, 0xf7, 0xfa, 0x38, 0x19, 0xda, 0x34, 0x21, 0x9c, 0xa0, 0xba, 0xb2, 0xb5, + 0x85, 0xad, 0x3d, 0xb6, 0xb5, 0xb5, 0x6d, 0x6d, 0x21, 0x24, 0x21, 0x91, 0xa6, 0x8e, 0x58, 0x29, + 0xaf, 0xda, 0x62, 0x48, 0x48, 0xd8, 0xc5, 0x8e, 0xfc, 0x6a, 0xf7, 0x37, 0x1d, 0x3f, 0xd6, 0x01, + 0x6b, 0x4b, 0x5a, 0xe5, 0xd3, 0xc8, 0xf1, 0xe3, 0x98, 0x70, 0x9f, 0x47, 0x24, 0x66, 0x5a, 0x5b, + 0xcb, 0xc0, 0xa1, 0x4d, 0xea, 0xf0, 0x21, 0xc5, 0xa9, 0x6e, 0x29, 0xa3, 0x93, 0xf2, 0x9c, 0x36, + 0x47, 0x4a, 0x32, 0x18, 0xf1, 0xa1, 0x7e, 0x18, 0xc5, 0x32, 0xcd, 0x4e, 0xb6, 0x3b, 0x14, 0x20, + 0x1b, 0x77, 0x51, 0xd9, 0x7a, 0x8a, 0xa3, 0xae, 0xc6, 0x6e, 0x80, 0xda, 0x5d, 0xd2, 0xd9, 0x56, + 0x5a, 0xeb, 0x1b, 0x03, 0xea, 0xab, 0x98, 0x7f, 0xea, 0x77, 0xa3, 0xc0, 0xe7, 0x24, 0xd9, 0xc0, + 0xbc, 0x35, 0xbc, 0x85, 0xa3, 0x70, 0x8b, 0xbb, 0xf8, 0x5e, 0x1f, 0x33, 0x8e, 0x0e, 0xc1, 0xdc, + 0x96, 0x14, 0x98, 0xc6, 0x31, 0x63, 0xb9, 0xe8, 0xea, 0x2f, 0xf4, 0x3e, 0xc0, 0x18, 0xb3, 0x59, + 0x38, 0x66, 0x2c, 0x57, 0x9b, 0xc7, 0xed, 0x6c, 0x27, 0x54, 0x8b, 0x34, 0x5e, 0x7b, 0xdd, 0x0f, + 0xb1, 0x8e, 0xe9, 0x66, 0x3c, 0xad, 0x27, 0x06, 0x1c, 0xdd, 0x15, 0x02, 0xa3, 0x24, 0x66, 0x18, + 0xbd, 0x0d, 0xfb, 0x25, 0x6a, 0x2f, 0x87, 0xa4, 0x2a, 0x65, 0xca, 0x14, 0xad, 0x01, 0x0c, 0xd2, + 0x10, 0xcc, 0x2c, 0x1c, 0x2b, 0x2e, 0x57, 0x9b, 0x27, 0xed, 0x97, 0x6f, 0x0c, 0x7b, 0x94, 0xd4, + 0xcd, 0x38, 0xa3, 0xd5, 0x1c, 0xb3, 0xa2, 0x64, 0x76, 0x62, 0x22, 0x33, 0x05, 0x35, 0x47, 0x6d, + 0x13, 0x96, 0x56, 0x31, 0xbf, 0xe3, 0x73, 0xcc, 0x72, 0xfc, 0xd2, 0xd2, 0xe6, 0x4b, 0x68, 0xbc, + 0x72, 0x09, 0xff, 0x32, 0xe0, 0xc8, 0x2e, 0x89, 0x5e, 0xef, 0x02, 0x3e, 0x30, 0xa0, 0x32, 0x4a, + 0x81, 0x9a, 0x50, 0xf2, 0x83, 0x20, 0xc1, 0x8c, 0x49, 0xfc, 0x95, 0x96, 0xf9, 0xf8, 0xd7, 0x95, + 0x05, 0x1d, 0xf6, 0x9a, 0xd2, 0x6c, 0xf0, 0x24, 0x8a, 0x43, 0x37, 0x35, 0x44, 0x2b, 0x50, 0xa2, + 0xfd, 0xb6, 0xb7, 0x8d, 0x87, 0x7a, 0x8b, 0x2e, 0xd8, 0xea, 0x6c, 0xdb, 0xe9, 0xb1, 0xb7, 0xaf, + 0xc5, 0x43, 0x77, 0x8e, 0xf6, 0xdb, 0xb7, 0xf1, 0x50, 0xd4, 0x69, 0x40, 0x78, 0x14, 0x87, 0x1e, + 0x25, 0x5f, 0xe0, 0x44, 0x62, 0x2f, 0xba, 0x55, 0x25, 0x5b, 0x17, 0x22, 0x74, 0x1a, 0x0e, 0xd0, + 0x84, 0x50, 0xc2, 0x70, 0xe2, 0xd1, 0x24, 0x22, 0x49, 0xc4, 0x87, 0xe6, 0xac, 0xb4, 0x9b, 0x4f, + 0x15, 0xeb, 0x5a, 0x6e, 0x35, 0xe0, 0xf0, 0x2a, 0xe6, 0x2d, 0x51, 0xe6, 0x29, 0xcf, 0x95, 0xf5, + 0x87, 0x01, 0xe6, 0x8b, 0x3e, 0xba, 0x8f, 0xe7, 0xa0, 0xac, 0xfa, 0x18, 0x05, 0x7a, 0xbf, 0x2c, + 0x66, 0xdb, 0xa2, 0x66, 0x82, 0x74, 0x5d, 0xbb, 0xe1, 0x96, 0xa4, 0xe9, 0x5a, 0x80, 0x56, 0x60, + 0x9f, 0x5c, 0xea, 0x12, 0x1c, 0xde, 0xc5, 0xc5, 0x55, 0x56, 0xa8, 0x05, 0x15, 0x16, 0x6c, 0x7b, + 0xca, 0x45, 0x75, 0xef, 0x9d, 0x49, 0x1b, 0x41, 0x05, 0x28, 0xb3, 0x60, 0x5b, 0xae, 0xac, 0xc3, + 0xf0, 0xd6, 0x68, 0x47, 0x2a, 0x9d, 0xa2, 0x6d, 0xfd, 0x6e, 0xc0, 0xa1, 0xe7, 0x35, 0xaf, 0x1b, + 0xb9, 0x83, 0x70, 0x60, 0x15, 0xf3, 0x8d, 0x61, 0xdc, 0x11, 0x7b, 0x4d, 0x13, 0xb3, 0x01, 0x65, + 0x85, 0x9a, 0x93, 0x09, 0x25, 0xa6, 0x44, 0x92, 0x52, 0xd9, 0x4d, 0x3f, 0xad, 0x05, 0x69, 0x7f, + 0x97, 0x04, 0x78, 0x2d, 0xde, 0x24, 0x69, 0x94, 0x9f, 0x0d, 0x38, 0x98, 0x13, 0xeb, 0x38, 0xe7, + 0xa1, 0x12, 0x93, 0x00, 0x7b, 0x51, 0xbc, 0x49, 0x74, 0x71, 0xcc, 0x2c, 0x54, 0xda, 0xa4, 0xf6, + 0xc8, 0xa9, 0x1c, 0xeb, 0x15, 0xfa, 0x1c, 0x0e, 0xfa, 0x94, 0x76, 0xa3, 0x8e, 0x3c, 0x4f, 0xde, + 0x00, 0x27, 0x6c, 0x3c, 0xad, 0x4f, 0x4f, 0x3c, 0xdd, 0xca, 0x5c, 0xc6, 0x44, 0x99, 0x38, 0x5a, + 0x6e, 0xfd, 0x58, 0x80, 0x6a, 0xc6, 0x06, 0x21, 0x98, 0x8d, 0xfd, 0x1e, 0x56, 0xa7, 0xd3, 0x95, + 0x6b, 0xb4, 0x08, 0x65, 0x9f, 0x52, 0x4f, 0xca, 0x0b, 0x52, 0x5e, 0xf2, 0x29, 0xbd, 0x2b, 0x54, + 0x26, 0x94, 0x52, 0x40, 0x45, 0xa5, 0xd1, 0x9f, 0xe8, 0x08, 0x40, 0x18, 0x71, 0xaf, 0x43, 0x7a, + 0xbd, 0x88, 0xcb, 0xc3, 0x55, 0x71, 0x2b, 0x61, 0xc4, 0xaf, 0x4b, 0x81, 0x50, 0xb7, 0xfb, 0x51, + 0x37, 0xf0, 0xb8, 0x1f, 0x32, 0x73, 0x9f, 0x52, 0x4b, 0xc9, 0x27, 0x7e, 0xc8, 0xa4, 0x37, 0x19, + 0x71, 0x9d, 0xd3, 0xde, 0x44, 0x23, 0x45, 0x37, 0x53, 0xef, 0x00, 0x53, 0x66, 0x96, 0xe4, 0xa0, + 0x3b, 0x3e, 0xa9, 0x14, 0x1f, 0x92, 0xa0, 0xdf, 0xc5, 0x3a, 0xcb, 0x0d, 0x4c, 0x19, 0x3a, 0x03, + 0x48, 0xdf, 0xba, 0x62, 0x3f, 0xa5, 0xd9, 0xca, 0x32, 0xdb, 0xbc, 0xd2, 0x6c, 0x04, 0xdb, 0x69, + 0xa9, 0x6e, 0xc1, 0x9c, 0x0a, 0x21, 0x8a, 0x44, 0x7d, 0xbe, 0x95, 0x16, 0x49, 0xac, 0xb3, 0x95, + 0x28, 0xe4, 0x2b, 0x31, 0x0f, 0x45, 0xd6, 0xef, 0xe9, 0xfa, 0x88, 0xa5, 0xb5, 0x05, 0xf3, 0xd7, + 0x5a, 0xd7, 0xd7, 0x3e, 0x16, 0x13, 0x34, 0x9d, 0x25, 0x08, 0x66, 0x03, 0x9f, 0xfb, 0x32, 0xe6, + 0x7e, 0x57, 0xae, 0x47, 0x79, 0x0a, 0x99, 0x3c, 0xe3, 0x99, 0x53, 0xcc, 0xdd, 0xe5, 0x0b, 0xb0, + 0x8f, 0x26, 0x64, 0x80, 0x65, 0xa9, 0xcb, 0xae, 0xfa, 0xb0, 0xbe, 0x2b, 0xc0, 0x81, 0x4c, 0x2a, + 0xbd, 0x13, 0x11, 0xcc, 0x76, 0x48, 0xa0, 0x9a, 0xfc, 0x86, 0x2b, 0xd7, 0x02, 0x65, 0x97, 0x84, + 0x29, 0xca, 0x2e, 0x09, 0x85, 0x95, 0xdc, 0xaa, 0xaa, 0x77, 0x72, 0x2d, 0xb2, 0x44, 0x71, 0x80, + 0xbf, 0x94, 0x1d, 0x2b, 0xba, 0xea, 0x43, 0xf8, 0x8a, 0xe9, 0x3c, 0x27, 0xa1, 0x8b, 0xa5, 0xb0, + 0x1b, 0xf8, 0xdd, 0x3e, 0x36, 0x4b, 0x52, 0xa6, 0x3e, 0xd0, 0x4d, 0xa8, 0xd0, 0x84, 0x90, 0x4d, + 0x8f, 0x50, 0x26, 0xcb, 0x5c, 0x6d, 0x2e, 0x4f, 0xea, 0xda, 0xba, 0x70, 0xf8, 0x88, 0x32, 0xb7, + 0x4c, 0xf5, 0x2a, 0x53, 0x82, 0x4a, 0xae, 0x04, 0x4b, 0x50, 0x11, 0x54, 0x18, 0xf5, 0x3b, 0xd8, + 0x04, 0xb5, 0x67, 0x46, 0x82, 0x0f, 0x66, 0xcb, 0x85, 0xf9, 0xa2, 0x75, 0x1d, 0x4a, 0x3a, 0xa2, + 0xe0, 0x27, 0x86, 0x4b, 0xda, 0x45, 0xb1, 0x4e, 0x99, 0x14, 0xc6, 0x4c, 0xd2, 0xbe, 0x14, 0xc7, + 0x7d, 0xb1, 0x6e, 0x43, 0x39, 0x85, 0x85, 0xae, 0x42, 0x51, 0xb0, 0x31, 0xe4, 0x1e, 0x3c, 0x31, + 0x25, 0x9b, 0xd6, 0xec, 0xc3, 0x7f, 0x8e, 0xce, 0xb8, 0xc2, 0xb3, 0xf9, 0x0b, 0x40, 0x69, 0x03, + 0x27, 0x83, 0xa8, 0x83, 0xd1, 0x4f, 0x06, 0x54, 0x33, 0xa3, 0x03, 0x35, 0x27, 0xc5, 0x7b, 0x71, + 0xfc, 0xd4, 0xce, 0xee, 0xc9, 0x47, 0xed, 0x08, 0xab, 0xf1, 0xed, 0x9f, 0xff, 0xfd, 0x50, 0x38, + 0x8d, 0x4e, 0x3a, 0x13, 0x9e, 0xac, 0xa3, 0x09, 0x86, 0xee, 0x1b, 0x00, 0xe3, 0x69, 0x89, 0x1a, + 0x53, 0xa4, 0xcd, 0x8f, 0xdb, 0x5a, 0x73, 0x2f, 0x2e, 0x1a, 0xa8, 0x23, 0x81, 0x9e, 0x44, 0x27, + 0x26, 0x01, 0xd5, 0x33, 0x1a, 0xfd, 0x66, 0xc0, 0x9b, 0xf9, 0xcb, 0x0a, 0x9d, 0x9f, 0x22, 0xef, + 0x8b, 0xd7, 0x5e, 0xed, 0xc2, 0x5e, 0xdd, 0x34, 0xe4, 0xf3, 0x12, 0xb2, 0x83, 0x56, 0x26, 0x41, + 0x96, 0x17, 0x1a, 0x73, 0xba, 0x32, 0x06, 0x7a, 0x60, 0xc0, 0xfc, 0xf3, 0x8f, 0x08, 0x74, 0x71, + 0x0a, 0x0c, 0x3b, 0x3d, 0x55, 0x6a, 0x97, 0xf6, 0xee, 0xa8, 0xe1, 0x5f, 0x94, 0xf0, 0x1b, 0xc8, + 0x99, 0x12, 0xfe, 0x57, 0xea, 0x34, 0x7e, 0x8d, 0x1e, 0x1b, 0x99, 0x07, 0x44, 0xf6, 0x49, 0x8b, + 0x2e, 0x4f, 0x5d, 0xc9, 0x1d, 0x9e, 0xdc, 0xb5, 0xf7, 0x5e, 0xd1, 0x5b, 0xf3, 0xb9, 0x2c, 0xf9, + 0x5c, 0x40, 0xe7, 0x26, 0xf1, 0x19, 0xbf, 0x86, 0x31, 0x1f, 0x75, 0xe5, 0x6f, 0x43, 0x3e, 0x07, + 0x77, 0xfa, 0xab, 0x83, 0xae, 0x4c, 0x01, 0xec, 0x25, 0x7f, 0xd3, 0x6a, 0x57, 0x5f, 0xd9, 0x5f, + 0x53, 0xbb, 0x22, 0xa9, 0x5d, 0x42, 0x17, 0xf6, 0x46, 0x6d, 0xd4, 0xb1, 0xfb, 0x06, 0x54, 0x46, + 0xb7, 0x05, 0x7a, 0x77, 0x12, 0x9c, 0xe7, 0xef, 0xb0, 0x5a, 0x63, 0x0f, 0x1e, 0x1a, 0x72, 0x53, + 0x42, 0x3e, 0x83, 0x4e, 0x4d, 0x82, 0xec, 0xb7, 0x3b, 0x91, 0x27, 0xff, 0x73, 0xb4, 0xee, 0x3c, + 0x7c, 0x5a, 0x37, 0x1e, 0x3d, 0xad, 0x1b, 0xff, 0x3e, 0xad, 0x1b, 0xdf, 0x3f, 0xab, 0xcf, 0x3c, + 0x7a, 0x56, 0x9f, 0x79, 0xf2, 0xac, 0x3e, 0xf3, 0x59, 0x33, 0x8c, 0xf8, 0x56, 0xbf, 0x6d, 0x77, + 0x48, 0x2f, 0x8d, 0xa7, 0x7e, 0x56, 0x58, 0xb0, 0xed, 0x74, 0xba, 0x11, 0x8e, 0xb9, 0x13, 0x26, + 0xb4, 0xe3, 0xf0, 0x1e, 0x53, 0x33, 0xb7, 0x3d, 0x27, 0xff, 0x45, 0x9c, 0xfd, 0x3f, 0x00, 0x00, + 0xff, 0xff, 0x70, 0x47, 0x21, 0xd5, 0xae, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1861,6 +1883,18 @@ func (m *GetBlockByHeightResponse) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l + if m.SdkBlock != nil { + { + size, err := m.SdkBlock.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } if m.Block != nil { { size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) @@ -1931,6 +1965,18 @@ func (m *GetLatestBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if m.SdkBlock != nil { + { + size, err := m.SdkBlock.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } if m.Block != nil { { size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) @@ -2565,6 +2611,10 @@ func (m *GetBlockByHeightResponse) Size() (n int) { l = m.Block.Size() n += 1 + l + sovQuery(uint64(l)) } + if m.SdkBlock != nil { + l = m.SdkBlock.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -2591,6 +2641,10 @@ func (m *GetLatestBlockResponse) Size() (n int) { l = m.Block.Size() n += 1 + l + sovQuery(uint64(l)) } + if m.SdkBlock != nil { + l = m.SdkBlock.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -3607,6 +3661,42 @@ func (m *GetBlockByHeightResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SdkBlock", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SdkBlock == nil { + m.SdkBlock = &Block{} + } + if err := m.SdkBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3779,6 +3869,42 @@ func (m *GetLatestBlockResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SdkBlock", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SdkBlock == nil { + m.SdkBlock = &Block{} + } + if err := m.SdkBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) diff --git a/client/grpc/tmservice/service.go b/client/grpc/tmservice/service.go index f5384036b83b..c8be26489790 100644 --- a/client/grpc/tmservice/service.go +++ b/client/grpc/tmservice/service.go @@ -72,8 +72,9 @@ func (s queryServer) GetLatestBlock(ctx context.Context, _ *GetLatestBlockReques } return &GetLatestBlockResponse{ - BlockId: &protoBlockID, - Block: protoBlock, + BlockId: &protoBlockID, + Block: protoBlock, + SdkBlock: convertBlock(protoBlock), }, nil } @@ -94,8 +95,9 @@ func (s queryServer) GetBlockByHeight(ctx context.Context, req *GetBlockByHeight } return &GetBlockByHeightResponse{ - BlockId: &protoBlockID, - Block: protoBlock, + BlockId: &protoBlockID, + Block: protoBlock, + SdkBlock: convertBlock(protoBlock), }, nil } diff --git a/client/grpc/tmservice/service_test.go b/client/grpc/tmservice/service_test.go index 816e171b5a69..9f426b958680 100644 --- a/client/grpc/tmservice/service_test.go +++ b/client/grpc/tmservice/service_test.go @@ -12,6 +12,7 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/cosmos/cosmos-sdk/testutil/rest" + "github.com/cosmos/cosmos-sdk/types" qtypes "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/version" ) @@ -53,7 +54,7 @@ func (s *IntegrationTestSuite) TearDownSuite() { s.network.Cleanup() } -func (s IntegrationTestSuite) TestQueryNodeInfo() { +func (s *IntegrationTestSuite) TestQueryNodeInfo() { val := s.network.Validators[0] res, err := s.queryClient.GetNodeInfo(context.Background(), &tmservice.GetNodeInfoRequest{}) @@ -67,7 +68,7 @@ func (s IntegrationTestSuite) TestQueryNodeInfo() { s.Require().Equal(getInfoRes.ApplicationVersion.AppName, version.NewInfo().AppName) } -func (s IntegrationTestSuite) TestQuerySyncing() { +func (s *IntegrationTestSuite) TestQuerySyncing() { val := s.network.Validators[0] _, err := s.queryClient.GetSyncing(context.Background(), &tmservice.GetSyncingRequest{}) @@ -79,7 +80,7 @@ func (s IntegrationTestSuite) TestQuerySyncing() { s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(restRes, &syncingRes)) } -func (s IntegrationTestSuite) TestQueryLatestBlock() { +func (s *IntegrationTestSuite) TestQueryLatestBlock() { val := s.network.Validators[0] _, err := s.queryClient.GetLatestBlock(context.Background(), &tmservice.GetLatestBlockRequest{}) @@ -89,9 +90,11 @@ func (s IntegrationTestSuite) TestQueryLatestBlock() { s.Require().NoError(err) var blockInfoRes tmservice.GetLatestBlockResponse s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(restRes, &blockInfoRes)) + s.Require().Equal(types.ValAddress(blockInfoRes.Block.Header.ProposerAddress).String(), blockInfoRes.SdkBlock.Header.ProposerAddress) + s.Require().Contains(blockInfoRes.SdkBlock.Header.ProposerAddress, "cosmosvaloper") } -func (s IntegrationTestSuite) TestQueryBlockByHeight() { +func (s *IntegrationTestSuite) TestQueryBlockByHeight() { val := s.network.Validators[0] _, err := s.queryClient.GetBlockByHeight(context.Background(), &tmservice.GetBlockByHeightRequest{Height: 1}) s.Require().NoError(err) @@ -100,9 +103,10 @@ func (s IntegrationTestSuite) TestQueryBlockByHeight() { s.Require().NoError(err) var blockInfoRes tmservice.GetBlockByHeightResponse s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(restRes, &blockInfoRes)) + s.Require().Contains(blockInfoRes.SdkBlock.Header.ProposerAddress, "cosmosvaloper") } -func (s IntegrationTestSuite) TestQueryLatestValidatorSet() { +func (s *IntegrationTestSuite) TestQueryLatestValidatorSet() { val := s.network.Validators[0] // nil pagination @@ -137,7 +141,7 @@ func (s IntegrationTestSuite) TestQueryLatestValidatorSet() { s.Require().Equal(validatorSetRes.Validators[0].PubKey, anyPub) } -func (s IntegrationTestSuite) TestLatestValidatorSet_GRPC() { +func (s *IntegrationTestSuite) TestLatestValidatorSet_GRPC() { vals := s.network.Validators testCases := []struct { name string @@ -168,7 +172,7 @@ func (s IntegrationTestSuite) TestLatestValidatorSet_GRPC() { } } -func (s IntegrationTestSuite) TestLatestValidatorSet_GRPCGateway() { +func (s *IntegrationTestSuite) TestLatestValidatorSet_GRPCGateway() { vals := s.network.Validators testCases := []struct { name string @@ -200,7 +204,7 @@ func (s IntegrationTestSuite) TestLatestValidatorSet_GRPCGateway() { } } -func (s IntegrationTestSuite) TestValidatorSetByHeight_GRPC() { +func (s *IntegrationTestSuite) TestValidatorSetByHeight_GRPC() { vals := s.network.Validators testCases := []struct { name string @@ -229,7 +233,7 @@ func (s IntegrationTestSuite) TestValidatorSetByHeight_GRPC() { } } -func (s IntegrationTestSuite) TestValidatorSetByHeight_GRPCGateway() { +func (s *IntegrationTestSuite) TestValidatorSetByHeight_GRPCGateway() { vals := s.network.Validators testCases := []struct { name string @@ -259,7 +263,7 @@ func (s IntegrationTestSuite) TestValidatorSetByHeight_GRPCGateway() { } } -func (s IntegrationTestSuite) TestABCIQuery() { +func (s *IntegrationTestSuite) TestABCIQuery() { testCases := []struct { name string req *tmservice.ABCIQueryRequest diff --git a/client/grpc/tmservice/types.pb.go b/client/grpc/tmservice/types.pb.go new file mode 100644 index 000000000000..e9bb255f2190 --- /dev/null +++ b/client/grpc/tmservice/types.pb.go @@ -0,0 +1,1368 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/base/tendermint/v1beta1/types.proto + +package tmservice + +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + types "github.com/tendermint/tendermint/proto/tendermint/types" + version "github.com/tendermint/tendermint/proto/tendermint/version" + _ "google.golang.org/protobuf/types/known/timestamppb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Block is tendermint type Block, with the Header proposer address +// field converted to bech32 string. +type Block struct { + Header Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header"` + Data types.Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data"` + Evidence types.EvidenceList `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence"` + LastCommit *types.Commit `protobuf:"bytes,4,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` +} + +func (m *Block) Reset() { *m = Block{} } +func (m *Block) String() string { return proto.CompactTextString(m) } +func (*Block) ProtoMessage() {} +func (*Block) Descriptor() ([]byte, []int) { + return fileDescriptor_bb9931519c08e0d6, []int{0} +} +func (m *Block) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Block.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Block) XXX_Merge(src proto.Message) { + xxx_messageInfo_Block.Merge(m, src) +} +func (m *Block) XXX_Size() int { + return m.Size() +} +func (m *Block) XXX_DiscardUnknown() { + xxx_messageInfo_Block.DiscardUnknown(m) +} + +var xxx_messageInfo_Block proto.InternalMessageInfo + +func (m *Block) GetHeader() Header { + if m != nil { + return m.Header + } + return Header{} +} + +func (m *Block) GetData() types.Data { + if m != nil { + return m.Data + } + return types.Data{} +} + +func (m *Block) GetEvidence() types.EvidenceList { + if m != nil { + return m.Evidence + } + return types.EvidenceList{} +} + +func (m *Block) GetLastCommit() *types.Commit { + if m != nil { + return m.LastCommit + } + return nil +} + +// Header defines the structure of a Tendermint block header. +type Header struct { + // basic block info + Version version.Consensus `protobuf:"bytes,1,opt,name=version,proto3" json:"version"` + ChainID string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` + Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"` + // prev block info + LastBlockId types.BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"` + // hashes of block data + LastCommitHash []byte `protobuf:"bytes,6,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"` + DataHash []byte `protobuf:"bytes,7,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` + // hashes from the app output from the prev block + ValidatorsHash []byte `protobuf:"bytes,8,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` + NextValidatorsHash []byte `protobuf:"bytes,9,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"` + ConsensusHash []byte `protobuf:"bytes,10,opt,name=consensus_hash,json=consensusHash,proto3" json:"consensus_hash,omitempty"` + AppHash []byte `protobuf:"bytes,11,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` + LastResultsHash []byte `protobuf:"bytes,12,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"` + // consensus info + EvidenceHash []byte `protobuf:"bytes,13,opt,name=evidence_hash,json=evidenceHash,proto3" json:"evidence_hash,omitempty"` + // proposer_address is the original block proposer address, formatted as a Bech32 string. + // In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string + // for better UX. + ProposerAddress string `protobuf:"bytes,14,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` +} + +func (m *Header) Reset() { *m = Header{} } +func (m *Header) String() string { return proto.CompactTextString(m) } +func (*Header) ProtoMessage() {} +func (*Header) Descriptor() ([]byte, []int) { + return fileDescriptor_bb9931519c08e0d6, []int{1} +} +func (m *Header) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Header.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Header) XXX_Merge(src proto.Message) { + xxx_messageInfo_Header.Merge(m, src) +} +func (m *Header) XXX_Size() int { + return m.Size() +} +func (m *Header) XXX_DiscardUnknown() { + xxx_messageInfo_Header.DiscardUnknown(m) +} + +var xxx_messageInfo_Header proto.InternalMessageInfo + +func (m *Header) GetVersion() version.Consensus { + if m != nil { + return m.Version + } + return version.Consensus{} +} + +func (m *Header) GetChainID() string { + if m != nil { + return m.ChainID + } + return "" +} + +func (m *Header) GetHeight() int64 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *Header) GetTime() time.Time { + if m != nil { + return m.Time + } + return time.Time{} +} + +func (m *Header) GetLastBlockId() types.BlockID { + if m != nil { + return m.LastBlockId + } + return types.BlockID{} +} + +func (m *Header) GetLastCommitHash() []byte { + if m != nil { + return m.LastCommitHash + } + return nil +} + +func (m *Header) GetDataHash() []byte { + if m != nil { + return m.DataHash + } + return nil +} + +func (m *Header) GetValidatorsHash() []byte { + if m != nil { + return m.ValidatorsHash + } + return nil +} + +func (m *Header) GetNextValidatorsHash() []byte { + if m != nil { + return m.NextValidatorsHash + } + return nil +} + +func (m *Header) GetConsensusHash() []byte { + if m != nil { + return m.ConsensusHash + } + return nil +} + +func (m *Header) GetAppHash() []byte { + if m != nil { + return m.AppHash + } + return nil +} + +func (m *Header) GetLastResultsHash() []byte { + if m != nil { + return m.LastResultsHash + } + return nil +} + +func (m *Header) GetEvidenceHash() []byte { + if m != nil { + return m.EvidenceHash + } + return nil +} + +func (m *Header) GetProposerAddress() string { + if m != nil { + return m.ProposerAddress + } + return "" +} + +func init() { + proto.RegisterType((*Block)(nil), "cosmos.base.tendermint.v1beta1.Block") + proto.RegisterType((*Header)(nil), "cosmos.base.tendermint.v1beta1.Header") +} + +func init() { + proto.RegisterFile("cosmos/base/tendermint/v1beta1/types.proto", fileDescriptor_bb9931519c08e0d6) +} + +var fileDescriptor_bb9931519c08e0d6 = []byte{ + // 623 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x94, 0xc1, 0x6e, 0xd3, 0x4c, + 0x14, 0x85, 0xe3, 0xbf, 0x69, 0xe2, 0x4e, 0x9a, 0xb6, 0xff, 0xa8, 0xaa, 0xdc, 0x00, 0x4e, 0x55, + 0x44, 0x29, 0x95, 0xb0, 0xdb, 0xb2, 0x81, 0x05, 0x12, 0x24, 0x41, 0x6a, 0xa5, 0xae, 0x2c, 0xc4, + 0x82, 0x4d, 0x34, 0xb6, 0x07, 0x7b, 0x54, 0xdb, 0x63, 0x79, 0x26, 0x11, 0xbc, 0x45, 0x1f, 0xab, + 0xcb, 0x2e, 0x59, 0x15, 0x94, 0x4a, 0x3c, 0x05, 0x0b, 0x34, 0x77, 0xc6, 0x6d, 0x42, 0x24, 0x56, + 0xb1, 0xcf, 0xfd, 0xce, 0xf1, 0xdc, 0x7b, 0x47, 0x41, 0x47, 0x11, 0x17, 0x39, 0x17, 0x7e, 0x48, + 0x04, 0xf5, 0x25, 0x2d, 0x62, 0x5a, 0xe5, 0xac, 0x90, 0xfe, 0xf4, 0x24, 0xa4, 0x92, 0x9c, 0xf8, + 0xf2, 0x5b, 0x49, 0x85, 0x57, 0x56, 0x5c, 0x72, 0xec, 0x6a, 0xd6, 0x53, 0xac, 0xf7, 0xc0, 0x7a, + 0x86, 0xed, 0x6d, 0x27, 0x3c, 0xe1, 0x80, 0xfa, 0xea, 0x49, 0xbb, 0x7a, 0x8f, 0xe7, 0x52, 0x21, + 0x6d, 0x3e, 0xb3, 0xd7, 0x5f, 0xaa, 0xd2, 0x29, 0x8b, 0x69, 0x11, 0x51, 0x03, 0xb8, 0xf3, 0x87, + 0xa2, 0x95, 0x60, 0xbc, 0x58, 0x0c, 0x48, 0x38, 0x4f, 0x32, 0xea, 0xc3, 0x5b, 0x38, 0xf9, 0xe2, + 0x4b, 0x96, 0x53, 0x21, 0x49, 0x5e, 0x6a, 0x60, 0xff, 0xb7, 0x85, 0x56, 0x07, 0x19, 0x8f, 0x2e, + 0xf1, 0x08, 0xb5, 0x52, 0x4a, 0x62, 0x5a, 0x39, 0xd6, 0x9e, 0x75, 0xd8, 0x39, 0x3d, 0xf0, 0xfe, + 0xdd, 0x90, 0x77, 0x06, 0xf4, 0xa0, 0x79, 0x7d, 0xdb, 0x6f, 0x04, 0xc6, 0x8b, 0x8f, 0x51, 0x33, + 0x26, 0x92, 0x38, 0xff, 0x41, 0xc6, 0xce, 0xbc, 0x4f, 0x9f, 0x6b, 0x44, 0x24, 0x31, 0x1e, 0x20, + 0xf1, 0x3b, 0x64, 0xd7, 0x4d, 0x39, 0x2b, 0xe0, 0x72, 0x97, 0x5d, 0x1f, 0x0c, 0x71, 0xc1, 0x84, + 0x34, 0xee, 0x7b, 0x17, 0x7e, 0x83, 0x3a, 0x19, 0x11, 0x72, 0x1c, 0xf1, 0x3c, 0x67, 0xd2, 0x69, + 0x42, 0x88, 0xb3, 0x1c, 0x32, 0x84, 0x7a, 0x80, 0x14, 0xac, 0x9f, 0xf7, 0x7f, 0x35, 0x51, 0x4b, + 0xf7, 0x81, 0xdf, 0xa2, 0xb6, 0x99, 0xa0, 0x19, 0xc0, 0x93, 0x85, 0xa6, 0x75, 0xc9, 0x1b, 0xf2, + 0x42, 0xd0, 0x42, 0x4c, 0x84, 0x39, 0x45, 0xed, 0xc1, 0x07, 0xc8, 0x8e, 0x52, 0xc2, 0x8a, 0x31, + 0x8b, 0xa1, 0xf9, 0xb5, 0x41, 0x67, 0x76, 0xdb, 0x6f, 0x0f, 0x95, 0x76, 0x3e, 0x0a, 0xda, 0x50, + 0x3c, 0x8f, 0xf1, 0x8e, 0x1a, 0x33, 0x4b, 0x52, 0x09, 0xcd, 0xae, 0x04, 0xe6, 0x0d, 0xbf, 0x46, + 0x4d, 0xb5, 0x1b, 0x73, 0xfa, 0x9e, 0xa7, 0x17, 0xe7, 0xd5, 0x8b, 0xf3, 0x3e, 0xd6, 0x8b, 0x1b, + 0xd8, 0xea, 0xc3, 0x57, 0x3f, 0xfa, 0x56, 0x00, 0x0e, 0x3c, 0x44, 0x5d, 0x68, 0x3f, 0x54, 0x6b, + 0x54, 0x9f, 0x5f, 0x85, 0x88, 0xdd, 0xe5, 0x01, 0xc0, 0xa2, 0xcf, 0x47, 0xe6, 0xe8, 0x30, 0x34, + 0x2d, 0xc5, 0xf8, 0x10, 0x6d, 0xcd, 0xcd, 0x70, 0x9c, 0x12, 0x91, 0x3a, 0xad, 0x3d, 0xeb, 0x70, + 0x3d, 0xd8, 0x78, 0x18, 0xd7, 0x19, 0x11, 0x29, 0x7e, 0x84, 0xd6, 0xd4, 0xde, 0x34, 0xd2, 0x06, + 0xc4, 0x56, 0x02, 0x14, 0x9f, 0xa3, 0xcd, 0x29, 0xc9, 0x58, 0x4c, 0x24, 0xaf, 0x84, 0x46, 0x6c, + 0x9d, 0xf2, 0x20, 0x03, 0x78, 0x8c, 0xb6, 0x0b, 0xfa, 0x55, 0x8e, 0xff, 0xa6, 0xd7, 0x80, 0xc6, + 0xaa, 0xf6, 0x69, 0xd1, 0xf1, 0x0c, 0x6d, 0x44, 0xf5, 0xf0, 0x35, 0x8b, 0x80, 0xed, 0xde, 0xab, + 0x80, 0xed, 0x22, 0x9b, 0x94, 0xa5, 0x06, 0x3a, 0x00, 0xb4, 0x49, 0x59, 0x42, 0xe9, 0x08, 0xfd, + 0x0f, 0x3d, 0x56, 0x54, 0x4c, 0x32, 0x69, 0x42, 0xd6, 0x81, 0xd9, 0x54, 0x85, 0x40, 0xeb, 0xc0, + 0x3e, 0x45, 0xdd, 0xfa, 0x7e, 0x69, 0xae, 0x0b, 0xdc, 0x7a, 0x2d, 0x02, 0xf4, 0x02, 0x6d, 0x95, + 0x15, 0x2f, 0xb9, 0xa0, 0xd5, 0x98, 0xc4, 0x71, 0x45, 0x85, 0x70, 0x36, 0xd4, 0xee, 0x83, 0xcd, + 0x5a, 0x7f, 0xaf, 0xe5, 0xc1, 0xc5, 0xf5, 0xcc, 0xb5, 0x6e, 0x66, 0xae, 0xf5, 0x73, 0xe6, 0x5a, + 0x57, 0x77, 0x6e, 0xe3, 0xe6, 0xce, 0x6d, 0x7c, 0xbf, 0x73, 0x1b, 0x9f, 0x4f, 0x13, 0x26, 0xd3, + 0x49, 0xe8, 0x45, 0x3c, 0xf7, 0xcd, 0xdf, 0x8d, 0xfe, 0x79, 0x29, 0xe2, 0x4b, 0x3f, 0xca, 0x18, + 0x2d, 0xa4, 0x9f, 0x54, 0x65, 0xe4, 0xcb, 0x5c, 0xd0, 0x6a, 0xca, 0x22, 0x1a, 0xb6, 0xe0, 0x5a, + 0xbc, 0xfa, 0x13, 0x00, 0x00, 0xff, 0xff, 0xdb, 0x09, 0x93, 0xea, 0xa0, 0x04, 0x00, 0x00, +} + +func (m *Block) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Block) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Block) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.LastCommit != nil { + { + size, err := m.LastCommit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + { + size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Header) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Header) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ProposerAddress) > 0 { + i -= len(m.ProposerAddress) + copy(dAtA[i:], m.ProposerAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress))) + i-- + dAtA[i] = 0x72 + } + if len(m.EvidenceHash) > 0 { + i -= len(m.EvidenceHash) + copy(dAtA[i:], m.EvidenceHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.EvidenceHash))) + i-- + dAtA[i] = 0x6a + } + if len(m.LastResultsHash) > 0 { + i -= len(m.LastResultsHash) + copy(dAtA[i:], m.LastResultsHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.LastResultsHash))) + i-- + dAtA[i] = 0x62 + } + if len(m.AppHash) > 0 { + i -= len(m.AppHash) + copy(dAtA[i:], m.AppHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash))) + i-- + dAtA[i] = 0x5a + } + if len(m.ConsensusHash) > 0 { + i -= len(m.ConsensusHash) + copy(dAtA[i:], m.ConsensusHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ConsensusHash))) + i-- + dAtA[i] = 0x52 + } + if len(m.NextValidatorsHash) > 0 { + i -= len(m.NextValidatorsHash) + copy(dAtA[i:], m.NextValidatorsHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.NextValidatorsHash))) + i-- + dAtA[i] = 0x4a + } + if len(m.ValidatorsHash) > 0 { + i -= len(m.ValidatorsHash) + copy(dAtA[i:], m.ValidatorsHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorsHash))) + i-- + dAtA[i] = 0x42 + } + if len(m.DataHash) > 0 { + i -= len(m.DataHash) + copy(dAtA[i:], m.DataHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.DataHash))) + i-- + dAtA[i] = 0x3a + } + if len(m.LastCommitHash) > 0 { + i -= len(m.LastCommitHash) + copy(dAtA[i:], m.LastCommitHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.LastCommitHash))) + i-- + dAtA[i] = 0x32 + } + { + size, err := m.LastBlockId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) + if err6 != nil { + return 0, err6 + } + i -= n6 + i = encodeVarintTypes(dAtA, i, uint64(n6)) + i-- + dAtA[i] = 0x22 + if m.Height != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x18 + } + if len(m.ChainID) > 0 { + i -= len(m.ChainID) + copy(dAtA[i:], m.ChainID) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainID))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Block) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Header.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Data.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Evidence.Size() + n += 1 + l + sovTypes(uint64(l)) + if m.LastCommit != nil { + l = m.LastCommit.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *Header) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Version.Size() + n += 1 + l + sovTypes(uint64(l)) + l = len(m.ChainID) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Height != 0 { + n += 1 + sovTypes(uint64(m.Height)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) + n += 1 + l + sovTypes(uint64(l)) + l = m.LastBlockId.Size() + n += 1 + l + sovTypes(uint64(l)) + l = len(m.LastCommitHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.DataHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ValidatorsHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.NextValidatorsHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ConsensusHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.AppHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.LastResultsHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.EvidenceHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ProposerAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Block) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Block: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastCommit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LastCommit == nil { + m.LastCommit = &types.Commit{} + } + if err := m.LastCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Header) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Header: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastBlockId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastBlockId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastCommitHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LastCommitHash = append(m.LastCommitHash[:0], dAtA[iNdEx:postIndex]...) + if m.LastCommitHash == nil { + m.LastCommitHash = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DataHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DataHash = append(m.DataHash[:0], dAtA[iNdEx:postIndex]...) + if m.DataHash == nil { + m.DataHash = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorsHash = append(m.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...) + if m.ValidatorsHash == nil { + m.ValidatorsHash = []byte{} + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NextValidatorsHash = append(m.NextValidatorsHash[:0], dAtA[iNdEx:postIndex]...) + if m.NextValidatorsHash == nil { + m.NextValidatorsHash = []byte{} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConsensusHash = append(m.ConsensusHash[:0], dAtA[iNdEx:postIndex]...) + if m.ConsensusHash == nil { + m.ConsensusHash = []byte{} + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) + if m.AppHash == nil { + m.AppHash = []byte{} + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LastResultsHash = append(m.LastResultsHash[:0], dAtA[iNdEx:postIndex]...) + if m.LastResultsHash == nil { + m.LastResultsHash = []byte{} + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EvidenceHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EvidenceHash = append(m.EvidenceHash[:0], dAtA[iNdEx:postIndex]...) + if m.EvidenceHash == nil { + m.EvidenceHash = []byte{} + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/client/grpc/tmservice/util.go b/client/grpc/tmservice/util.go new file mode 100644 index 000000000000..9bbda0d2e26e --- /dev/null +++ b/client/grpc/tmservice/util.go @@ -0,0 +1,38 @@ +package tmservice + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + tmprototypes "github.com/tendermint/tendermint/proto/tendermint/types" +) + +// convertHeader converts tendermint header to sdk header +func convertHeader(h tmprototypes.Header) Header { + return Header{ + Version: h.Version, + ChainID: h.ChainID, + Height: h.Height, + Time: h.Time, + LastBlockId: h.LastBlockId, + ValidatorsHash: h.ValidatorsHash, + NextValidatorsHash: h.NextValidatorsHash, + ConsensusHash: h.ConsensusHash, + AppHash: h.AppHash, + DataHash: h.DataHash, + EvidenceHash: h.EvidenceHash, + LastResultsHash: h.LastResultsHash, + LastCommitHash: h.LastCommitHash, + ProposerAddress: sdk.ValAddress(h.ProposerAddress).String(), + } +} + +// convertBlock converts tendermint block to sdk block +func convertBlock(tmblock *tmprototypes.Block) *Block { + b := new(Block) + + b.Header = convertHeader(tmblock.Header) + b.LastCommit = tmblock.LastCommit + b.Data = tmblock.Data + b.Evidence = tmblock.Evidence + + return b +} diff --git a/client/rpc/status.go b/client/rpc/status.go index b45fcb0c593f..edf2be748b82 100644 --- a/client/rpc/status.go +++ b/client/rpc/status.go @@ -47,10 +47,13 @@ func StatusCommand() *cobra.Command { return err } + var pk cryptotypes.PubKey // `status` has TM pubkeys, we need to convert them to our pubkeys. - pk, err := cryptocodec.FromTmPubKeyInterface(status.ValidatorInfo.PubKey) - if err != nil { - return err + if status.ValidatorInfo.PubKey != nil { + pk, err = cryptocodec.FromTmPubKeyInterface(status.ValidatorInfo.PubKey) + if err != nil { + return err + } } statusWithPk := resultStatus{ NodeInfo: status.NodeInfo, diff --git a/client/v2/go.mod b/client/v2/go.mod index 36046a0f2b6a..ab9d299b54b0 100644 --- a/client/v2/go.mod +++ b/client/v2/go.mod @@ -8,7 +8,7 @@ require ( github.com/iancoleman/strcase v0.2.0 github.com/spf13/cobra v1.5.0 github.com/spf13/pflag v1.0.5 - google.golang.org/grpc v1.47.0 + google.golang.org/grpc v1.48.0 google.golang.org/protobuf v1.28.0 gotest.tools/v3 v3.3.0 ) diff --git a/client/v2/go.sum b/client/v2/go.sum index 6c2fb1e99987..1f611995b44a 100644 --- a/client/v2/go.sum +++ b/client/v2/go.sum @@ -151,8 +151,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/contrib/images/simd-dlv/Dockerfile b/contrib/images/simd-dlv/Dockerfile index 128a062f92c0..6a81ef3e81f4 100644 --- a/contrib/images/simd-dlv/Dockerfile +++ b/contrib/images/simd-dlv/Dockerfile @@ -11,6 +11,7 @@ COPY math/go.mod math/go.sum /work/math/ COPY api/go.mod api/go.sum /work/api/ COPY core/go.mod core/go.sum /work/core/ COPY depinject/go.mod depinject/go.sum /work/depinject/ +COPY store/tools/ics23/go.mod store/tools/ics23/go.sum /work/store/tools/ics23/ RUN go mod download COPY ./ /work diff --git a/contrib/images/simd-env/Dockerfile b/contrib/images/simd-env/Dockerfile index 7ab63e471472..dae68a2175b8 100644 --- a/contrib/images/simd-env/Dockerfile +++ b/contrib/images/simd-env/Dockerfile @@ -10,6 +10,7 @@ COPY math/go.mod math/go.sum /work/math/ COPY api/go.mod api/go.sum /work/api/ COPY core/go.mod core/go.sum /work/core/ COPY depinject/go.mod depinject/go.sum /work/depinject/ +COPY store/tools/ics23/go.mod store/tools/ics23/go.sum /work/store/tools/ics23/ RUN go mod download COPY ./ /work diff --git a/core/appconfig/config_test.go b/core/appconfig/config_test.go index c1af334351d6..c5d04ba48465 100644 --- a/core/appconfig/config_test.go +++ b/core/appconfig/config_test.go @@ -118,5 +118,4 @@ modules: "@type": testpb.TestNoGoImportModule `)) expectContainerErrorContains(t, opt, "module should have ModuleDescriptor.go_import specified") - } diff --git a/core/go.mod b/core/go.mod index ce462a60efde..b9bc031a5370 100644 --- a/core/go.mod +++ b/core/go.mod @@ -21,7 +21,7 @@ require ( golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect golang.org/x/text v0.3.5 // indirect google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb // indirect - google.golang.org/grpc v1.47.0 // indirect + google.golang.org/grpc v1.48.0 // indirect gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) diff --git a/core/go.sum b/core/go.sum index 3ba6843578a2..35a28918998a 100644 --- a/core/go.sum +++ b/core/go.sum @@ -149,8 +149,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/cosmovisor/cmd/cosmovisor/init_test.go b/cosmovisor/cmd/cosmovisor/init_test.go index 472936eaac4b..056571f3bbb2 100644 --- a/cosmovisor/cmd/cosmovisor/init_test.go +++ b/cosmovisor/cmd/cosmovisor/init_test.go @@ -93,8 +93,10 @@ func (s *InitTestSuite) setEnv(t *testing.T, env *cosmovisorInitEnv) { } } -var _ io.Reader = BufferedPipe{} -var _ io.Writer = BufferedPipe{} +var ( + _ io.Reader = BufferedPipe{} + _ io.Writer = BufferedPipe{} +) // BufferedPipe contains a connected read/write pair of files (a pipe), // and a buffer of what goes through it that is populated in the background. diff --git a/cosmovisor/go.mod b/cosmovisor/go.mod index be5e574549d7..a534dbb7346c 100644 --- a/cosmovisor/go.mod +++ b/cosmovisor/go.mod @@ -3,7 +3,7 @@ module github.com/cosmos/cosmos-sdk/cosmovisor go 1.18 require ( - github.com/cosmos/cosmos-sdk v0.46.0-rc2 + github.com/cosmos/cosmos-sdk v0.46.0-rc3 github.com/hashicorp/go-getter v1.6.2 github.com/otiai10/copy v1.7.0 github.com/rs/zerolog v1.27.0 @@ -33,6 +33,7 @@ require ( github.com/cosmos/btcutil v1.0.4 // indirect github.com/cosmos/cosmos-proto v1.0.0-alpha7 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect + github.com/cosmos/gorocksdb v1.2.0 // indirect github.com/cosmos/iavl v0.17.3 // indirect github.com/cosmos/ledger-cosmos-go v0.11.1 // indirect github.com/cosmos/ledger-go v0.9.2 // indirect @@ -73,7 +74,7 @@ require ( github.com/jmhodges/levigo v1.0.0 // indirect github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect github.com/klauspost/compress v1.15.1 // indirect - github.com/libp2p/go-buffer-pool v0.0.2 // indirect + github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/magiconair/properties v1.8.6 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect @@ -101,12 +102,11 @@ require ( github.com/spf13/viper v1.12.0 // indirect github.com/subosito/gotenv v1.4.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/btcd v0.1.1 // indirect github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tendermint/tendermint v0.34.20-rc0 // indirect - github.com/tendermint/tm-db v0.6.6 // indirect + github.com/tendermint/tendermint v0.34.20-rc1 // indirect + github.com/tendermint/tm-db v0.6.7 // indirect github.com/ulikunitz/xz v0.5.8 // indirect github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 // indirect go.etcd.io/bbolt v1.3.6 // indirect diff --git a/cosmovisor/go.sum b/cosmovisor/go.sum index c3cc496cbe8c..833a04e696fc 100644 --- a/cosmovisor/go.sum +++ b/cosmovisor/go.sum @@ -264,11 +264,13 @@ github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44= github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= github.com/cosmos/cosmos-proto v1.0.0-alpha7 h1:yqYUOHF2jopwZh4dVQp3xgqwftE5/2hkrwIV6vkUbO0= github.com/cosmos/cosmos-proto v1.0.0-alpha7/go.mod h1:dosO4pSAbJF8zWCzCoTWP7nNsjcvSUBQmniFxDg5daw= -github.com/cosmos/cosmos-sdk v0.46.0-rc2 h1:3bFkg+TYjzns++rNOj+S2P8tfY4xTH79L8BB+Empl3Y= -github.com/cosmos/cosmos-sdk v0.46.0-rc2/go.mod h1:nK39fRb7XB+4X9aJyr3j0Mwp14epBWtrGZ6YXjeY44w= +github.com/cosmos/cosmos-sdk v0.46.0-rc3 h1:BWU0YJ1RXUCYUmKY8k3kH/yEavMF/7y81Sjd+2otZpY= +github.com/cosmos/cosmos-sdk v0.46.0-rc3/go.mod h1:fWrmJ90UcB11LoaaTtF/qsqkA8HusUc8+XARAdnJfmA= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= +github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= +github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= github.com/cosmos/iavl v0.17.3 h1:s2N819a2olOmiauVa0WAhoIJq9EhSXE9HDBAoR9k+8Y= github.com/cosmos/iavl v0.17.3/go.mod h1:prJoErZFABYZGDHka1R6Oay4z9PrNeFFiMKHDAMOi4w= github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= @@ -759,8 +761,9 @@ github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= +github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= +github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= @@ -1150,7 +1153,6 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= @@ -1163,7 +1165,6 @@ github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKk github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tdakkota/asciicheck v0.1.1/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= @@ -1172,11 +1173,12 @@ github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tendermint/tendermint v0.34.14/go.mod h1:FrwVm3TvsVicI9Z7FlucHV6Znfd5KBc/Lpp69cCwtk0= -github.com/tendermint/tendermint v0.34.20-rc0 h1:k0AtVmig69jDMyprn4zIMQJzgonyqZM2sFGN7TlKrIk= -github.com/tendermint/tendermint v0.34.20-rc0/go.mod h1:JZIr6ZIN2MDjKJvM+PLhMfAgEAWNuyxVQRaDOkaFv+E= +github.com/tendermint/tendermint v0.34.20-rc1 h1:5ej9Fk5zlDF6Pa8/FJKp9j3Sto95JdCV+wVJFi94E5k= +github.com/tendermint/tendermint v0.34.20-rc1/go.mod h1:u2xI6q3IeLQQ2NdIpRKLUKBNog0o7EzBpvDCE0/OTmg= github.com/tendermint/tm-db v0.6.4/go.mod h1:dptYhIpJ2M5kUuenLr+Yyf3zQOv1SgBZcl8/BmWlMBw= -github.com/tendermint/tm-db v0.6.6 h1:EzhaOfR0bdKyATqcd5PNeyeq8r+V4bRPHBfyFdD9kGM= github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= +github.com/tendermint/tm-db v0.6.7 h1:fE00Cbl0jayAoqlExN6oyQJ7fR/ZtoVOmvPJ//+shu8= +github.com/tendermint/tm-db v0.6.7/go.mod h1:byQDzFkZV1syXr/ReXS808NxA2xvyuuVgXOJ/088L6I= github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= @@ -1204,7 +1206,7 @@ github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyC github.com/valyala/fasthttp v1.30.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus= github.com/valyala/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/VPSJnLYn+LmLk8= github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= -github.com/vektra/mockery/v2 v2.13.1/go.mod h1:bnD1T8tExSgPD1ripLkDbr60JA9VtQeu12P3wgLZd7M= +github.com/vektra/mockery/v2 v2.14.0/go.mod h1:bnD1T8tExSgPD1ripLkDbr60JA9VtQeu12P3wgLZd7M= github.com/viki-org/dnscache v0.0.0-20130720023526-c70c1f23c5d8/go.mod h1:dniwbG03GafCjFohMDmz6Zc6oCuiqgH6tGNyXTkHzXE= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= diff --git a/crypto/armor_test.go b/crypto/armor_test.go index cc278aab6c38..e283afb48b96 100644 --- a/crypto/armor_test.go +++ b/crypto/armor_test.go @@ -13,13 +13,16 @@ import ( tmcrypto "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/xsalsa20symmetric" + "cosmossdk.io/depinject" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/legacy" "github.com/cosmos/cosmos-sdk/crypto" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/cosmos/cosmos-sdk/simapp" + _ "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/testutil/configurator" "github.com/cosmos/cosmos-sdk/types" ) @@ -71,8 +74,11 @@ func TestArmorUnarmorPrivKey(t *testing.T) { func TestArmorUnarmorPubKey(t *testing.T) { // Select the encryption and storage for your cryptostore - encCfg := simapp.MakeTestEncodingConfig() - cstore := keyring.NewInMemory(encCfg.Codec) + var cdc codec.Codec + err := depinject.Inject(configurator.NewAppConfig(), &cdc) + require.NoError(t, err) + + cstore := keyring.NewInMemory(cdc) // Add keys and see they return in alphabetical order k, _, err := cstore.NewMnemonic("Bob", keyring.English, types.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1) diff --git a/crypto/keys/multisig/multisig_test.go b/crypto/keys/multisig/multisig_test.go index ae3023da828b..458379e31662 100644 --- a/crypto/keys/multisig/multisig_test.go +++ b/crypto/keys/multisig/multisig_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/require" + "cosmossdk.io/depinject" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/legacy" "github.com/cosmos/cosmos-sdk/codec/types" @@ -15,7 +16,8 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/crypto/types/multisig" - "github.com/cosmos/cosmos-sdk/simapp" + _ "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/testutil/configurator" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" @@ -356,8 +358,10 @@ func TestDisplay(t *testing.T) { require.PanicsWithValue("reflect.Value.Interface: cannot return value obtained from unexported field or method", func() { require.Empty(msig.String()) }, ) - ccfg := simapp.MakeTestEncodingConfig() - bz, err := ccfg.Codec.MarshalInterfaceJSON(msig) + var cdc codec.Codec + err := depinject.Inject(configurator.NewAppConfig(), &cdc) + require.NoError(err) + bz, err := cdc.MarshalInterfaceJSON(msig) require.NoError(err) expectedPrefix := `{"@type":"/cosmos.crypto.multisig.LegacyAminoPubKey","threshold":2,"public_keys":[{"@type":"/cosmos.crypto.secp256k1.PubKey"` require.True(strings.HasPrefix(string(bz), expectedPrefix)) diff --git a/depinject/internal/codegen/file.go b/depinject/internal/codegen/file.go new file mode 100644 index 000000000000..dba77becb13e --- /dev/null +++ b/depinject/internal/codegen/file.go @@ -0,0 +1,90 @@ +package codegen + +import ( + "fmt" + "go/ast" + "go/token" + "strconv" +) + +// FileGen is a utility for generating/patching golang file ASTs. +type FileGen struct { + File *ast.File + idents map[string]bool + codegenPkgPath string + pkgImportMap map[string]*importInfo +} + +// NewFileGen creates a new FileGen instance from a file AST with the provided package path. +func NewFileGen(file *ast.File, codegenPkgPath string) (*FileGen, error) { + g := &FileGen{ + File: file, + idents: map[string]bool{}, + codegenPkgPath: codegenPkgPath, + pkgImportMap: map[string]*importInfo{}, + } + + // add all go keywords to reserved idents + for i := token.Token(0); i <= token.TILDE; i++ { + name := i.String() + if token.IsKeyword(name) { + g.idents[name] = true + } + } + + // add all top-level decl idents + for _, decl := range file.Decls { + switch decl := decl.(type) { + case *ast.FuncDecl: + g.idents[decl.Name.Name] = true + case *ast.GenDecl: + for _, spec := range decl.Specs { + switch spec := spec.(type) { + case *ast.TypeSpec: + g.idents[spec.Name.Name] = true + case *ast.ValueSpec: + for _, name := range spec.Names { + g.idents[name.Name] = true + } + } + } + } + } + + for _, spec := range file.Imports { + pkgPath, err := strconv.Unquote(spec.Path.Value) + if err != nil { + return nil, err + } + + var info *importInfo + if spec.Name != nil { + name := spec.Name.Name + if name == "." { + return nil, fmt.Errorf(". package imports are not allowed") + } + + info = &importInfo{importPrefix: name, ImportSpec: spec} + } else { + prefix := defaultPkgPrefix(pkgPath) + info = &importInfo{importPrefix: prefix, ImportSpec: spec} + } + g.pkgImportMap[pkgPath] = info + g.idents[info.importPrefix] = true + } + + return g, nil +} + +// PatchFuncDecl returns a FuncGen instance for the function declaration with the given name or returns nil. +func (g *FileGen) PatchFuncDecl(name string) *FuncGen { + for _, decl := range g.File.Decls { + funcDecl, ok := decl.(*ast.FuncDecl) + if ok { + if funcDecl.Name.Name == name { + return newFuncGen(g, funcDecl) + } + } + } + return nil +} diff --git a/depinject/internal/codegen/func.go b/depinject/internal/codegen/func.go new file mode 100644 index 000000000000..f776d743022d --- /dev/null +++ b/depinject/internal/codegen/func.go @@ -0,0 +1,31 @@ +package codegen + +import ( + "go/ast" +) + +// FuncGen is a utility for generating/patching golang function declaration ASTs. +type FuncGen struct { + *FileGen + Func *ast.FuncDecl +} + +func newFuncGen(fileGen *FileGen, f *ast.FuncDecl) *FuncGen { + g := &FuncGen{FileGen: fileGen, Func: f} + + // reserve param idents + for _, field := range f.Type.Params.List { + for _, name := range field.Names { + g.idents[name.Name] = true + } + } + + // reserve result + for _, field := range f.Type.Results.List { + for _, name := range field.Names { + g.idents[name.Name] = true + } + } + + return g +} diff --git a/depinject/internal/codegen/ident.go b/depinject/internal/codegen/ident.go new file mode 100644 index 000000000000..045678910d71 --- /dev/null +++ b/depinject/internal/codegen/ident.go @@ -0,0 +1,29 @@ +package codegen + +import ( + "fmt" + "go/ast" +) + +// CreateIdent creates a new ident that doesn't conflict with reserved symbols, +// top-level declarations and other defined idents. Idents are unique across +// the whole file as it is assumed that codegen usually happens on one function +// per file. +func (g *FileGen) CreateIdent(namePrefix string) *ast.Ident { + return ast.NewIdent(g.doCreateIdent(namePrefix)) +} + +func (g *FileGen) doCreateIdent(namePrefix string) string { + v := namePrefix + i := 2 + for { + _, ok := g.idents[v] + if !ok { + g.idents[v] = true + return v + } + + v = fmt.Sprintf("%s%d", namePrefix, i) + i++ + } +} diff --git a/depinject/internal/codegen/ident_test.go b/depinject/internal/codegen/ident_test.go new file mode 100644 index 000000000000..bd7e1bc4f65b --- /dev/null +++ b/depinject/internal/codegen/ident_test.go @@ -0,0 +1,48 @@ +package codegen + +import ( + "go/parser" + "go/token" + "testing" + + "gotest.tools/v3/assert" +) + +func TestReservedIdents(t *testing.T) { + const src = ` +package mypkg + +import "example.com/bar" + +type MyInt int + +var myVar int + +func Build(a, a2 int, b string) (c int, err error) {} +` + file, err := parser.ParseFile(token.NewFileSet(), "", src, 0) + assert.NilError(t, err) + + fileGen, err := NewFileGen(file, "example.com/mypkg") + assert.NilError(t, err) + funcGen := fileGen.PatchFuncDecl("Build") + assert.Assert(t, funcGen != nil) + + // go keywords get a suffix + assert.Equal(t, "type2", funcGen.CreateIdent("type").Name) + assert.Equal(t, "package2", funcGen.CreateIdent("package").Name) + assert.Equal(t, "goto2", funcGen.CreateIdent("goto").Name) + + // import name prefixes get suffixes + assert.Equal(t, "bar2", funcGen.CreateIdent("bar").Name) + + // top-level decl names get prefixes + assert.Equal(t, "MyInt2", funcGen.CreateIdent("MyInt").Name) + assert.Equal(t, "myVar2", funcGen.CreateIdent("myVar").Name) + + // param and result names get suffixes at func level + assert.Equal(t, "a3", funcGen.CreateIdent("a").Name) + assert.Equal(t, "b2", funcGen.CreateIdent("b").Name) + assert.Equal(t, "c2", funcGen.CreateIdent("c").Name) + assert.Equal(t, "err2", funcGen.CreateIdent("err").Name) +} diff --git a/depinject/internal/codegen/import.go b/depinject/internal/codegen/import.go new file mode 100644 index 000000000000..171f2d462a7d --- /dev/null +++ b/depinject/internal/codegen/import.go @@ -0,0 +1,48 @@ +package codegen + +import ( + "fmt" + "go/ast" + "go/token" + "strings" +) + +type importInfo struct { + *ast.ImportSpec + importPrefix string +} + +// AddOrGetImport adds a new import for the provided pkgPath (if needed) and +// returns the unique import prefix for that path. +func (g *FileGen) AddOrGetImport(pkgPath string) (importPrefix string) { + if pkgPath == "" || pkgPath == g.codegenPkgPath { + return "" + } + + if i, ok := g.pkgImportMap[pkgPath]; ok { + return i.importPrefix + } + + imp := &ast.ImportSpec{ + Path: &ast.BasicLit{Kind: token.STRING, Value: fmt.Sprintf("%q", pkgPath)}, + } + + defaultPrefix := defaultPkgPrefix(pkgPath) + importPrefix = g.doCreateIdent(defaultPrefix) + + if importPrefix != defaultPrefix { + imp.Name = ast.NewIdent(importPrefix) + } + g.File.Imports = append(g.File.Imports, imp) + g.pkgImportMap[pkgPath] = &importInfo{ + ImportSpec: imp, + importPrefix: importPrefix, + } + g.idents[importPrefix] = true + return importPrefix +} + +func defaultPkgPrefix(pkgPath string) string { + pkgParts := strings.Split(pkgPath, "/") + return pkgParts[len(pkgParts)-1] +} diff --git a/depinject/internal/codegen/import_test.go b/depinject/internal/codegen/import_test.go new file mode 100644 index 000000000000..4665ed9ffb1c --- /dev/null +++ b/depinject/internal/codegen/import_test.go @@ -0,0 +1,60 @@ +package codegen + +import ( + "go/parser" + "go/token" + "testing" + + "gotest.tools/v3/assert" +) + +func TestImport(t *testing.T) { + const badFileSrc = ` +package mypkg + +import . "example.com/foo" +` + + badFile, err := parser.ParseFile(token.NewFileSet(), "", badFileSrc, 0) + assert.NilError(t, err) + + _, err = NewFileGen(badFile, "example.com/mypkg") + assert.ErrorContains(t, err, ".") + + const goodFileSrc = ` +package mypkg + +import "example.com/foo" +import abc "example.com/bar" +` + + goodFile, err := parser.ParseFile(token.NewFileSet(), "", goodFileSrc, 0) + assert.NilError(t, err) + assert.Equal(t, 2, len(goodFile.Imports)) + + fgen, err := NewFileGen(goodFile, "example.com/mypkg") + assert.NilError(t, err) + + // self import is "" + assert.Equal(t, "", fgen.AddOrGetImport("example.com/mypkg")) + + // bar import is abc, no new import was added + assert.Equal(t, "abc", fgen.AddOrGetImport("example.com/bar")) + assert.Equal(t, 2, len(goodFile.Imports)) + + // foo import is foo, no new import is added + assert.Equal(t, "foo", fgen.AddOrGetImport("example.com/foo")) + assert.Equal(t, 2, len(goodFile.Imports)) + + // baz import is baz, a new import is added + assert.Equal(t, "baz", fgen.AddOrGetImport("example.com/baz")) + assert.Equal(t, 3, len(goodFile.Imports)) + + // another foo import is foo2, a new import is added + assert.Equal(t, "foo2", fgen.AddOrGetImport("example2.com/foo")) + assert.Equal(t, 4, len(goodFile.Imports)) + + // another baz import is baz2, a new import is added + assert.Equal(t, "baz2", fgen.AddOrGetImport("example.com/foo/baz")) + assert.Equal(t, 5, len(goodFile.Imports)) +} diff --git a/errors/go.mod b/errors/go.mod index 9103e9e48be2..17c27da29364 100644 --- a/errors/go.mod +++ b/errors/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.8.0 - google.golang.org/grpc v1.47.0 + google.golang.org/grpc v1.48.0 ) require ( diff --git a/errors/go.sum b/errors/go.sum index 05c58bf14f79..c21cee931ab8 100644 --- a/errors/go.sum +++ b/errors/go.sum @@ -113,8 +113,8 @@ google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/go.mod b/go.mod index d4f170f203bd..ed8f5ca1f6f8 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( cosmossdk.io/depinject v1.0.0-alpha.4 cosmossdk.io/errors v1.0.0-beta.7 cosmossdk.io/math v1.0.0-beta.2 - github.com/99designs/keyring v1.1.6 + github.com/99designs/keyring v1.2.1 github.com/armon/go-metrics v0.4.0 github.com/bgentry/speakeasy v0.1.0 github.com/btcsuite/btcd v0.22.1 @@ -18,16 +18,15 @@ require ( github.com/cosmos/btcutil v1.0.4 github.com/cosmos/cosmos-proto v1.0.0-alpha7 github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1 - github.com/cosmos/cosmos-sdk/store/tools/ics23 v0.0.0-20220608170201-b0e82f964070 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/iavl v0.18.0 github.com/cosmos/ledger-cosmos-go v0.11.1 github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/gogo/gateway v1.1.0 - github.com/gogo/protobuf v1.3.3 + github.com/gogo/protobuf v1.3.2 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.2 - github.com/golangci/golangci-lint v1.46.2 + github.com/golangci/golangci-lint v1.47.0 github.com/google/uuid v1.3.0 github.com/gorilla/handlers v1.5.1 github.com/gorilla/mux v1.8.0 @@ -43,7 +42,7 @@ require ( github.com/mattn/go-isatty v0.0.14 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.12.2 - github.com/prometheus/common v0.36.0 + github.com/prometheus/common v0.37.0 github.com/rakyll/statik v0.1.7 github.com/regen-network/cosmos-proto v0.3.1 github.com/rs/zerolog v1.27.0 @@ -57,15 +56,17 @@ require ( github.com/tendermint/go-amino v0.16.0 github.com/tendermint/tendermint v0.35.6 github.com/tendermint/tm-db v0.6.7 - golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 + golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e golang.org/x/exp v0.0.0-20220428152302-39d4317da171 google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd - google.golang.org/grpc v1.47.0 + google.golang.org/grpc v1.48.0 google.golang.org/protobuf v1.28.0 - pgregory.net/rapid v0.4.7 + pgregory.net/rapid v0.4.8 sigs.k8s.io/yaml v1.3.0 ) +require github.com/cosmos/cosmos-sdk/store/tools/ics23 v0.0.0-00010101000000-000000000000 + require ( 4d63.com/gochecknoglobals v0.1.0 // indirect cloud.google.com/go v0.100.2 // indirect @@ -73,15 +74,17 @@ require ( cloud.google.com/go/iam v0.3.0 // indirect cloud.google.com/go/storage v1.14.0 // indirect filippo.io/edwards25519 v1.0.0-rc.1 // indirect - github.com/Antonboom/errname v0.1.6 // indirect + github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect + github.com/Antonboom/errname v0.1.7 // indirect github.com/Antonboom/nilnil v0.1.1 // indirect github.com/BurntSushi/toml v1.1.0 // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect - github.com/GaijinEntertainment/go-exhaustruct/v2 v2.1.0 // indirect + github.com/GaijinEntertainment/go-exhaustruct/v2 v2.2.0 // indirect github.com/Masterminds/semver v1.5.0 // indirect github.com/OpenPeeDeeP/depguard v1.1.0 // indirect github.com/Workiva/go-datastructures v1.0.53 // indirect github.com/alexkohler/prealloc v1.0.0 // indirect + github.com/alingse/asasalint v0.0.10 // indirect github.com/ashanbrown/forbidigo v1.3.0 // indirect github.com/ashanbrown/makezero v1.1.1 // indirect github.com/aws/aws-sdk-go v1.40.45 // indirect @@ -101,23 +104,23 @@ require ( github.com/cosmos/gorocksdb v1.2.0 // indirect github.com/cosmos/ledger-go v0.9.2 // indirect github.com/creachadair/taskgroup v0.3.2 // indirect - github.com/daixiang0/gci v0.3.3 // indirect - github.com/danieljoos/wincred v1.0.2 // indirect + github.com/daixiang0/gci v0.4.2 // indirect + github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/denis-tingaikin/go-header v0.4.3 // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.0 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.0 // indirect - github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b // indirect + github.com/dvsekhvalnov/jose2go v1.5.0 // indirect github.com/esimonov/ifshort v1.0.4 // indirect github.com/ettle/strcase v0.1.1 // indirect github.com/fatih/color v1.13.0 // indirect github.com/fatih/structtag v1.2.0 // indirect github.com/felixge/httpsnoop v1.0.1 // indirect - github.com/firefart/nonamedreturns v1.0.1 // indirect + github.com/firefart/nonamedreturns v1.0.4 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect - github.com/fzipp/gocyclo v0.5.1 // indirect + github.com/fzipp/gocyclo v0.6.0 // indirect github.com/go-critic/go-critic v0.6.3 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-toolsmith/astcast v1.0.0 // indirect @@ -160,7 +163,7 @@ require ( github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect - github.com/hashicorp/go-version v1.4.0 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hexops/gotextdiff v1.0.3 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect @@ -170,12 +173,11 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/julz/importas v0.1.0 // indirect - github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect - github.com/kisielk/errcheck v1.6.0 // indirect + github.com/kisielk/errcheck v1.6.1 // indirect github.com/kisielk/gotool v1.0.0 // indirect - github.com/klauspost/compress v1.13.6 // indirect - github.com/kulti/thelper v0.6.2 // indirect - github.com/kunwardeep/paralleltest v1.0.3 // indirect + github.com/klauspost/compress v1.15.1 // indirect + github.com/kulti/thelper v0.6.3 // indirect + github.com/kunwardeep/paralleltest v1.0.6 // indirect github.com/kyoh86/exportloopref v0.1.8 // indirect github.com/ldez/gomoddirectives v0.2.3 // indirect github.com/ldez/tagliatelle v0.3.1 // indirect @@ -183,7 +185,7 @@ require ( github.com/lib/pq v1.10.6 // indirect github.com/libp2p/go-buffer-pool v0.0.2 // indirect github.com/lufeee/execinquery v1.2.1 // indirect - github.com/maratori/testpackage v1.0.1 // indirect + github.com/maratori/testpackage v1.1.0 // indirect github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect @@ -198,12 +200,12 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/nakabonne/nestif v0.3.1 // indirect github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect - github.com/nishanths/exhaustive v0.7.11 // indirect + github.com/nishanths/exhaustive v0.8.1 // indirect github.com/nishanths/predeclared v0.2.2 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20210609091139-0a56a4bca00b // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.1 // indirect + github.com/pelletier/go-toml/v2 v2.0.2 // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect github.com/pmezard/go-difflib v1.0.0 // indirect @@ -220,11 +222,12 @@ require ( github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect github.com/sanposhiho/wastedassign/v2 v2.0.6 // indirect github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect - github.com/securego/gosec/v2 v2.11.0 // indirect + github.com/securego/gosec/v2 v2.12.0 // indirect github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect github.com/sirupsen/logrus v1.8.1 // indirect github.com/sivchari/containedctx v1.0.2 // indirect - github.com/sivchari/tenv v1.5.0 // indirect + github.com/sivchari/nosnakecase v1.5.0 // indirect + github.com/sivchari/tenv v1.6.0 // indirect github.com/sonatard/noctx v0.0.1 // indirect github.com/sourcegraph/go-diff v0.6.1 // indirect github.com/spf13/afero v1.8.2 // indirect @@ -232,40 +235,43 @@ require ( github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect github.com/stretchr/objx v0.4.0 // indirect - github.com/subosito/gotenv v1.3.0 // indirect + github.com/subosito/gotenv v1.4.0 // indirect github.com/sylvia7788/contextcheck v1.0.4 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/tdakkota/asciicheck v0.1.1 // indirect github.com/tetafro/godot v1.4.11 // indirect github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144 // indirect - github.com/tomarrell/wrapcheck/v2 v2.6.1 // indirect + github.com/tomarrell/wrapcheck/v2 v2.6.2 // indirect github.com/tommy-muehle/go-mnd/v2 v2.5.0 // indirect github.com/ulikunitz/xz v0.5.8 // indirect github.com/ultraware/funlen v0.0.3 // indirect github.com/ultraware/whitespace v0.0.5 // indirect - github.com/uudashr/gocognit v1.0.5 // indirect + github.com/uudashr/gocognit v1.0.6 // indirect github.com/yagipy/maintidx v1.0.0 // indirect github.com/yeya24/promlinter v0.2.0 // indirect github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 // indirect - gitlab.com/bosi/decorder v0.2.1 // indirect + gitlab.com/bosi/decorder v0.2.2 // indirect go.etcd.io/bbolt v1.3.6 // indirect go.opencensus.io v0.23.0 // indirect + go.uber.org/atomic v1.9.0 // indirect + go.uber.org/multierr v1.7.0 // indirect + go.uber.org/zap v1.19.1 // indirect golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e // indirect - golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect - golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 // indirect + golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect + golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 // indirect - golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect + golang.org/x/sys v0.0.0-20220702020025-31831981b65f // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/text v0.3.7 // indirect - golang.org/x/tools v0.1.11-0.20220316014157-77aa08bb151a // indirect + golang.org/x/tools v0.1.11 // indirect golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect google.golang.org/api v0.81.0 // indirect google.golang.org/appengine v1.6.7 // indirect - gopkg.in/ini.v1 v1.66.4 // indirect + gopkg.in/ini.v1 v1.66.6 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - honnef.co/go/tools v0.3.1 // indirect + honnef.co/go/tools v0.3.2 // indirect mvdan.cc/gofumpt v0.3.1 // indirect mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect @@ -277,8 +283,8 @@ replace ( cosmossdk.io/api => ./api cosmossdk.io/core => ./core cosmossdk.io/depinject => ./depinject - github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 github.com/cosmos/cosmos-sdk/db => ./db + github.com/cosmos/cosmos-sdk/store/tools/ics23 => ./store/tools/ics23 // Fix upstream GHSA-h395-qcrw-5vmq vulnerability. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 diff --git a/go.sum b/go.sum index a733d703ad77..fa3ee4671236 100644 --- a/go.sum +++ b/go.sum @@ -74,8 +74,13 @@ cosmossdk.io/math v1.0.0-beta.2/go.mod h1:u/MXvf8wbUbCsAEyQSSYXXMsczAsFX48e2D6JI dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= -github.com/Antonboom/errname v0.1.6 h1:LzIJZlyLOCSu51o3/t2n9Ck7PcoP9wdbrdaW6J8fX24= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= +github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= +github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= github.com/Antonboom/errname v0.1.6/go.mod h1:7lz79JAnuoMNDAWE9MeeIr1/c/VpSUWatBv2FH9NYpI= +github.com/Antonboom/errname v0.1.7 h1:mBBDKvEYwPl4WFFNwec1CZO096G6vzK9vvDQzAwkako= +github.com/Antonboom/errname v0.1.7/go.mod h1:g0ONh16msHIPgJSGsecu1G/dcF2hlYR/0SddnIAGavU= github.com/Antonboom/nilnil v0.1.1 h1:PHhrh5ANKFWRBh7TdYmyyq2gyT2lotnvFvvFbylF81Q= github.com/Antonboom/nilnil v0.1.1/go.mod h1:L1jBqoWM7AOeTD+tSquifKSesRHs4ZdaxvZR+xdJEaI= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= @@ -93,8 +98,9 @@ github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3 github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= -github.com/GaijinEntertainment/go-exhaustruct/v2 v2.1.0 h1:LAPPhJ4KR5Z8aKVZF5S48csJkxL5RMKmE/98fMs1u5M= github.com/GaijinEntertainment/go-exhaustruct/v2 v2.1.0/go.mod h1:LGOGuvEgCfCQsy3JF2tRmpGDpzA53iZfyGEWSPwQ6/4= +github.com/GaijinEntertainment/go-exhaustruct/v2 v2.2.0 h1:V9xVvhKbLt7unNEGAruK1xXglyc668Pq3Xx0MNTNqpo= +github.com/GaijinEntertainment/go-exhaustruct/v2 v2.2.0/go.mod h1:n/vLeA7V+QY84iYAGwMkkUUp9ooeuftMEvaDrSVch+Q= github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= @@ -131,6 +137,8 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= +github.com/alingse/asasalint v0.0.10 h1:qqGPDTV0ff0tWHN/nnIlSdjlU/EwRPaUY4SfpE1rnms= +github.com/alingse/asasalint v0.0.10/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/andybalholm/brotli v1.0.3/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= @@ -164,6 +172,7 @@ github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZw github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -270,16 +279,12 @@ github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44= github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= github.com/cosmos/cosmos-proto v1.0.0-alpha7 h1:yqYUOHF2jopwZh4dVQp3xgqwftE5/2hkrwIV6vkUbO0= github.com/cosmos/cosmos-proto v1.0.0-alpha7/go.mod h1:dosO4pSAbJF8zWCzCoTWP7nNsjcvSUBQmniFxDg5daw= -github.com/cosmos/cosmos-sdk/store/tools/ics23 v0.0.0-20220608170201-b0e82f964070 h1:mNkbj6wAz/m0q04ZWk/qlnyCxVYQATRqjINQfdOf07I= -github.com/cosmos/cosmos-sdk/store/tools/ics23 v0.0.0-20220608170201-b0e82f964070/go.mod h1:EOXK+a/6yV5rT46k8UaI56UwE+AU1uq712wy6IbG5+E= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= github.com/cosmos/iavl v0.18.0 h1:02ur4vnalMR2GuWCFNkuseUcl/BCVmg9tOeHOGiZOkE= github.com/cosmos/iavl v0.18.0/go.mod h1:L0VZHfq0tqMNJvXlslGExaaiZM7eSm+90Vh9QUbp6j4= -github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 h1:DdzS1m6o/pCqeZ8VOAit/gyATedRgjvkVI+UCrLpyuU= -github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76/go.mod h1:0mkLWIoZuQ7uBoospo5Q9zIpqq6rYCPJDSUdeCJvPM8= github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= @@ -299,10 +304,11 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= -github.com/daixiang0/gci v0.3.3 h1:55xJKH7Gl9Vk6oQ1cMkwrDWjAkT1D+D1G9kNmRcAIY4= github.com/daixiang0/gci v0.3.3/go.mod h1:1Xr2bxnQbDxCqqulUOv8qpGqkgRw9RSCGGjEC2LjF8o= -github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= -github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= +github.com/daixiang0/gci v0.4.2 h1:PyT/Y4a265wDhPCZo2ip/YH33M4zEuFA3nDMdAvcKSA= +github.com/daixiang0/gci v0.4.2/go.mod h1:d0f+IJhr9loBtIq+ebwhRoTt1LGbPH96ih8bKlsRT9E= +github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= +github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -333,8 +339,8 @@ github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b h1:HBah4D48ypg3J7Np4N+HY/ZR76fx3HEUGxDU6Uk39oQ= -github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= +github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= +github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= @@ -373,8 +379,9 @@ github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4 github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/firefart/nonamedreturns v1.0.1 h1:fSvcq6ZpK/uBAgJEGMvzErlzyM4NELLqqdTofVjVNag= github.com/firefart/nonamedreturns v1.0.1/go.mod h1:D3dpIBojGGNh5UfElmwPu73SwDCm+VKhHYqwlNOk2uQ= +github.com/firefart/nonamedreturns v1.0.4 h1:abzI1p7mAEPYuR4A+VLKn4eNDOycjYo2phmY9sfv40Y= +github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIga8MAO/xbKdcVsGI= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= @@ -391,8 +398,9 @@ github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5 github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= -github.com/fzipp/gocyclo v0.5.1 h1:L66amyuYogbxl0j2U+vGqJXusPF2IkduvXLnYD5TFgw= github.com/fzipp/gocyclo v0.5.1/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= +github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= +github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= @@ -523,8 +531,8 @@ github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPSh github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= github.com/golangci/golangci-lint v1.46.0/go.mod h1:IJpcNOUfx/XLRwE95FHQ6QtbhYwwqcm0H5QkwUfF4ZE= -github.com/golangci/golangci-lint v1.46.2 h1:o90t/Xa6dhJbvy8Bz2RpzUXqrkigp19DLStMolTZbyo= -github.com/golangci/golangci-lint v1.46.2/go.mod h1:3DkdHnxn9eoTTrpT2gB0TEv8KSziuoqe9FitgQLHvAY= +github.com/golangci/golangci-lint v1.47.0 h1:h2s+ZGGF63fdzUtac+VYUHPsEO0ADTqHouI7Vase+FY= +github.com/golangci/golangci-lint v1.47.0/go.mod h1:3TZhfF5KolbIkXYjUFvER6G9CoxzLEaafr/u/QI1S5A= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= @@ -602,6 +610,7 @@ github.com/googleapis/gax-go/v2 v2.4.0 h1:dS9eYAjhrE2RjmzYw2XAPvcXfmcQLtFEQWn0CR github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo= +github.com/gookit/color v1.5.1/go.mod h1:wZFzea4X8qN6vHOSP2apMb4/+w/orMznEzYsIHPaqKM= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 h1:PVRE9d4AQKmbelZ7emNig1+NT27DUmKZn5qXxfio54U= @@ -692,8 +701,9 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.4.0 h1:aAQzgqIrRKRa7w75CKpbBxYsmUoPjzVm1W59ca1L0J4= github.com/hashicorp/go-version v1.4.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -780,11 +790,10 @@ github.com/julz/importas v0.1.0 h1:F78HnrsjY3cR7j0etXy5+TU1Zuy7Xt08X/1aJnH5xXY= github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= -github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/errcheck v1.6.0 h1:YTDO4pNy7AUN/021p+JGHycQyYNIyMoenM1YDVK6RlY= github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/errcheck v1.6.1 h1:cErYo+J4SmEjdXZrVXGwLJCE2sB06s23LpkcyWNrT+s= +github.com/kisielk/errcheck v1.6.1/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= @@ -794,8 +803,9 @@ github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.5/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.15.1 h1:y9FcTHGyrebwfP0ZZqFiaxTaiDnUrGkJkI+f583BL1A= +github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -810,10 +820,12 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kulti/thelper v0.6.2 h1:K4xulKkwOCnT1CDms6Ex3uG1dvSMUUQe9zxgYQgbRXs= github.com/kulti/thelper v0.6.2/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= -github.com/kunwardeep/paralleltest v1.0.3 h1:UdKIkImEAXjR1chUWLn+PNXqWUGs//7tzMeWuP7NhmI= +github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs= +github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= github.com/kunwardeep/paralleltest v1.0.3/go.mod h1:vLydzomDFpk7yu5UX02RmP0H8QfRPOV/oFhWN85Mjb4= +github.com/kunwardeep/paralleltest v1.0.6 h1:FCKYMF1OF2+RveWlABsdnmsvJrei5aoyZoaGS+Ugg8g= +github.com/kunwardeep/paralleltest v1.0.6/go.mod h1:Y0Y0XISdZM5IKm3TREQMZ6iteqn1YuwCsJO/0kL9Zes= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/kyoh86/exportloopref v0.1.8 h1:5Ry/at+eFdkX9Vsdw3qU4YkvGtzuVfzT4X7S77LoN/M= github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= @@ -848,8 +860,9 @@ github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czP github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/maratori/testpackage v1.0.1 h1:QtJ5ZjqapShm0w5DosRjg0PRlSdAdlx+W6cCKoALdbQ= github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= +github.com/maratori/testpackage v1.1.0 h1:GJY4wlzQhuBusMF1oahQCBtUV/AQ/k69IZ68vxaac2Q= +github.com/maratori/testpackage v1.1.0/go.mod h1:PeAhzU8qkCwdGEMTEupsHJNlQu2gZopMC6RjbhmHeDc= github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 h1:pWxk9e//NbPwfxat7RXkts09K+dEBJWakUWwICVqYbA= github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= @@ -955,8 +968,9 @@ github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 h1:4kuARK6Y6Fx github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nishanths/exhaustive v0.7.11 h1:xV/WU3Vdwh5BUH4N06JNUznb6d5zhRPOnlgCrpNYNKA= github.com/nishanths/exhaustive v0.7.11/go.mod h1:gX+MP7DWMKJmNa1HfMozK+u04hQd3na9i0hyqf3/dOI= +github.com/nishanths/exhaustive v0.8.1 h1:0QKNascWv9qIHY7zRoZSxeRr6kuk5aAT3YXLTiDmjTo= +github.com/nishanths/exhaustive v0.8.1/go.mod h1:qj+zJJUgJ76tR92+25+03oYUhzF4R7/2Wk7fGTfCHmg= github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62PewwiQTlm/7Rj+cxVYqZvDIUc+JjZq6GHAC1fsObQ= github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= @@ -982,16 +996,18 @@ github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvw github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.1.3 h1:e/3Cwtogj0HA+25nMP1jCMDIf8RtRYbGwGGuBIFztkc= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= +github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= +github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -1030,8 +1046,9 @@ github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3v github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.0-beta.8/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pelletier/go-toml/v2 v2.0.0/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= -github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU= github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml/v2 v2.0.2 h1:+jQXlF3scKIcSEKkdHzXhCTDLPFi5r1wnK6yPS+49Gw= +github.com/pelletier/go-toml/v2 v2.0.2/go.mod h1:MovirKjgVRESsAvNZlAjtFwV867yGuwRkXbG66OzopI= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= @@ -1090,8 +1107,8 @@ github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16 github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.36.0 h1:78hJTing+BLYLjhXE+Z2BubeEymH5Lr0/Mt8FKkxxYo= -github.com/prometheus/common v0.36.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= +github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -1164,8 +1181,9 @@ github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxr github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= -github.com/securego/gosec/v2 v2.11.0 h1:+PDkpzR41OI2jrw1q6AdXZCbsNGNGT7pQjal0H0cArI= github.com/securego/gosec/v2 v2.11.0/go.mod h1:SX8bptShuG8reGC0XS09+a4H2BoWSJi+fscA+Pulbpo= +github.com/securego/gosec/v2 v2.12.0 h1:CQWdW7ATFpvLSohMVsajscfyHJ5rsGmEXmsNcsDNmAg= +github.com/securego/gosec/v2 v2.12.0/go.mod h1:iTpT+eKTw59bSgklBHlSnH5O2tNygHMDxfvMubA4i7I= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= @@ -1181,8 +1199,11 @@ github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sivchari/containedctx v1.0.2 h1:0hLQKpgC53OVF1VT7CeoFHk9YKstur1XOgfYIc1yrHI= github.com/sivchari/containedctx v1.0.2/go.mod h1:PwZOeqm4/DLoJOqMSIJs3aKqXRX4YO+uXww087KZ7Bw= -github.com/sivchari/tenv v1.5.0 h1:wxW0mFpKI6DIb3s6m1jCDYvkWXCskrimXMuGd0K/kSQ= +github.com/sivchari/nosnakecase v1.5.0 h1:ZBvAu1H3uteN0KQ0IsLpIFOwYgPEhKLyv2ahrVkub6M= +github.com/sivchari/nosnakecase v1.5.0/go.mod h1:CwDzrzPea40/GB6uynrNLiorAlgFRvRbFSgJx2Gs+QY= github.com/sivchari/tenv v1.5.0/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= +github.com/sivchari/tenv v1.6.0 h1:FyE4WysxLwYljKqWhTfOMjgKjBSnmzzg7lWOmpDiAcc= +github.com/sivchari/tenv v1.6.0/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= @@ -1237,7 +1258,6 @@ github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5J github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -1249,11 +1269,13 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI= github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= +github.com/subosito/gotenv v1.4.0 h1:yAzM1+SmVcz5R4tXGsNMu1jUl2aOJXoiWUCEwwnGrvs= +github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7vWWGaGo= github.com/sylvia7788/contextcheck v1.0.4 h1:MsiVqROAdr0efZc/fOCt0c235qm9XJqHtWwM+2h2B04= github.com/sylvia7788/contextcheck v1.0.4/go.mod h1:vuPKJMQ7MQ91ZTqfdyreNKwZjyUg6KO+IebVyQDedZQ= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -1283,13 +1305,15 @@ github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaE github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144 h1:kl4KhGNsJIbDHS9/4U9yQo1UcPQM0kOMJHn29EoH/Ro= github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= +github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tomarrell/wrapcheck/v2 v2.6.1 h1:Cf4a/iwuMp9s7kKrh74GTgijRVim0wEpKjgAsT7Wctw= github.com/tomarrell/wrapcheck/v2 v2.6.1/go.mod h1:Eo+Opt6pyMW1b6cNllOcDSSoHO0aTJ+iF6BfCUbHltA= +github.com/tomarrell/wrapcheck/v2 v2.6.2 h1:3dI6YNcrJTQ/CJQ6M/DUkc0gnqYSIk6o0rChn9E/D0M= +github.com/tomarrell/wrapcheck/v2 v2.6.2/go.mod h1:ao7l5p0aOlUNJKI0qVwB4Yjlqutd0IvAB9Rdwyilxvg= github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= github.com/tommy-muehle/go-mnd/v2 v2.5.0 h1:iAj0a8e6+dXSL7Liq0aXPox36FiN1dBbjA6lt9fl65s= github.com/tommy-muehle/go-mnd/v2 v2.5.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= @@ -1310,8 +1334,9 @@ github.com/ultraware/whitespace v0.0.5 h1:hh+/cpIcopyMYbZNVov9iSxvJU3OYQg78Sfaqz github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/uudashr/gocognit v1.0.5 h1:rrSex7oHr3/pPLQ0xoWq108XMU8s678FJcQ+aSfOHa4= github.com/uudashr/gocognit v1.0.5/go.mod h1:wgYz0mitoKOTysqxTDMOUXg+Jb5SvtihkfmugIZYpEA= +github.com/uudashr/gocognit v1.0.6 h1:2Cgi6MweCsdB6kpcVQp7EW4U23iBFQWfTXiWlyp842Y= +github.com/uudashr/gocognit v1.0.6/go.mod h1:nAIUuVBnYU7pcninia3BHOvQkpQCeO76Uscky5BOwcY= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.30.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus= github.com/valyala/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/VPSJnLYn+LmLk8= @@ -1341,8 +1366,9 @@ github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQ github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 h1:O9XLFXGkVswDFmH9LaYpqu+r/AAFWqr0DL6V00KEVFg= github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -gitlab.com/bosi/decorder v0.2.1 h1:ehqZe8hI4w7O4b1vgsDZw1YU1PE7iJXrQWFMsocbQ1w= gitlab.com/bosi/decorder v0.2.1/go.mod h1:6C/nhLSbF6qZbYD8bRmISBwc6vcWdNsiIBkRvjJFrH0= +gitlab.com/bosi/decorder v0.2.2 h1:LRfb3lP6mZWjUzpMOCLTVjcnl/SqZWBWmKNqQvMocQs= +gitlab.com/bosi/decorder v0.2.2/go.mod h1:9K1RB5+VPNQYtXtTDAzd2OEftsZb1oV0IrJrzChSdGE= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= @@ -1380,17 +1406,21 @@ go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1422,8 +1452,9 @@ golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220313003712-b769efc7c000/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA= golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1470,8 +1501,9 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1540,8 +1572,9 @@ golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 h1:NWy5+hlRbC7HK+PmcXVUmW1IMyFce7to56IUvhUFm7Y= golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1598,7 +1631,6 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1668,6 +1700,7 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1692,8 +1725,9 @@ golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220702020025-31831981b65f h1:xdsejrW/0Wf2diT5CPp3XmKUNbr7Xvw8kYilQ+6qjRY= +golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= @@ -1816,8 +1850,9 @@ golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.9-0.20211228192929-ee1ca4ffc4da/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.11-0.20220316014157-77aa08bb151a h1:ofrrl6c6NG5/IOSx/R1cyiQxxjqlur0h/TvbUhkH0II= golang.org/x/tools v0.1.11-0.20220316014157-77aa08bb151a/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.11 h1:loJ25fNOEhSXfHrpoGj91eCUThwdNX6u24rO1xnNteY= +golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2016,8 +2051,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -2049,8 +2085,9 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.3/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI= +gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -2082,8 +2119,9 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.3.1 h1:1kJlrWJLkaGXgcaeosRXViwviqjI7nkBvU2+sZW0AYc= honnef.co/go/tools v0.3.1/go.mod h1:vlRD9XErLMGT+mDuofSr0mMMquscM/1nQqtRSsh6m70= +honnef.co/go/tools v0.3.2 h1:ytYb4rOqyp1TSa2EPvNVwtPQJctSELKaMyLfqNP4+34= +honnef.co/go/tools v0.3.2/go.mod h1:jzwdWgg7Jdq75wlfblQxO4neNaFFSvgc1tD5Wv8U0Yw= mvdan.cc/gofumpt v0.3.1 h1:avhhrOmv0IuvQVK7fvwV91oFSGAk5/6Po8GXTzICeu8= mvdan.cc/gofumpt v0.3.1/go.mod h1:w3ymliuxvzVx8DAutBnVyDqYb1Niy/yCJt/lk821YCE= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= @@ -2094,8 +2132,9 @@ mvdan.cc/unparam v0.0.0-20211214103731-d0ef000c54e5 h1:Jh3LAeMt1eGpxomyu3jVkmVZW mvdan.cc/unparam v0.0.0-20211214103731-d0ef000c54e5/go.mod h1:b8RRCBm0eeiWR8cfN88xeq2G5SG3VKGO+5UPWi5FSOY= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v0.4.7 h1:MTNRktPuv5FNqOO151TM9mDTa+XHcX6ypYeISDVD14g= pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= +pgregory.net/rapid v0.4.8 h1:d+5SGZWUbJPbl3ss6tmPFqnNeQR6VDOFly+eTjwPiEw= +pgregory.net/rapid v0.4.8/go.mod h1:Z5PbWqjvWR1I3UGjvboUuan4fe4ZYEYNLNQLExzCoUs= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/orm/go.mod b/orm/go.mod index a1820e889bdb..41f54ac2dc5d 100644 --- a/orm/go.mod +++ b/orm/go.mod @@ -12,10 +12,10 @@ require ( github.com/regen-network/gocuke v0.6.2 github.com/stretchr/testify v1.8.0 github.com/tendermint/tm-db v0.6.7 - google.golang.org/grpc v1.47.0 + google.golang.org/grpc v1.48.0 google.golang.org/protobuf v1.28.0 gotest.tools/v3 v3.3.0 - pgregory.net/rapid v0.4.7 + pgregory.net/rapid v0.4.8 ) require ( diff --git a/orm/go.sum b/orm/go.sum index 130a3ef6c107..9e6aa097d34a 100644 --- a/orm/go.sum +++ b/orm/go.sum @@ -271,8 +271,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -306,5 +306,6 @@ gotest.tools/v3 v3.3.0 h1:MfDY1b1/0xN1CyMlQDac0ziEy9zJQd9CXBRRDHw2jJo= gotest.tools/v3 v3.3.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -pgregory.net/rapid v0.4.7 h1:MTNRktPuv5FNqOO151TM9mDTa+XHcX6ypYeISDVD14g= pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= +pgregory.net/rapid v0.4.8 h1:d+5SGZWUbJPbl3ss6tmPFqnNeQR6VDOFly+eTjwPiEw= +pgregory.net/rapid v0.4.8/go.mod h1:Z5PbWqjvWR1I3UGjvboUuan4fe4ZYEYNLNQLExzCoUs= diff --git a/proto/cosmos/base/tendermint/v1beta1/query.proto b/proto/cosmos/base/tendermint/v1beta1/query.proto index b6ddb1a5e737..dde13f7ddbe4 100644 --- a/proto/cosmos/base/tendermint/v1beta1/query.proto +++ b/proto/cosmos/base/tendermint/v1beta1/query.proto @@ -5,10 +5,11 @@ import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; import "google/api/annotations.proto"; import "tendermint/p2p/types.proto"; -import "tendermint/types/block.proto"; import "tendermint/types/types.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; +import "cosmos/base/tendermint/v1beta1/types.proto"; import "cosmos_proto/cosmos.proto"; +import "tendermint/types/block.proto"; option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/tmservice"; @@ -99,7 +100,12 @@ message GetBlockByHeightRequest { // GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. message GetBlockByHeightResponse { .tendermint.types.BlockID block_id = 1; + + // Deprecated: please use `sdk_block` instead .tendermint.types.Block block = 2; + + // Since: cosmos-sdk 0.47 + Block sdk_block = 3; } // GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. @@ -108,7 +114,12 @@ message GetLatestBlockRequest {} // GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. message GetLatestBlockResponse { .tendermint.types.BlockID block_id = 1; + + // Deprecated: please use `sdk_block` instead .tendermint.types.Block block = 2; + + // Since: cosmos-sdk 0.47 + Block sdk_block = 3; } // GetSyncingRequest is the request type for the Query/GetSyncing RPC method. @@ -167,8 +178,8 @@ message ABCIQueryResponse { uint32 code = 1; // DEPRECATED: use "value" instead reserved 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic + string log = 3; // nondeterministic + string info = 4; // nondeterministic int64 index = 5; bytes key = 6; bytes value = 7; diff --git a/proto/cosmos/base/tendermint/v1beta1/types.proto b/proto/cosmos/base/tendermint/v1beta1/types.proto new file mode 100644 index 000000000000..9127b5f10844 --- /dev/null +++ b/proto/cosmos/base/tendermint/v1beta1/types.proto @@ -0,0 +1,50 @@ +syntax = "proto3"; +package cosmos.base.tendermint.v1beta1; + +import "gogoproto/gogo.proto"; +import "tendermint/types/types.proto"; +import "tendermint/types/evidence.proto"; +import "tendermint/version/types.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/tmservice"; + +// Block is tendermint type Block, with the Header proposer address +// field converted to bech32 string. +message Block { + Header header = 1 [(gogoproto.nullable) = false]; + .tendermint.types.Data data = 2 [(gogoproto.nullable) = false]; + .tendermint.types.EvidenceList evidence = 3 [(gogoproto.nullable) = false]; + .tendermint.types.Commit last_commit = 4; +} + +// Header defines the structure of a Tendermint block header. +message Header { + // basic block info + .tendermint.version.Consensus version = 1 [(gogoproto.nullable) = false]; + string chain_id = 2 [(gogoproto.customname) = "ChainID"]; + int64 height = 3; + google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + + // prev block info + .tendermint.types.BlockID last_block_id = 5 [(gogoproto.nullable) = false]; + + // hashes of block data + bytes last_commit_hash = 6; // commit from validators from the last block + bytes data_hash = 7; // transactions + + // hashes from the app output from the prev block + bytes validators_hash = 8; // validators for the current block + bytes next_validators_hash = 9; // validators for the next block + bytes consensus_hash = 10; // consensus params for current block + bytes app_hash = 11; // state after txs from the previous block + bytes last_results_hash = 12; // root hash of all results from the txs from the previous block + + // consensus info + bytes evidence_hash = 13; // evidence included in the block + + // proposer_address is the original block proposer address, formatted as a Bech32 string. + // In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string + // for better UX. + string proposer_address = 14; // original proposer of the block +} diff --git a/proto/cosmos/gov/v1/genesis.proto b/proto/cosmos/gov/v1/genesis.proto index cb44a7f34c97..7b0fed2da5b1 100644 --- a/proto/cosmos/gov/v1/genesis.proto +++ b/proto/cosmos/gov/v1/genesis.proto @@ -17,10 +17,6 @@ message GenesisState { repeated Vote votes = 3; // proposals defines all the proposals present at genesis. repeated Proposal proposals = 4; - // params defines all the paramaters of related to deposit. - DepositParams deposit_params = 5; - // params defines all the paramaters of related to voting. - VotingParams voting_params = 6; - // params defines all the paramaters of related to tally. - TallyParams tally_params = 7; + // params defines all the paramaters of x/gov module. + Params params = 5; } diff --git a/proto/cosmos/gov/v1/gov.proto b/proto/cosmos/gov/v1/gov.proto index 8a8572335d75..bbcd66c58b18 100644 --- a/proto/cosmos/gov/v1/gov.proto +++ b/proto/cosmos/gov/v1/gov.proto @@ -130,3 +130,29 @@ message TallyParams { // vetoed. Default value: 1/3. string veto_threshold = 3 [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.jsontag) = "veto_threshold,omitempty"]; } + +// Params defines the parameters for the x/gov module. +message Params { + // Minimum deposit for a proposal to enter voting period. + repeated cosmos.base.v1beta1.Coin min_deposit = 1 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "min_deposit,omitempty"]; + + // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + // months. + google.protobuf.Duration max_deposit_period = 2 + [(gogoproto.stdduration) = true, (gogoproto.jsontag) = "max_deposit_period,omitempty"]; + + // Length of the voting period. + google.protobuf.Duration voting_period = 3 [(gogoproto.stdduration) = true]; + + // Minimum percentage of total stake needed to vote for a result to be + // considered valid. + string quorum = 4 [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.jsontag) = "quorum,omitempty"]; + + // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. + string threshold = 5 [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.jsontag) = "threshold,omitempty"]; + + // Minimum value of Veto votes to Total votes ratio for proposal to be + // vetoed. Default value: 1/3. + string veto_threshold = 6 [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.jsontag) = "veto_threshold,omitempty"]; +} diff --git a/proto/cosmos/gov/v1/query.proto b/proto/cosmos/gov/v1/query.proto index b9d5914507d8..e6531c0487cf 100644 --- a/proto/cosmos/gov/v1/query.proto +++ b/proto/cosmos/gov/v1/query.proto @@ -34,7 +34,7 @@ service Query { // Params queries all parameters of the gov module. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/gov/v1/params/{params_type}"; + option (google.api.http).get = "/cosmos/gov/v1/params"; } // Deposit queries single deposit information based proposalID, depositAddr. @@ -122,20 +122,12 @@ message QueryVotesResponse { } // QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest { - // params_type defines which parameters to query for, can be one of "voting", - // "tallying" or "deposit". - string params_type = 1; -} +message QueryParamsRequest {} // QueryParamsResponse is the response type for the Query/Params RPC method. message QueryParamsResponse { - // voting_params defines the parameters related to voting. - VotingParams voting_params = 1; - // deposit_params defines the parameters related to deposit. - DepositParams deposit_params = 2; - // tally_params defines the parameters related to tally. - TallyParams tally_params = 3; + // params defines all the paramaters of x/gov module. + Params params = 5; } // QueryDepositRequest is the request type for the Query/Deposit RPC method. diff --git a/proto/cosmos/gov/v1/tx.proto b/proto/cosmos/gov/v1/tx.proto index 9306c51e8c0e..b7eedf40122d 100644 --- a/proto/cosmos/gov/v1/tx.proto +++ b/proto/cosmos/gov/v1/tx.proto @@ -28,6 +28,12 @@ service Msg { // Deposit defines a method to add deposit on a specific proposal. rpc Deposit(MsgDeposit) returns (MsgDepositResponse); + + // UpdateParams defines a governance operation for updating the x/gov module + // parameters. The authority is defined in the keeper. + // + // Since: cosmos-sdk 0.47 + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); } // MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary @@ -98,3 +104,24 @@ message MsgDeposit { // MsgDepositResponse defines the Msg/Deposit response type. message MsgDepositResponse {} + +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateParams { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // params defines the x/distribution parameters to update. + // + // NOTE: All parameters must be supplied. + Params params = 2 [(gogoproto.nullable) = false]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateParamsResponse {} diff --git a/scripts/mockgen.sh b/scripts/mockgen.sh index b5b2fa7a9d98..a8f814464592 100755 --- a/scripts/mockgen.sh +++ b/scripts/mockgen.sh @@ -11,5 +11,7 @@ $mockgen_cmd -package mocks -destination tests/mocks/grpc_server.go github.com/g $mockgen_cmd -package mocks -destination tests/mocks/tendermint_tendermint_libs_log_DB.go github.com/tendermint/tendermint/libs/log Logger $mockgen_cmd -source=orm/model/ormtable/hooks.go -package ormmocks -destination orm/testing/ormmocks/hooks.go $mockgen_cmd -source=x/nft/expected_keepers.go -package testutil -destination x/nft/testutil/expected_keepers_mocks.go +$mockgen_cmd -source=x/feegrant/expected_keepers.go -package testutil -destination x/feegrant/testutil/expected_keepers_mocks.go $mockgen_cmd -source=x/mint/types/expected_keepers.go -package testutil -destination x/mint/testutil/expected_keepers_mocks.go $mockgen_cmd -source=x/params/proposal_handler_test.go -package testutil -destination x/params/testutil/staking_keeper_mock.go +$mockgen_cmd -source=x/crisis/types/expected_keepers.go -package testutil -destination x/crisis/testutil/expected_keepers_mocks.go diff --git a/simapp/app_legacy.go b/simapp/app_legacy.go index f0aa6f7b8df5..0bc5655c805e 100644 --- a/simapp/app_legacy.go +++ b/simapp/app_legacy.go @@ -488,7 +488,6 @@ func (app *SimApp) setAnteHandler(txConfig client.TxConfig) { SigGasConsumer: ante.DefaultSigVerificationGasConsumer, }, ) - if err != nil { panic(err) } diff --git a/store/tools/ics23/go.mod b/store/tools/ics23/go.mod index 7fbccba6c809..a41b3567c6d4 100644 --- a/store/tools/ics23/go.mod +++ b/store/tools/ics23/go.mod @@ -3,40 +3,38 @@ module github.com/cosmos/cosmos-sdk/store/tools/ics23 go 1.18 require ( - github.com/confio/ics23/go v0.6.7-0.20220201201850-606d5105384e - github.com/cosmos/cosmos-sdk v0.45.6 - github.com/cosmos/iavl v0.17.3 + github.com/confio/ics23/go v0.7.0 + github.com/cosmos/cosmos-sdk v0.46.0-rc3 + github.com/cosmos/iavl v0.18.0 github.com/lazyledger/smt v0.2.1-0.20210709230900-03ea40719554 - github.com/tendermint/tendermint v0.34.19 + github.com/tendermint/tendermint v0.34.20-rc1 github.com/tendermint/tm-db v0.6.7 ) require ( - github.com/DataDog/zstd v1.4.5 // indirect github.com/cespare/xxhash v1.1.0 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/cosmos/gorocksdb v1.2.0 // indirect - github.com/dgraph-io/badger/v2 v2.2007.2 // indirect - github.com/dgraph-io/ristretto v0.0.3 // indirect + github.com/dgraph-io/badger/v2 v2.2007.4 // indirect + github.com/dgraph-io/ristretto v0.1.0 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.0 // indirect - github.com/gogo/protobuf v1.3.3 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/glog v1.0.0 // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/golang/snappy v0.0.3 // indirect - github.com/google/btree v1.0.0 // indirect - github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/google/btree v1.0.1 // indirect github.com/jmhodges/levigo v1.0.0 // indirect + github.com/klauspost/compress v1.15.1 // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect - github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca // indirect + github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect go.etcd.io/bbolt v1.3.6 // indirect - golang.org/x/crypto v0.0.0-20210915214749-c084706c2272 // indirect - golang.org/x/net v0.0.0-20211208012354-db4efeb81f4b // indirect - golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect - golang.org/x/text v0.3.7 // indirect - google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb // indirect - google.golang.org/grpc v1.45.0 // indirect - google.golang.org/protobuf v1.27.1 // indirect + golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect + golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect + golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect + google.golang.org/protobuf v1.28.0 // indirect ) replace github.com/cosmos/cosmos-sdk/store/tools/ics23 => ./ diff --git a/store/tools/ics23/go.sum b/store/tools/ics23/go.sum index 693821e0f0d9..5bb94b861cd1 100644 --- a/store/tools/ics23/go.sum +++ b/store/tools/ics23/go.sum @@ -1,9 +1,11 @@ -bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= +4d63.com/gochecknoglobals v0.1.0/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= +bitbucket.org/creachadair/shell v0.0.6/go.mod h1:8Qqi/cYk7vPnsOePHroKXDJYmb5x7ENhtiFtfZq8K+M= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -12,10 +14,12 @@ cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6 cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.60.0/go.mod h1:yw2G51M9IfRboUH61Us8GqCeF1PzPblB823Mn2q2eAU= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= @@ -26,57 +30,72 @@ cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aD cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/pubsub v1.5.0/go.mod h1:ZEwJccE3z93Z2HWvstpri00jOg7oO4UZDtKhwDwqF0w= +cloud.google.com/go/spanner v1.7.0/go.mod h1:sd3K2gZ9Fd0vMPLXzeCrF6fq4i63Q7aTLW/lBIfBkIk= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Antonboom/errname v0.1.6/go.mod h1:7lz79JAnuoMNDAWE9MeeIr1/c/VpSUWatBv2FH9NYpI= +github.com/Antonboom/nilnil v0.1.1/go.mod h1:L1jBqoWM7AOeTD+tSquifKSesRHs4ZdaxvZR+xdJEaI= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= -github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= +github.com/GaijinEntertainment/go-exhaustruct/v2 v2.1.0/go.mod h1:LGOGuvEgCfCQsy3JF2tRmpGDpzA53iZfyGEWSPwQ6/4= github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OpenPeeDeeP/depguard v1.1.0/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= -github.com/adlio/schema v1.1.13/go.mod h1:L5Z7tw+7lRK1Fnpi/LT/ooCP1elkXn0krMWBQHUhEDE= -github.com/adlio/schema v1.3.0/go.mod h1:51QzxkpeFs6lRY11kPye26IaFPOV+HqEj01t5aXXKfs= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= @@ -85,9 +104,12 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= +github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= +github.com/andybalholm/brotli v1.0.3/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= @@ -95,27 +117,31 @@ github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4 github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/ashanbrown/forbidigo v1.3.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= +github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= +github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= +github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= +github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= +github.com/breml/bidichk v0.2.3/go.mod h1:8u2C6DnAy0g2cEq+k/A2+tr9O1s+vHGxWn0LTc70T2A= +github.com/breml/errchkjson v0.3.0/go.mod h1:9Cogkyv9gcT8HREpzi3TiqBxCqDzo8awa92zSDFcofU= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= -github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA= +github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= @@ -124,25 +150,29 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/bufbuild/buf v1.4.0/go.mod h1:mwHG7klTHnX+rM/ym8LXGl7vYpVmnwT96xWoRB4H5QI= +github.com/butuzov/ireturn v0.1.1/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= +github.com/charithe/durationcheck v0.0.9/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= +github.com/chavacava/garif v0.0.0-20220316182200-5cad0b5181d4/go.mod h1:W8EnPSQ8Nv4fUjc/v1/8tHFqhuOJXnRub0dTfuAQktU= +github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= +github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -155,55 +185,60 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/confio/ics23/go v0.6.6/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= -github.com/confio/ics23/go v0.6.7-0.20220201201850-606d5105384e h1:GhCdFUgGIg9MC3vigJIhubUKE4VAYW6ZyEapsQ3HR6E= -github.com/confio/ics23/go v0.6.7-0.20220201201850-606d5105384e/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= -github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= -github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.2.1/go.mod h1:wCYX+dRqZdImhGucXOqTQn05AhX6EUDaGEMUzTFFpLg= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/confio/ics23/go v0.7.0 h1:00d2kukk7sPoHWL4zZBZwzxnpA2pec1NPdwbSokJ5w8= +github.com/confio/ics23/go v0.7.0/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= +github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cosmos/cosmos-sdk v0.45.6 h1:bnYLOcDp0cKWMLeUTTJIttq6xxRep52ulPxXC3BCfuQ= -github.com/cosmos/cosmos-sdk v0.45.6/go.mod h1:bPeeVMEtVvH3y3xAGHVbK+/CZlpaazzh77hG8ZrcJpI= +github.com/cosmos/cosmos-sdk v0.46.0-rc3 h1:BWU0YJ1RXUCYUmKY8k3kH/yEavMF/7y81Sjd+2otZpY= +github.com/cosmos/cosmos-sdk v0.46.0-rc3/go.mod h1:fWrmJ90UcB11LoaaTtF/qsqkA8HusUc8+XARAdnJfmA= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= -github.com/cosmos/iavl v0.17.3 h1:s2N819a2olOmiauVa0WAhoIJq9EhSXE9HDBAoR9k+8Y= -github.com/cosmos/iavl v0.17.3/go.mod h1:prJoErZFABYZGDHka1R6Oay4z9PrNeFFiMKHDAMOi4w= +github.com/cosmos/iavl v0.19.0 h1:sgyrjqOkycXiN7Tuupuo4QAldKFg7Sipyfeg/IL7cps= +github.com/cosmos/iavl v0.19.0/go.mod h1:l5h9pAB3m5fihB3pXVgwYqdY8aBsMagqz7T0MUjxZeA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= +github.com/daixiang0/gci v0.3.3/go.mod h1:1Xr2bxnQbDxCqqulUOv8qpGqkgRw9RSCGGjEC2LjF8o= +github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/denis-tingaikin/go-header v0.4.3/go.mod h1:0wOCWuN71D5qIgE2nz9KrKmuYBAC2Mra5RassOIQ2/c= github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= -github.com/dgraph-io/badger/v2 v2.2007.2 h1:EjjK0KqwaFMlPin1ajhP943VPENHJdEz1KLIegjaI3k= github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= +github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= +github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= -github.com/dgraph-io/ristretto v0.0.3 h1:jh22xisGBjrEVnRZ1DVTpBVQm0Xndu8sMl0CWDzSIBI= -github.com/dgraph-io/ristretto v0.0.3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgraph-io/ristretto v0.1.0 h1:Jv3CGQHp9OjuMBSne1485aDpUkTKEcUqF+jm/LuerPI= +github.com/dgraph-io/ristretto v0.1.0/go.mod h1:fux0lOrBhrVCJd3lcTHsIJhq1T2rokOu6v9Vcb3Q9ug= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/docker/cli v20.10.14+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v20.10.17+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -213,7 +248,6 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -223,8 +257,12 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= +github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= +github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= @@ -233,47 +271,71 @@ github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+ne github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/firefart/nonamedreturns v1.0.1/go.mod h1:D3dpIBojGGNh5UfElmwPu73SwDCm+VKhHYqwlNOk2uQ= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/frankban/quicktest v1.14.2/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= +github.com/fzipp/gocyclo v0.5.1/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-critic/go-critic v0.6.3/go.mod h1:c6b3ZP1MQ7o6lPR7Rv3lEf7pYQUmAcx8ABHgdZCQt/k= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= +github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= +github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= +github.com/go-toolsmith/astequal v1.0.1/go.mod h1:4oGA3EZXTVItV/ipGiOx7NWkY5veFfcsOJVS2YxltLw= +github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= +github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= +github.com/go-toolsmith/pkgload v1.0.2-0.20220101231613-e814995d17c5/go.mod h1:3NAwwmD4uY/yggRxoEjk/S00MIV3A+H7rrE3i87eYxM= +github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= +github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= +github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+wXQnTPR4KqTKDgJukSZ6amVRtWMPEjE6sQoK8= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -286,7 +348,9 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -307,11 +371,25 @@ github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= +github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= +github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= +github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= +github.com/golangci/golangci-lint v1.46.2/go.mod h1:3DkdHnxn9eoTTrpT2gB0TEv8KSziuoqe9FitgQLHvAY= +github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= +github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= +github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= +github.com/golangci/revgrep v0.0.0-20210930125155-c22e5001d4f2/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= +github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= +github.com/google/certificate-transparency-go v1.1.1/go.mod h1:FDKqPvSXawb2ecErVRrD+nfy23RCzyl7eqVCEmlT1Zs= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -323,8 +401,10 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -337,48 +417,70 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= +github.com/google/trillian v1.3.11/go.mod h1:0tPraVHrSDkA3BO6vKX67zgLXs6SsOAbHEivX+9mPgw= +github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= +github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= +github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= +github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= +github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= +github.com/gostaticanalysis/analysisutil v0.4.1/go.mod h1:18U/DLpRgIUd459wGxVHE0fRgmo1UgHDcbw7F5idXu0= +github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= +github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= +github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= +github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= +github.com/gostaticanalysis/forcetypeassert v0.1.0/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= +github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= +github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= +github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Repi5x3CuviD3dgAZaBU= github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= @@ -387,56 +489,73 @@ github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/S github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.4.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= +github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jdxcode/netrc v0.0.0-20210204082910-926c7f70242a/go.mod h1:Zi/ZFkEqFHTm7qkjyNJjaWH4LQA9LQhGJyF0lTYGpxw= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= +github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= +github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= +github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ= +github.com/jhump/protocompile v0.0.0-20220216033700-d705409f108f/go.mod h1:qr2b5kx4HbFS7/g4uYO5qv9ei8303JMsC7ESbYiqr2Q= +github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4= +github.com/jhump/protoreflect v1.11.0/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E= +github.com/jhump/protoreflect v1.12.1-0.20220417024638-438db461d753/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI= +github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= +github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/txtarfs v0.0.0-20210218200122-0702f000015a/go.mod h1:izVPOvVRsHiKkeGCT6tYBNWyDVuzj9wAaBb5R9qamfw= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -444,36 +563,61 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.13.5/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.15.1 h1:y9FcTHGyrebwfP0ZZqFiaxTaiDnUrGkJkI+f583BL1A= +github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kulti/thelper v0.6.2/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= +github.com/kunwardeep/paralleltest v1.0.3/go.mod h1:vLydzomDFpk7yu5UX02RmP0H8QfRPOV/oFhWN85Mjb4= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= github.com/lazyledger/smt v0.2.1-0.20210709230900-03ea40719554 h1:nDOkLO7klmnEw1s4AyKt1Arvpgyh33uj1JmkYlJaDsk= github.com/lazyledger/smt v0.2.1-0.20210709230900-03ea40719554/go.mod h1:9+Pb2/tg1PvEgW7aFx4bFhDE4bvbI03zuJ8kb7nJ9Jc= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= +github.com/ldez/tagliatelle v0.3.1/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= +github.com/leonklingele/grouper v1.1.0/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= +github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJiIbETBPTl9ATXQag= +github.com/lib/pq v0.0.0-20180327071824-d34b9ff171c2/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= +github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= +github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= +github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -488,266 +632,365 @@ github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOA github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= +github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= +github.com/mgechev/revive v1.2.1/go.mod h1:+Ro3wqY4vakcYNtkBWdZC7dBg1xSB6sp054wWwmeFm0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= +github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= +github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= +github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= +github.com/mozilla/scribe v0.0.0-20180711195314-fb71baf557c1/go.mod h1:FIczTrinKo8VaLxe6PWTPEXRXDIHz2QAwiaBaP5/4a8= +github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5/go.mod h1:FUqVoUPHSEdDR0MnFM3Dh8AU0pZHLXUD127SAJGER/s= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= +github.com/mwitkow/go-proto-validators v0.2.0/go.mod h1:ZfA1hW+UH/2ZHOWvQ3HnQaU0DtnpXu850MZiy+YUgcc= +github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= github.com/nats-io/nats-server/v2 v2.5.0/go.mod h1:Kj86UtrXAL6LwYRA6H4RqzkHhK0Vcv2ZnKD5WbQ1t3g= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nishanths/exhaustive v0.7.11/go.mod h1:gX+MP7DWMKJmNa1HfMozK+u04hQd3na9i0hyqf3/dOI= +github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62PewwiQTlm/7Rj+cxVYqZvDIUc+JjZq6GHAC1fsObQ= +github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/oklog/ulid/v2 v2.0.2/go.mod h1:mtBL0Qe/0HAx6/a4Z30qxVIAL1eQDweXq5lxOEiwQ68= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.13.0 h1:7lLHu94wT9Ij0o6EWWclhu0aOh32VxhkwEJvzuWPeak= github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= +github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= -github.com/opencontainers/runc v1.0.3/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= +github.com/opencontainers/runc v1.1.2/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/ory/dockertest/v3 v3.9.1/go.mod h1:42Ir9hmvaAPm0Mgibk6mBPi7SFvTXxEcnztDYOJ//uM= +github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= +github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= +github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= +github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= +github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.0-beta.8/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml/v2 v2.0.0/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml/v2 v2.0.2/go.mod h1:MovirKjgVRESsAvNZlAjtFwV867yGuwRkXbG66OzopI= github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= +github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= +github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/polyfloyd/go-errorlint v1.0.0/go.mod h1:KZy4xxPJyy88/gldCe5OdW6OQRtNO3EZE7hXzmnebgA= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.34.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/pseudomuto/protoc-gen-doc v1.3.2/go.mod h1:y5+P6n3iGrbKG+9O04V5ld71in3v/bX88wUwgt+U8EA= +github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= +github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= +github.com/quasilyte/go-ruleguard v0.3.16-0.20220213074421-6aa060fab41a/go.mod h1:VMX+OnnSw4LicdiEGtRSD/1X8kW7GuEscjYNr4cOIT4= +github.com/quasilyte/go-ruleguard/dsl v0.3.0/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/dsl v0.3.16/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/dsl v0.3.19/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= +github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= +github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5/go.mod h1:wSEyW6O61xRV6zb6My3HxrQ5/8ke7NE2OayqCHa3xRM= +github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= +github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= +github.com/remyoudompheng/go-dbus v0.0.0-20121104212943-b7232d34b1d5/go.mod h1:+u151txRmLpwxBmpYn9z3d1sdJdjRPQpsXuYeY9jNls= +github.com/remyoudompheng/go-liblzma v0.0.0-20190506200333-81bf2d431b96/go.mod h1:90HvCY7+oHHUKkbeMCiHt1WuFR2/hPJ9QrljDG+v6ls= +github.com/remyoudompheng/go-misc v0.0.0-20190427085024-2d6ac652a50e/go.mod h1:80FQABjoFzZ2M5uEa6FUaJYEmqU2UOKojlFVak1UAwI= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.27.0/go.mod h1:7frBqO0oezxmnO7GF86FY++uy8I0Tk/If5ni1G9Qc0U= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryancurrah/gomodguard v1.2.3/go.mod h1:rYbA/4Tg5c54mV1sv4sQTP5WOPBcoLtnBZ7/TEhXAbg= +github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= +github.com/sagikazarmark/crypt v0.5.0/go.mod h1:l+nzl7KWh51rpzp2h7t4MZWyiEWdhNpOAnclKvg+mdA= +github.com/sagikazarmark/crypt v0.6.0/go.mod h1:U8+INwJo3nBv1m6A/8OBXAq7Jnpspk5AxSgDyEQcea8= +github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= +github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= +github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= +github.com/securego/gosec/v2 v2.11.0/go.mod h1:SX8bptShuG8reGC0XS09+a4H2BoWSJi+fscA+Pulbpo= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= +github.com/shirou/gopsutil/v3 v3.22.4/go.mod h1:D01hZJ4pVHPpCTZ3m3T2+wDF2YAGfd+H4ifUguaQzHM= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sivchari/containedctx v1.0.2/go.mod h1:PwZOeqm4/DLoJOqMSIJs3aKqXRX4YO+uXww087KZ7Bw= +github.com/sivchari/tenv v1.5.0/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= +github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= +github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= +github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= +github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk= +github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= +github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= +github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= +github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7vWWGaGo= +github.com/sylvia7788/contextcheck v1.0.4/go.mod h1:vuPKJMQ7MQ91ZTqfdyreNKwZjyUg6KO+IebVyQDedZQ= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca h1:Ld/zXl5t4+D69SiV4JoN7kkfvJdOWlPpfxrzxpLMoUk= github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +github.com/tdakkota/asciicheck v0.1.1/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= -github.com/tendermint/tendermint v0.34.14/go.mod h1:FrwVm3TvsVicI9Z7FlucHV6Znfd5KBc/Lpp69cCwtk0= -github.com/tendermint/tendermint v0.34.19 h1:y0P1qI5wSa9IRuhKnTDA6IUcOrLi1hXJuALR+R7HFEk= -github.com/tendermint/tendermint v0.34.19/go.mod h1:R5+wgIwSxMdKQcmOaeudL0Cjkr3HDkhpcdum6VeU3R4= -github.com/tendermint/tm-db v0.6.4/go.mod h1:dptYhIpJ2M5kUuenLr+Yyf3zQOv1SgBZcl8/BmWlMBw= +github.com/tendermint/tendermint v0.34.20-rc1 h1:5ej9Fk5zlDF6Pa8/FJKp9j3Sto95JdCV+wVJFi94E5k= +github.com/tendermint/tendermint v0.34.20-rc1/go.mod h1:u2xI6q3IeLQQ2NdIpRKLUKBNog0o7EzBpvDCE0/OTmg= github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= github.com/tendermint/tm-db v0.6.7 h1:fE00Cbl0jayAoqlExN6oyQJ7fR/ZtoVOmvPJ//+shu8= github.com/tendermint/tm-db v0.6.7/go.mod h1:byQDzFkZV1syXr/ReXS808NxA2xvyuuVgXOJ/088L6I= +github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= +github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= +github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= +github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= +github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= +github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tomarrell/wrapcheck/v2 v2.6.1/go.mod h1:Eo+Opt6pyMW1b6cNllOcDSSoHO0aTJ+iF6BfCUbHltA= +github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= +github.com/tommy-muehle/go-mnd/v2 v2.5.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= +github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/uudashr/gocognit v1.0.5/go.mod h1:wgYz0mitoKOTysqxTDMOUXg+Jb5SvtihkfmugIZYpEA= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.30.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus= +github.com/valyala/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/VPSJnLYn+LmLk8= +github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= +github.com/vektra/mockery/v2 v2.14.0/go.mod h1:bnD1T8tExSgPD1ripLkDbr60JA9VtQeu12P3wgLZd7M= +github.com/viki-org/dnscache v0.0.0-20130720023526-c70c1f23c5d8/go.mod h1:dniwbG03GafCjFohMDmz6Zc6oCuiqgH6tGNyXTkHzXE= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= +github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= +github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +gitlab.com/bosi/decorder v0.2.1/go.mod h1:6C/nhLSbF6qZbYD8bRmISBwc6vcWdNsiIBkRvjJFrH0= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/etcd v0.0.0-20200513171258-e048e166ab9c/go.mod h1:xCI7ZzBfRuGgBXyXO6yfWfDmlWd35khcWpUa4L0xI/k= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.2/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= +go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.2/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= +go.etcd.io/etcd/client/v2 v2.305.2/go.mod h1:2D7ZejHVMIfog1221iLSYlQRzrtECw3kz4I4VAQm3qI= +go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= +go.mozilla.org/mozlog v0.0.0-20170222151521-4bb13139d403/go.mod h1:jHoPAGnDrCy6kaI2tAze5Prf0Nr0w/oNkROt2lw3n3o= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -762,16 +1005,21 @@ go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -788,12 +1036,19 @@ golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210915214749-c084706c2272 h1:3erb+vDS8lU1sxfDHF4/hhWyaXnhIaO+7RgL4fDZORA= golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220313003712-b769efc7c000/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -807,6 +1062,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -834,22 +1091,22 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -857,6 +1114,7 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -864,6 +1122,7 @@ golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= @@ -885,14 +1144,23 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211208012354-db4efeb81f4b h1:MWaHNqZy3KTpuTMAGvv+Kw+ylsEpmyJZizz1dqxnu28= -golang.org/x/net v0.0.0-20211208012354-db4efeb81f4b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -910,10 +1178,14 @@ golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -921,6 +1193,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -928,7 +1201,6 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -945,6 +1217,7 @@ golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -954,8 +1227,6 @@ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -968,6 +1239,7 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -977,18 +1249,19 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -996,29 +1269,54 @@ golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0= +golang.org/x/sys v0.0.0-20211213223007-03aa0b5f6827/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220403020550-483a9cbc67c0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220405210540-1e041c57c461/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220406163625-3f8b81556e12/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220411215600-e5f449aeb171/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1036,37 +1334,46 @@ golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190228203856-589c23e65e65/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1076,43 +1383,74 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200630154851-b2d8b0336632/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200706234117-b22de6825cf7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201002184944-ecd9fd270d5d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201028025901-8cd080b735b3/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= +golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= +golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.9-0.20211228192929-ee1ca4ffc4da/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.11-0.20220316014157-77aa08bb151a/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.10.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= @@ -1140,24 +1478,34 @@ google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqiv google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw= google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181107211654-5fc9ac540362/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= @@ -1179,16 +1527,19 @@ google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200626011028-ee7919e894b5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200707001353-8e8330bf89df/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1213,25 +1564,38 @@ google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb h1:ZrsicilzPCS/Xr8qtBZZLpy4P9TYXAfl49ctG1/5tgw= -google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= @@ -1250,9 +1614,11 @@ google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1266,8 +1632,10 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= +google.golang.org/protobuf v1.27.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1275,11 +1643,13 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -1290,15 +1660,19 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.6/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.2.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1306,10 +1680,14 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.3.1/go.mod h1:vlRD9XErLMGT+mDuofSr0mMMquscM/1nQqtRSsh6m70= +mvdan.cc/gofumpt v0.3.1/go.mod h1:w3ymliuxvzVx8DAutBnVyDqYb1Niy/yCJt/lk821YCE= +mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= +mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= +mvdan.cc/unparam v0.0.0-20211214103731-d0ef000c54e5/go.mod h1:b8RRCBm0eeiWR8cfN88xeq2G5SG3VKGO+5UPWi5FSOY= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/store/tools/ics23/iavl/helpers/helpers.go b/store/tools/ics23/iavl/helpers/helpers.go index 26f1f09dcfc9..9e6c9416bdb0 100644 --- a/store/tools/ics23/iavl/helpers/helpers.go +++ b/store/tools/ics23/iavl/helpers/helpers.go @@ -65,7 +65,7 @@ func GetKey(allkeys [][]byte, loc tmproofs.Where) []byte { return allkeys[len(allkeys)-1] } // select a random index between 1 and allkeys-2 - idx := rand.Int()%(len(allkeys)-2) + 1 + idx := rand.NewRand().Int()%(len(allkeys)-2) + 1 return allkeys[idx] } diff --git a/testutil/configurator/configurator.go b/testutil/configurator/configurator.go new file mode 100644 index 000000000000..a69d138e42e5 --- /dev/null +++ b/testutil/configurator/configurator.go @@ -0,0 +1,109 @@ +package configurator + +import ( + runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1" + appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" + authmodulev1 "cosmossdk.io/api/cosmos/auth/module/v1" + bankmodulev1 "cosmossdk.io/api/cosmos/bank/module/v1" + paramsmodulev1 "cosmossdk.io/api/cosmos/params/module/v1" + "cosmossdk.io/core/appconfig" + "cosmossdk.io/depinject" +) + +var beginBlockOrder = []string{ + "mint", + "staking", + "auth", + "bank", + "params", +} + +var endBlockersOrder = []string{ + "staking", + "auth", + "bank", + "mint", + "params", +} + +type ModuleOption func(options map[string]*appv1alpha1.ModuleConfig) + +func BankModule() ModuleOption { + return func(options map[string]*appv1alpha1.ModuleConfig) { + options["bank"] = &appv1alpha1.ModuleConfig{ + Name: "bank", + Config: appconfig.WrapAny(&bankmodulev1.Module{}), + } + } +} + +func AuthModule() ModuleOption { + return func(options map[string]*appv1alpha1.ModuleConfig) { + options["auth"] = &appv1alpha1.ModuleConfig{ + Name: "auth", + Config: appconfig.WrapAny(&authmodulev1.Module{ + Bech32Prefix: "cosmos", + ModuleAccountPermissions: []*authmodulev1.ModuleAccountPermission{ + {Account: "fee_collector"}, + {Account: "mint", Permissions: []string{"minter"}}, + {Account: "bonded_tokens_pool", Permissions: []string{"burner", "staking"}}, + {Account: "not_bonded_tokens_pool", Permissions: []string{"burner", "staking"}}, + }, + }), + } + } +} + +func ParamsModule() ModuleOption { + return func(options map[string]*appv1alpha1.ModuleConfig) { + options["params"] = &appv1alpha1.ModuleConfig{ + Name: "params", + Config: appconfig.WrapAny(¶msmodulev1.Module{}), + } + } +} + +func NewAppConfig(opts ...ModuleOption) depinject.Config { + options := make(map[string]*appv1alpha1.ModuleConfig) + for _, opt := range opts { + opt(options) + } + + beginBlockers := make([]string, 0) + endBlockers := make([]string, 0) + overrides := make([]*runtimev1alpha1.StoreKeyConfig, 0) + + for _, s := range beginBlockOrder { + if _, ok := options[s]; ok { + beginBlockers = append(beginBlockers, s) + } + } + + for _, s := range endBlockersOrder { + if _, ok := options[s]; ok { + endBlockers = append(endBlockers, s) + } + } + + if _, ok := options["auth"]; ok { + overrides = append(overrides, &runtimev1alpha1.StoreKeyConfig{ModuleName: "auth", KvStoreKey: "acc"}) + } + + modules := []*appv1alpha1.ModuleConfig{ + { + Name: "runtime", + Config: appconfig.WrapAny(&runtimev1alpha1.Module{ + AppName: "TestApp", + BeginBlockers: beginBlockers, + EndBlockers: endBlockers, + OverrideStoreKeys: overrides, + }), + }, + } + + for _, m := range options { + modules = append(modules, m) + } + + return appconfig.Compose(&appv1alpha1.Config{Modules: modules}) +} diff --git a/types/query/filtered_pagination_test.go b/types/query/filtered_pagination_test.go index 2da46f83125c..ee118f9c7a6d 100644 --- a/types/query/filtered_pagination_test.go +++ b/types/query/filtered_pagination_test.go @@ -2,7 +2,6 @@ package query_test import ( "fmt" - "testing" "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" @@ -17,7 +16,6 @@ import ( var addr1 = sdk.AccAddress([]byte("addr1")) func (s *paginationTestSuite) TestFilteredPaginations() { - app, ctx, appCodec := setupTest(s.T()) var balances sdk.Coins for i := 0; i < numBalances; i++ { @@ -32,20 +30,20 @@ func (s *paginationTestSuite) TestFilteredPaginations() { balances = balances.Sort() addr1 := sdk.AccAddress([]byte("addr1")) - acc1 := app.AccountKeeper.NewAccountWithAddress(ctx, addr1) - app.AccountKeeper.SetAccount(ctx, acc1) - s.Require().NoError(testutil.FundAccount(app.BankKeeper, ctx, addr1, balances)) - store := ctx.KVStore(app.GetKey(types.StoreKey)) + acc1 := s.accountKeeper.NewAccountWithAddress(s.ctx, addr1) + s.accountKeeper.SetAccount(s.ctx, acc1) + s.Require().NoError(testutil.FundAccount(s.bankKeeper, s.ctx, addr1, balances)) + store := s.ctx.KVStore(s.app.UnsafeFindStoreKey(types.StoreKey)) // verify pagination with limit > total values pageReq := &query.PageRequest{Key: nil, Limit: 5, CountTotal: true} - balances, res, err := execFilterPaginate(store, pageReq, appCodec) + balances, res, err := execFilterPaginate(store, pageReq, s.cdc) s.Require().NoError(err) s.Require().NotNil(res) s.Require().Equal(4, len(balances)) s.T().Log("verify empty request") - balances, res, err = execFilterPaginate(store, nil, appCodec) + balances, res, err = execFilterPaginate(store, nil, s.cdc) s.Require().NoError(err) s.Require().NotNil(res) s.Require().Equal(4, len(balances)) @@ -54,7 +52,7 @@ func (s *paginationTestSuite) TestFilteredPaginations() { s.T().Log("verify nextKey is returned if there are more results") pageReq = &query.PageRequest{Key: nil, Limit: 2, CountTotal: true} - balances, res, err = execFilterPaginate(store, pageReq, appCodec) + balances, res, err = execFilterPaginate(store, pageReq, s.cdc) s.Require().NoError(err) s.Require().NotNil(res) s.Require().Equal(2, len(balances)) @@ -64,12 +62,12 @@ func (s *paginationTestSuite) TestFilteredPaginations() { s.T().Log("verify both key and offset can't be given") pageReq = &query.PageRequest{Key: res.NextKey, Limit: 1, Offset: 2, CountTotal: true} - _, _, err = execFilterPaginate(store, pageReq, appCodec) + _, _, err = execFilterPaginate(store, pageReq, s.cdc) s.Require().Error(err) s.T().Log("use nextKey for query") pageReq = &query.PageRequest{Key: res.NextKey, Limit: 2, CountTotal: true} - balances, res, err = execFilterPaginate(store, pageReq, appCodec) + balances, res, err = execFilterPaginate(store, pageReq, s.cdc) s.Require().NoError(err) s.Require().NotNil(res) s.Require().Equal(2, len(balances)) @@ -77,7 +75,7 @@ func (s *paginationTestSuite) TestFilteredPaginations() { s.T().Log("verify default limit") pageReq = &query.PageRequest{Key: nil, Limit: 0} - balances, res, err = execFilterPaginate(store, pageReq, appCodec) + balances, res, err = execFilterPaginate(store, pageReq, s.cdc) s.Require().NoError(err) s.Require().NotNil(res) s.Require().Equal(4, len(balances)) @@ -85,15 +83,13 @@ func (s *paginationTestSuite) TestFilteredPaginations() { s.T().Log("verify with offset") pageReq = &query.PageRequest{Offset: 2, Limit: 2} - balances, res, err = execFilterPaginate(store, pageReq, appCodec) + balances, res, err = execFilterPaginate(store, pageReq, s.cdc) s.Require().NoError(err) s.Require().NotNil(res) s.Require().LessOrEqual(len(balances), 2) } func (s *paginationTestSuite) TestReverseFilteredPaginations() { - app, ctx, appCodec := setupTest(s.T()) - var balances sdk.Coins for i := 0; i < numBalances; i++ { denom := fmt.Sprintf("foo%ddenom", i) @@ -107,20 +103,20 @@ func (s *paginationTestSuite) TestReverseFilteredPaginations() { balances = balances.Sort() addr1 := sdk.AccAddress([]byte("addr1")) - acc1 := app.AccountKeeper.NewAccountWithAddress(ctx, addr1) - app.AccountKeeper.SetAccount(ctx, acc1) - s.Require().NoError(testutil.FundAccount(app.BankKeeper, ctx, addr1, balances)) - store := ctx.KVStore(app.GetKey(types.StoreKey)) + acc1 := s.accountKeeper.NewAccountWithAddress(s.ctx, addr1) + s.accountKeeper.SetAccount(s.ctx, acc1) + s.Require().NoError(testutil.FundAccount(s.bankKeeper, s.ctx, addr1, balances)) + store := s.ctx.KVStore(s.app.UnsafeFindStoreKey(types.StoreKey)) // verify pagination with limit > total values pageReq := &query.PageRequest{Key: nil, Limit: 5, CountTotal: true, Reverse: true} - balns, res, err := execFilterPaginate(store, pageReq, appCodec) + balns, res, err := execFilterPaginate(store, pageReq, s.cdc) s.Require().NoError(err) s.Require().NotNil(res) s.Require().Equal(5, len(balns)) s.T().Log("verify empty request") - balns, res, err = execFilterPaginate(store, nil, appCodec) + balns, res, err = execFilterPaginate(store, nil, s.cdc) s.Require().NoError(err) s.Require().NotNil(res) s.Require().Equal(10, len(balns)) @@ -129,7 +125,7 @@ func (s *paginationTestSuite) TestReverseFilteredPaginations() { s.T().Log("verify default limit") pageReq = &query.PageRequest{Reverse: true} - balns, res, err = execFilterPaginate(store, pageReq, appCodec) + balns, res, err = execFilterPaginate(store, pageReq, s.cdc) s.Require().NoError(err) s.Require().NotNil(res) s.Require().Equal(10, len(balns)) @@ -137,7 +133,7 @@ func (s *paginationTestSuite) TestReverseFilteredPaginations() { s.T().Log("verify nextKey is returned if there are more results") pageReq = &query.PageRequest{Limit: 2, CountTotal: true, Reverse: true} - balns, res, err = execFilterPaginate(store, pageReq, appCodec) + balns, res, err = execFilterPaginate(store, pageReq, s.cdc) s.Require().NoError(err) s.Require().NotNil(res) s.Require().Equal(2, len(balns)) @@ -147,12 +143,12 @@ func (s *paginationTestSuite) TestReverseFilteredPaginations() { s.T().Log("verify both key and offset can't be given") pageReq = &query.PageRequest{Key: res.NextKey, Limit: 1, Offset: 2, Reverse: true} - _, _, err = execFilterPaginate(store, pageReq, appCodec) + _, _, err = execFilterPaginate(store, pageReq, s.cdc) s.Require().Error(err) s.T().Log("use nextKey for query and reverse true") pageReq = &query.PageRequest{Key: res.NextKey, Limit: 2, Reverse: true} - balns, res, err = execFilterPaginate(store, pageReq, appCodec) + balns, res, err = execFilterPaginate(store, pageReq, s.cdc) s.Require().NoError(err) s.Require().NotNil(res) s.Require().Equal(2, len(balns)) @@ -161,7 +157,7 @@ func (s *paginationTestSuite) TestReverseFilteredPaginations() { s.T().Log("verify last page records, nextKey for query and reverse true") pageReq = &query.PageRequest{Key: res.NextKey, Reverse: true} - balns, res, err = execFilterPaginate(store, pageReq, appCodec) + balns, res, err = execFilterPaginate(store, pageReq, s.cdc) s.Require().NoError(err) s.Require().NotNil(res) s.Require().Equal(6, len(balns)) @@ -171,9 +167,7 @@ func (s *paginationTestSuite) TestReverseFilteredPaginations() { s.Require().Equal(balances[235:241].String(), balns.Sort().String()) } -func ExampleFilteredPaginate(t *testing.T) { - app, ctx, _ := setupTest(t) - +func (s *paginationTestSuite) TestFilteredPaginate() { var balances sdk.Coins for i := 0; i < numBalances; i++ { denom := fmt.Sprintf("foo%ddenom", i) @@ -187,15 +181,15 @@ func ExampleFilteredPaginate(t *testing.T) { balances = balances.Sort() addr1 := sdk.AccAddress([]byte("addr1")) - acc1 := app.AccountKeeper.NewAccountWithAddress(ctx, addr1) - app.AccountKeeper.SetAccount(ctx, acc1) - err := testutil.FundAccount(app.BankKeeper, ctx, addr1, balances) + acc1 := s.accountKeeper.NewAccountWithAddress(s.ctx, addr1) + s.accountKeeper.SetAccount(s.ctx, acc1) + err := testutil.FundAccount(s.bankKeeper, s.ctx, addr1, balances) if err != nil { // should return no error fmt.Println(err) } pageReq := &query.PageRequest{Key: nil, Limit: 1, CountTotal: true} - store := ctx.KVStore(app.GetKey(types.StoreKey)) + store := s.ctx.KVStore(s.app.UnsafeFindStoreKey(types.StoreKey)) balancesStore := prefix.NewStore(store, types.BalancesPrefix) accountStore := prefix.NewStore(balancesStore, address.MustLengthPrefix(addr1)) @@ -254,7 +248,6 @@ func execFilterPaginate(store sdk.KVStore, pageReq *query.PageRequest, appCodec } func (s *paginationTestSuite) TestFilteredPaginationsNextKey() { - app, ctx, appCodec := setupTest(s.T()) var balances sdk.Coins @@ -265,10 +258,10 @@ func (s *paginationTestSuite) TestFilteredPaginationsNextKey() { balances = balances.Sort() addr1 := sdk.AccAddress([]byte("addr1")) - acc1 := app.AccountKeeper.NewAccountWithAddress(ctx, addr1) - app.AccountKeeper.SetAccount(ctx, acc1) - s.Require().NoError(testutil.FundAccount(app.BankKeeper, ctx, addr1, balances)) - store := ctx.KVStore(app.GetKey(types.StoreKey)) + acc1 := s.accountKeeper.NewAccountWithAddress(s.ctx, addr1) + s.accountKeeper.SetAccount(s.ctx, acc1) + s.Require().NoError(testutil.FundAccount(s.bankKeeper, s.ctx, addr1, balances)) + store := s.ctx.KVStore(s.app.UnsafeFindStoreKey(types.StoreKey)) execFilterPaginate := func(store sdk.KVStore, pageReq *query.PageRequest, appCodec codec.Codec) (balances sdk.Coins, res *query.PageResponse, err error) { balancesStore := prefix.NewStore(store, types.BalancesPrefix) @@ -299,7 +292,7 @@ func (s *paginationTestSuite) TestFilteredPaginationsNextKey() { s.T().Log("verify next key of offset query") pageReq := &query.PageRequest{Key: nil, Limit: 1, CountTotal: true} - balances, res, err := execFilterPaginate(store, pageReq, appCodec) + balances, res, err := execFilterPaginate(store, pageReq, s.cdc) s.Require().NoError(err) s.Require().NotNil(res) s.Require().Equal(1, len(balances)) @@ -308,7 +301,7 @@ func (s *paginationTestSuite) TestFilteredPaginationsNextKey() { s.Require().NotNil(res.NextKey) pageReq = &query.PageRequest{Key: res.NextKey, Limit: 1} - balances, res, err = execFilterPaginate(store, pageReq, appCodec) + balances, res, err = execFilterPaginate(store, pageReq, s.cdc) s.Require().NoError(err) s.Require().NotNil(res) s.Require().Equal(1, len(balances)) diff --git a/types/query/pagination_test.go b/types/query/pagination_test.go index 784ebd5a5c01..fe79af04c434 100644 --- a/types/query/pagination_test.go +++ b/types/query/pagination_test.go @@ -7,19 +7,25 @@ import ( "github.com/stretchr/testify/suite" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - dbm "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - "github.com/cosmos/cosmos-sdk/simapp" - "github.com/cosmos/cosmos-sdk/store" + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/store/prefix" + "github.com/cosmos/cosmos-sdk/testutil/configurator" + testutilsims "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/address" "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/cosmos-sdk/x/auth" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + _ "github.com/cosmos/cosmos-sdk/x/bank" + bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" "github.com/cosmos/cosmos-sdk/x/bank/testutil" "github.com/cosmos/cosmos-sdk/x/bank/types" + _ "github.com/cosmos/cosmos-sdk/x/params" ) const ( @@ -35,12 +41,41 @@ const ( type paginationTestSuite struct { suite.Suite + ctx sdk.Context + bankKeeper bankkeeper.Keeper + accountKeeper authkeeper.AccountKeeper + cdc codec.Codec + interfaceReg codectypes.InterfaceRegistry + app *runtime.App } func TestPaginationTestSuite(t *testing.T) { suite.Run(t, new(paginationTestSuite)) } +func (s *paginationTestSuite) SetupTest() { + var ( + bankKeeper bankkeeper.Keeper + accountKeeper authkeeper.AccountKeeper + reg codectypes.InterfaceRegistry + cdc codec.Codec + ) + + app, err := testutilsims.Setup( + configurator.NewAppConfig( + configurator.AuthModule(), + configurator.BankModule(), + configurator.ParamsModule()), + &bankKeeper, &accountKeeper, ®, &cdc) + + s.NoError(err) + + ctx := app.BaseApp.NewContext(false, tmproto.Header{Height: 1}) + + s.ctx, s.bankKeeper, s.accountKeeper, s.cdc, s.app, s.interfaceReg = + ctx, bankKeeper, accountKeeper, cdc, app, reg +} + func (s *paginationTestSuite) TestParsePagination() { s.T().Log("verify default values for empty page request") pageReq := &query.PageRequest{} @@ -61,9 +96,8 @@ func (s *paginationTestSuite) TestParsePagination() { } func (s *paginationTestSuite) TestPagination() { - app, ctx, _ := setupTest(s.T()) - queryHelper := baseapp.NewQueryServerTestHelper(ctx, app.InterfaceRegistry()) - types.RegisterQueryServer(queryHelper, app.BankKeeper) + queryHelper := baseapp.NewQueryServerTestHelper(s.ctx, s.interfaceReg) + types.RegisterQueryServer(queryHelper, s.bankKeeper) queryClient := types.NewQueryClient(queryHelper) var balances sdk.Coins @@ -75,9 +109,9 @@ func (s *paginationTestSuite) TestPagination() { balances = balances.Sort() addr1 := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) - acc1 := app.AccountKeeper.NewAccountWithAddress(ctx, addr1) - app.AccountKeeper.SetAccount(ctx, acc1) - s.Require().NoError(testutil.FundAccount(app.BankKeeper, ctx, addr1, balances)) + acc1 := s.accountKeeper.NewAccountWithAddress(s.ctx, addr1) + s.accountKeeper.SetAccount(s.ctx, acc1) + s.Require().NoError(testutil.FundAccount(s.bankKeeper, s.ctx, addr1, balances)) s.T().Log("verify empty page request results a max of defaultLimit records and counts total records") pageReq := &query.PageRequest{} @@ -170,9 +204,8 @@ func (s *paginationTestSuite) TestPagination() { } func (s *paginationTestSuite) TestReversePagination() { - app, ctx, _ := setupTest(s.T()) - queryHelper := baseapp.NewQueryServerTestHelper(ctx, app.InterfaceRegistry()) - types.RegisterQueryServer(queryHelper, app.BankKeeper) + queryHelper := baseapp.NewQueryServerTestHelper(s.ctx, s.interfaceReg) + types.RegisterQueryServer(queryHelper, s.bankKeeper) queryClient := types.NewQueryClient(queryHelper) var balances sdk.Coins @@ -184,9 +217,9 @@ func (s *paginationTestSuite) TestReversePagination() { balances = balances.Sort() addr1 := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) - acc1 := app.AccountKeeper.NewAccountWithAddress(ctx, addr1) - app.AccountKeeper.SetAccount(ctx, acc1) - s.Require().NoError(testutil.FundAccount(app.BankKeeper, ctx, addr1, balances)) + acc1 := s.accountKeeper.NewAccountWithAddress(s.ctx, addr1) + s.accountKeeper.SetAccount(s.ctx, acc1) + s.Require().NoError(testutil.FundAccount(s.bankKeeper, s.ctx, addr1, balances)) s.T().Log("verify paginate with custom limit and countTotal, Reverse false") pageReq := &query.PageRequest{Limit: 2, CountTotal: true, Reverse: true, Key: nil} @@ -293,9 +326,7 @@ func (s *paginationTestSuite) TestReversePagination() { s.Require().Nil(res.Pagination.NextKey) } -func ExamplePaginate(t *testing.T) { - app, ctx, _ := setupTest(t) - +func (s *paginationTestSuite) TestPaginate() { var balances sdk.Coins for i := 0; i < 2; i++ { @@ -305,9 +336,9 @@ func ExamplePaginate(t *testing.T) { balances = balances.Sort() addr1 := sdk.AccAddress([]byte("addr1")) - acc1 := app.AccountKeeper.NewAccountWithAddress(ctx, addr1) - app.AccountKeeper.SetAccount(ctx, acc1) - err := testutil.FundAccount(app.BankKeeper, ctx, addr1, balances) + acc1 := s.accountKeeper.NewAccountWithAddress(s.ctx, addr1) + s.accountKeeper.SetAccount(s.ctx, acc1) + err := testutil.FundAccount(s.bankKeeper, s.ctx, addr1, balances) if err != nil { // should return no error fmt.Println(err) } @@ -315,7 +346,7 @@ func ExamplePaginate(t *testing.T) { pageReq := &query.PageRequest{Key: nil, Limit: 1, CountTotal: true} request := types.NewQueryAllBalancesRequest(addr1, pageReq) balResult := sdk.NewCoins() - authStore := ctx.KVStore(app.GetKey(types.StoreKey)) + authStore := s.ctx.KVStore(s.app.UnsafeFindStoreKey(types.StoreKey)) balancesStore := prefix.NewStore(authStore, types.BalancesPrefix) accountStore := prefix.NewStore(balancesStore, address.MustLengthPrefix(addr1)) pageRes, err := query.Paginate(accountStore, request.Pagination, func(key []byte, value []byte) error { @@ -334,16 +365,3 @@ func ExamplePaginate(t *testing.T) { // Output: // balances: pagination: } - -func setupTest(t *testing.T) (*simapp.SimApp, sdk.Context, codec.Codec) { - app := simapp.Setup(t, false) - ctx := app.BaseApp.NewContext(false, tmproto.Header{Height: 1}) - appCodec := app.AppCodec() - - db := dbm.NewMemDB() - ms := store.NewCommitMultiStore(db) - - ms.LoadLatestVersion() - - return app, ctx, appCodec -} diff --git a/types/utils.go b/types/utils.go index 7f10ce396c86..efd9a9c71a81 100644 --- a/types/utils.go +++ b/types/utils.go @@ -10,10 +10,8 @@ import ( dbm "github.com/tendermint/tm-db" ) -var ( - // This is set at compile time. Could be cleveldb, defaults is goleveldb. - backend = dbm.GoLevelDBBackend -) +// This is set at compile time. Could be cleveldb, defaults is goleveldb. +var backend = dbm.GoLevelDBBackend // SortedJSON takes any JSON and returns it sorted by keys. Also, all white-spaces // are removed. diff --git a/x/auth/ante/fee.go b/x/auth/ante/fee.go index fb433241f254..0f10041c3733 100644 --- a/x/auth/ante/fee.go +++ b/x/auth/ante/fee.go @@ -42,13 +42,21 @@ func (dfd DeductFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bo return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") } - if ctx.BlockHeight() > 0 && feeTx.GetGas() == 0 { + if !simulate && ctx.BlockHeight() > 0 && feeTx.GetGas() == 0 { return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidGasLimit, "must provide positive gas") } - fee, priority, err := dfd.txFeeChecker(ctx, tx) - if err != nil { - return ctx, err + var ( + priority int64 + err error + ) + + fee := feeTx.GetFee() + if !simulate { + fee, priority, err = dfd.txFeeChecker(ctx, tx) + if err != nil { + return ctx, err + } } if err := dfd.checkDeductFee(ctx, tx, fee); err != nil { return ctx, err diff --git a/x/auth/ante/fee_test.go b/x/auth/ante/fee_test.go index c8ad40f3f511..4d2fdac56e46 100644 --- a/x/auth/ante/fee_test.go +++ b/x/auth/ante/fee_test.go @@ -36,6 +36,10 @@ func (s *AnteTestSuite) TestDeductFeeDecorator_ZeroGas() { _, err = antehandler(s.ctx, tx, false) s.Require().Error(err) + + // zero gas is accepted in simulation mode + _, err = antehandler(s.ctx, tx, true) + s.Require().NoError(err) } func (s *AnteTestSuite) TestEnsureMempoolFees() { @@ -74,6 +78,11 @@ func (s *AnteTestSuite) TestEnsureMempoolFees() { _, err = antehandler(s.ctx, tx, false) s.Require().NotNil(err, "Decorator should have errored on too low fee for local gasPrice") + // antehandler should not error since we do not check minGasPrice in simulation mode + cacheCtx, _ := s.ctx.CacheContext() + _, err = antehandler(cacheCtx, tx, true) + s.Require().Nil(err, "Decorator should not have errored in simulation mode") + // Set IsCheckTx to false s.ctx = s.ctx.WithIsCheckTx(false) diff --git a/x/auth/ante/sigverify.go b/x/auth/ante/sigverify.go index 7363307af12b..a24af86667e0 100644 --- a/x/auth/ante/sigverify.go +++ b/x/auth/ante/sigverify.go @@ -310,8 +310,8 @@ func (svd SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simul // IncrementSequenceDecorator handles incrementing sequences of all signers. // Use the IncrementSequenceDecorator decorator to prevent replay attacks. Note, -// there is no need to execute IncrementSequenceDecorator on RecheckTX since -// CheckTx would already bump the sequence number. +// there is need to execute IncrementSequenceDecorator on RecheckTx since +// BaseApp.Commit() will set the check state based on the latest header. // // NOTE: Since CheckTx and DeliverTx state are managed separately, subsequent and // sequential txs orginating from the same account cannot be handled correctly in diff --git a/x/auth/ante/sigverify_test.go b/x/auth/ante/sigverify_test.go index faec68228290..d398357eb987 100644 --- a/x/auth/ante/sigverify_test.go +++ b/x/auth/ante/sigverify_test.go @@ -206,7 +206,6 @@ func (suite *AnteTestSuite) TestSigVerification() { // In the meantime, we want to make double-sure amino compatibility works. // ref: https://github.com/cosmos/cosmos-sdk/issues/7229 func (suite *AnteTestSuite) TestSigVerification_ExplicitAmino() { - // Set up TxConfig. aminoCdc := codec.NewLegacyAmino() // We're using TestMsg amino encoding in some tests, so register it here. diff --git a/x/auth/client/cli/tx_sign.go b/x/auth/client/cli/tx_sign.go index 39626e5ed1ac..53fa016e6ac2 100644 --- a/x/auth/client/cli/tx_sign.go +++ b/x/auth/client/cli/tx_sign.go @@ -9,7 +9,8 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" - sdk "github.com/cosmos/cosmos-sdk/types" + kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" + authclient "github.com/cosmos/cosmos-sdk/x/auth/client" ) @@ -224,7 +225,6 @@ func makeSignCmd() func(cmd *cobra.Command, args []string) error { return err } - txFactory := tx.NewFactoryCLI(clientCtx, cmd.Flags()) txCfg := clientCtx.TxConfig txBuilder, err := txCfg.WrapTxBuilder(newTx) if err != nil { @@ -244,14 +244,39 @@ func makeSignCmd() func(cmd *cobra.Command, args []string) error { overwrite, _ := f.GetBool(flagOverwrite) if multisig != "" { - multisigAddr, err := sdk.AccAddressFromBech32(multisig) + // Bech32 decode error, maybe it's a name, we try to fetch from keyring + multisigAddr, multisigName, _, err := client.GetFromFields(clientCtx, txF.Keybase(), multisig) if err != nil { - // Bech32 decode error, maybe it's a name, we try to fetch from keyring - multisigAddr, _, _, err = client.GetFromFields(clientCtx, txFactory.Keybase(), multisig) - if err != nil { - return fmt.Errorf("error getting account from keybase: %w", err) + return fmt.Errorf("error getting account from keybase: %w", err) + } + multisigkey, err := getMultisigRecord(clientCtx, multisigName) + if err != nil { + return err + } + multisigPubKey, err := multisigkey.GetPubKey() + if err != nil { + return err + } + multisigLegacyPub := multisigPubKey.(*kmultisig.LegacyAminoPubKey) + + fromRecord, err := clientCtx.Keyring.Key(fromName) + if err != nil { + return fmt.Errorf("error getting account from keybase: %w", err) + } + fromPubKey, err := fromRecord.GetPubKey() + if err != nil { + return err + } + + var found bool + for _, pubkey := range multisigLegacyPub.GetPubKeys() { + if pubkey.Equals(fromPubKey) { + found = true } } + if !found { + return fmt.Errorf("signing key is not a part of multisig key") + } err = authclient.SignTxWithSignerAddress( txF, clientCtx, multisigAddr, fromName, txBuilder, clientCtx.Offline, overwrite) if err != nil { diff --git a/x/auth/client/testutil/suite.go b/x/auth/client/testutil/suite.go index 2508744e2cc6..2af8d212ccea 100644 --- a/x/auth/client/testutil/suite.go +++ b/x/auth/client/testutil/suite.go @@ -74,6 +74,10 @@ func (s *IntegrationTestSuite) SetupSuite() { pub2, err := account2.GetPubKey() s.Require().NoError(err) + // Create a dummy account for testing purpose + _, _, err = kb.NewMnemonic("dummyAccount", keyring.English, sdk.FullFundraiserPath, keyring.DefaultBIP39Passphrase, hd.Secp256k1) + s.Require().NoError(err) + multi := kmultisig.NewLegacyAminoPubKey(2, []cryptotypes.PubKey{pub1, pub2}) _, err = kb.SaveMultisig("multi", multi) s.Require().NoError(err) @@ -938,6 +942,10 @@ func (s *IntegrationTestSuite) TestCLIMultisignSortSignatures() { multisigRecord, err := val1.ClientCtx.Keyring.Key("multi") s.Require().NoError(err) + // Generate dummy account which is not a part of multisig. + dummyAcc, err := val1.ClientCtx.Keyring.Key("dummyAccount") + s.Require().NoError(err) + addr, err := multisigRecord.GetAddress() s.Require().NoError(err) resp, err := bankcli.QueryBalancesExec(val1.ClientCtx, addr) @@ -995,7 +1003,7 @@ func (s *IntegrationTestSuite) TestCLIMultisignSortSignatures() { sign1File := testutil.WriteToNewTempFile(s.T(), account1Signature.String()) - // Sign with account1 + // Sign with account2 addr2, err := account2.GetAddress() s.Require().NoError(err) account2Signature, err := TxSignExec(val1.ClientCtx, addr2, multiGeneratedTxFile.Name(), "--multisig", addr.String()) @@ -1003,6 +1011,13 @@ func (s *IntegrationTestSuite) TestCLIMultisignSortSignatures() { sign2File := testutil.WriteToNewTempFile(s.T(), account2Signature.String()) + // Sign with dummy account + dummyAddr, err := dummyAcc.GetAddress() + s.Require().NoError(err) + _, err = TxSignExec(val1.ClientCtx, dummyAddr, multiGeneratedTxFile.Name(), "--multisig", addr.String()) + s.Require().Error(err) + s.Require().Contains(err.Error(), "signing key is not a part of multisig key") + multiSigWith2Signatures, err := TxMultiSignExec(val1.ClientCtx, multisigRecord.Name, multiGeneratedTxFile.Name(), sign1File.Name(), sign2File.Name()) s.Require().NoError(err) @@ -1057,7 +1072,7 @@ func (s *IntegrationTestSuite) TestSignWithMultisig() { // as the main point of this test is to test the `--multisig` flag with an address // that is not in the keyring. _, err = TxSignExec(val1.ClientCtx, addr1, multiGeneratedTx2File.Name(), "--multisig", multisigAddr.String()) - s.Require().Contains(err.Error(), "tx intended signer does not match the given signer") + s.Require().Contains(err.Error(), "error getting account from keybase") } func (s *IntegrationTestSuite) TestCLIMultisign() { @@ -1124,7 +1139,7 @@ func (s *IntegrationTestSuite) TestCLIMultisign() { addr2, err := account2.GetAddress() s.Require().NoError(err) - // Sign with account1 + // Sign with account2 account2Signature, err := TxSignExec(val1.ClientCtx, addr2, multiGeneratedTxFile.Name(), "--multisig", addr.String()) s.Require().NoError(err) diff --git a/x/auth/keeper/keeper.go b/x/auth/keeper/keeper.go index 1ab380ef1d53..5be67b2ba95e 100644 --- a/x/auth/keeper/keeper.go +++ b/x/auth/keeper/keeper.go @@ -79,7 +79,6 @@ func NewAccountKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, proto func() types.AccountI, maccPerms map[string][]string, bech32Prefix string, authority string, ) AccountKeeper { - permAddrs := make(map[string]types.PermissionsForAddress) for name, perms := range maccPerms { permAddrs[name] = types.NewPermissionsForAddress(name, perms) diff --git a/x/auth/keeper/keeper_test.go b/x/auth/keeper/keeper_test.go index 8bf9ca3a4504..d1f135ee9097 100644 --- a/x/auth/keeper/keeper_test.go +++ b/x/auth/keeper/keeper_test.go @@ -139,7 +139,6 @@ func (suite *KeeperTestSuite) TestGetSetParams() { } func (suite *KeeperTestSuite) TestSupply_ValidatePermissions() { - err := suite.accountKeeper.ValidatePermissions(multiPermAcc) suite.Require().NoError(err) diff --git a/x/auth/keeper/migrations.go b/x/auth/keeper/migrations.go index 5826a6bb1688..2b52771dd39f 100644 --- a/x/auth/keeper/migrations.go +++ b/x/auth/keeper/migrations.go @@ -3,14 +3,12 @@ package keeper import ( "github.com/gogo/protobuf/grpc" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/exported" v043 "github.com/cosmos/cosmos-sdk/x/auth/migrations/v043" v046 "github.com/cosmos/cosmos-sdk/x/auth/migrations/v046" - - "github.com/cosmos/cosmos-sdk/x/auth/exported" + v4 "github.com/cosmos/cosmos-sdk/x/auth/migrations/v4" "github.com/cosmos/cosmos-sdk/x/auth/types" - - sdk "github.com/cosmos/cosmos-sdk/types" - v2 "github.com/cosmos/cosmos-sdk/x/auth/migrations/v2" ) // Migrator is a struct for handling in-place store migrations. @@ -58,7 +56,7 @@ func (m Migrator) Migrate2to3(ctx sdk.Context) error { // and managed by the x/params modules and stores them directly into the x/auth // module state. func (m Migrator) Migrate3to4(ctx sdk.Context) error { - return v2.Migrate(ctx, ctx.KVStore(m.keeper.storeKey), m.legacySubspace, m.keeper.cdc) + return v4.Migrate(ctx, ctx.KVStore(m.keeper.storeKey), m.legacySubspace, m.keeper.cdc) } // V45_SetAccount implements V45_SetAccount diff --git a/x/auth/migrations/v043/store_test.go b/x/auth/migrations/v043/store_test.go index afb89bbe2910..546ee34a6fa2 100644 --- a/x/auth/migrations/v043/store_test.go +++ b/x/auth/migrations/v043/store_test.go @@ -8,8 +8,6 @@ import ( "github.com/stretchr/testify/require" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - "github.com/cosmos/cosmos-sdk/testutil" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" @@ -17,11 +15,12 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth" authexported "github.com/cosmos/cosmos-sdk/x/auth/exported" "github.com/cosmos/cosmos-sdk/x/auth/keeper" - v2 "github.com/cosmos/cosmos-sdk/x/auth/migrations/v2" + v4 "github.com/cosmos/cosmos-sdk/x/auth/migrations/v4" authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/auth/vesting/exported" "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" + bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" "github.com/cosmos/cosmos-sdk/x/staking" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -43,7 +42,7 @@ func TestMigrateVestingAccounts(t *testing.T) { encCfg := moduletestutil.MakeTestEncodingConfig(auth.AppModuleBasic{}) cdc := encCfg.Codec - storeKey := sdk.NewKVStoreKey(v2.ModuleName) + storeKey := sdk.NewKVStoreKey(v4.ModuleName) tKey := sdk.NewTransientStoreKey("transient_test") ctx := testutil.DefaultContext(storeKey, tKey) store := ctx.KVStore(storeKey) @@ -62,7 +61,7 @@ func TestMigrateVestingAccounts(t *testing.T) { require.NoError(t, err) legacySubspace := newMockSubspace(authtypes.DefaultParams()) - require.NoError(t, v2.Migrate(ctx, store, legacySubspace, cdc)) + require.NoError(t, v4.Migrate(ctx, store, legacySubspace, cdc)) ctx = app.BaseApp.NewContext(false, tmproto.Header{Time: time.Now()}) stakingKeeper.SetParams(ctx, stakingtypes.DefaultParams()) @@ -79,7 +78,6 @@ func TestMigrateVestingAccounts(t *testing.T) { { "delayed vesting has vested, multiple delegations less than the total account balance", func(ctx sdk.Context, validator stakingtypes.Validator, delegatorAddr sdk.AccAddress) { - baseAccount := authtypes.NewBaseAccountWithAddress(delegatorAddr) vestedCoins := sdk.NewCoins(sdk.NewCoin(stakingKeeper.BondDenom(ctx), sdk.NewInt(200))) delayedAccount := types.NewDelayedVestingAccount(baseAccount, vestedCoins, ctx.BlockTime().Unix()) @@ -591,7 +589,6 @@ func TestMigrateVestingAccounts(t *testing.T) { for _, tc := range testCases { tc := tc t.Run(tc.name, func(t *testing.T) { - err := accountKeeper.SetParams(ctx, authtypes.DefaultParams()) require.NoError(t, err) @@ -653,7 +650,6 @@ func trackingCorrected(ctx sdk.Context, t *testing.T, ak keeper.AccountKeeper, a } func cleartTrackingFields(ctx sdk.Context, vesting exported.VestingAccount, accountKeeper keeper.AccountKeeper) error { - switch t := vesting.(type) { case *types.DelayedVestingAccount: t.DelegatedFree = nil @@ -675,7 +671,6 @@ func cleartTrackingFields(ctx sdk.Context, vesting exported.VestingAccount, acco } func dirtyTrackingFields(ctx sdk.Context, vesting exported.VestingAccount, accountKeeper keeper.AccountKeeper) error { - dirt := sdk.NewCoins(sdk.NewInt64Coin("stake", 42)) switch t := vesting.(type) { @@ -699,7 +694,6 @@ func dirtyTrackingFields(ctx sdk.Context, vesting exported.VestingAccount, accou } func createValidator(t *testing.T, ctx sdk.Context, bankKeeper bankkeeper.Keeper, stakingKeeper *stakingkeeper.Keeper, powers int64) (sdk.AccAddress, sdk.ValAddress) { - valTokens := sdk.TokensFromConsensusPower(powers, sdk.DefaultPowerReduction) addrs := simtestutil.AddTestAddrsIncremental(bankKeeper, stakingKeeper, ctx, 1, valTokens) valAddrs := simtestutil.ConvertAddrsToValAddrs(addrs) diff --git a/x/auth/migrations/v046/store_test.go b/x/auth/migrations/v046/store_test.go index e063fac55653..c5f59c2eb2c8 100644 --- a/x/auth/migrations/v046/store_test.go +++ b/x/auth/migrations/v046/store_test.go @@ -5,20 +5,20 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/testutil" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/auth" + authexported "github.com/cosmos/cosmos-sdk/x/auth/exported" "github.com/cosmos/cosmos-sdk/x/auth/keeper" - v2 "github.com/cosmos/cosmos-sdk/x/auth/migrations/v2" + v4 "github.com/cosmos/cosmos-sdk/x/auth/migrations/v4" authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - - sdk "github.com/cosmos/cosmos-sdk/types" - moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - authexported "github.com/cosmos/cosmos-sdk/x/auth/exported" - "github.com/stretchr/testify/require" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) type mockSubspace struct { @@ -38,14 +38,12 @@ func TestMigrateMapAccAddressToAccNumberKey(t *testing.T) { encCfg := moduletestutil.MakeTestEncodingConfig(auth.AppModuleBasic{}) cdc := encCfg.Codec - storeKey := sdk.NewKVStoreKey(v2.ModuleName) + storeKey := sdk.NewKVStoreKey(v4.ModuleName) tKey := sdk.NewTransientStoreKey("transient_test") ctx := testutil.DefaultContext(storeKey, tKey) store := ctx.KVStore(storeKey) - var ( - accountKeeper keeper.AccountKeeper - ) + var accountKeeper keeper.AccountKeeper app, err := simtestutil.Setup( authtestutil.AppConfig, @@ -54,7 +52,7 @@ func TestMigrateMapAccAddressToAccNumberKey(t *testing.T) { require.NoError(t, err) legacySubspace := newMockSubspace(authtypes.DefaultParams()) - require.NoError(t, v2.Migrate(ctx, store, legacySubspace, cdc)) + require.NoError(t, v4.Migrate(ctx, store, legacySubspace, cdc)) // new base account senderPrivKey := secp256k1.GenPrivKey() diff --git a/x/auth/migrations/v2/migrate.go b/x/auth/migrations/v4/migrate.go similarity index 94% rename from x/auth/migrations/v2/migrate.go rename to x/auth/migrations/v4/migrate.go index 7c5a2b2f38d0..3b0d0ce8cf3d 100644 --- a/x/auth/migrations/v2/migrate.go +++ b/x/auth/migrations/v4/migrate.go @@ -1,4 +1,4 @@ -package v2 +package v4 import ( "github.com/cosmos/cosmos-sdk/codec" @@ -11,9 +11,7 @@ const ( ModuleName = "auth" ) -var ( - ParamsKey = []byte{0x01} -) +var ParamsKey = []byte{0x01} // Migrate migrates the x/auth module state from the consensus version 3 to // version 4. Specifically, it takes the parameters that are currently stored @@ -31,5 +29,4 @@ func Migrate(ctx sdk.Context, store sdk.KVStore, legacySubspace exported.Subspac store.Set(ParamsKey, bz) return nil - } diff --git a/x/auth/migrations/v2/migrator_test.go b/x/auth/migrations/v4/migrator_test.go similarity index 82% rename from x/auth/migrations/v2/migrator_test.go rename to x/auth/migrations/v4/migrator_test.go index 76a5389e7e95..57a9245a819a 100644 --- a/x/auth/migrations/v2/migrator_test.go +++ b/x/auth/migrations/v4/migrator_test.go @@ -1,4 +1,4 @@ -package v2_test +package v4_test import ( "testing" @@ -7,11 +7,10 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" - moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/exported" - v2 "github.com/cosmos/cosmos-sdk/x/auth/migrations/v2" + v4 "github.com/cosmos/cosmos-sdk/x/auth/migrations/v4" "github.com/cosmos/cosmos-sdk/x/auth/types" ) @@ -31,16 +30,16 @@ func TestMigrate(t *testing.T) { encCfg := moduletestutil.MakeTestEncodingConfig(auth.AppModuleBasic{}) cdc := encCfg.Codec - storeKey := sdk.NewKVStoreKey(v2.ModuleName) + storeKey := sdk.NewKVStoreKey(v4.ModuleName) tKey := sdk.NewTransientStoreKey("transient_test") ctx := testutil.DefaultContext(storeKey, tKey) store := ctx.KVStore(storeKey) legacySubspace := newMockSubspace(types.DefaultParams()) - require.NoError(t, v2.Migrate(ctx, store, legacySubspace, cdc)) + require.NoError(t, v4.Migrate(ctx, store, legacySubspace, cdc)) var res types.Params - bz := store.Get(v2.ParamsKey) + bz := store.Get(v4.ParamsKey) require.NoError(t, cdc.Unmarshal(bz, &res)) require.Equal(t, legacySubspace.ps, res) } diff --git a/x/auth/module.go b/x/auth/module.go index c72e76848ea2..5eb6b0f9e308 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -6,21 +6,18 @@ import ( "fmt" "math/rand" + modulev1 "cosmossdk.io/api/cosmos/auth/module/v1" + "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" - gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - modulev1 "cosmossdk.io/api/cosmos/auth/module/v1" - "cosmossdk.io/core/appmodule" - "github.com/cosmos/cosmos-sdk/runtime" - store "github.com/cosmos/cosmos-sdk/store/types" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/runtime" + store "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" diff --git a/x/capability/keeper/keeper_test.go b/x/capability/keeper/keeper_test.go index 0d6a5f06552e..c859032013bc 100644 --- a/x/capability/keeper/keeper_test.go +++ b/x/capability/keeper/keeper_test.go @@ -5,15 +5,18 @@ import ( "testing" "github.com/stretchr/testify/suite" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/capability" "github.com/cosmos/cosmos-sdk/x/capability/keeper" - "github.com/cosmos/cosmos-sdk/x/capability/testutil" "github.com/cosmos/cosmos-sdk/x/capability/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +) + +var ( + stakingModuleName string = "staking" + bankModuleName string = "bank" ) type KeeperTestSuite struct { @@ -24,16 +27,15 @@ type KeeperTestSuite struct { } func (suite *KeeperTestSuite) SetupTest() { - app, err := simtestutil.Setup(testutil.AppConfig, - &suite.keeper, - ) - suite.Require().NoError(err) - - suite.ctx = app.BaseApp.NewContext(false, tmproto.Header{Height: 1}) + key := sdk.NewKVStoreKey(types.StoreKey) + testCtx := testutil.DefaultContextWithDB(suite.T(), key, sdk.NewTransientStoreKey("transient_test")) + suite.ctx = testCtx.Ctx + encCfg := moduletestutil.MakeTestEncodingConfig(capability.AppModuleBasic{}) + suite.keeper = keeper.NewKeeper(encCfg.Codec, key, key) } func (suite *KeeperTestSuite) TestSeal() { - sk := suite.keeper.ScopeToModule(banktypes.ModuleName) + sk := suite.keeper.ScopeToModule(bankModuleName) suite.Require().Panics(func() { suite.keeper.ScopeToModule(" ") }) @@ -67,12 +69,12 @@ func (suite *KeeperTestSuite) TestSeal() { }) suite.Require().Panics(func() { - _ = suite.keeper.ScopeToModule(stakingtypes.ModuleName) + _ = suite.keeper.ScopeToModule(stakingModuleName) }) } func (suite *KeeperTestSuite) TestNewCapability() { - sk := suite.keeper.ScopeToModule(banktypes.ModuleName) + sk := suite.keeper.ScopeToModule(bankModuleName) got, ok := sk.GetCapability(suite.ctx, "transfer") suite.Require().False(ok) @@ -111,8 +113,8 @@ func (suite *KeeperTestSuite) TestNewCapability() { } func (suite *KeeperTestSuite) TestAuthenticateCapability() { - sk1 := suite.keeper.ScopeToModule(banktypes.ModuleName) - sk2 := suite.keeper.ScopeToModule(stakingtypes.ModuleName) + sk1 := suite.keeper.ScopeToModule(bankModuleName) + sk2 := suite.keeper.ScopeToModule(stakingModuleName) cap1, err := sk1.NewCapability(suite.ctx, "transfer") suite.Require().NoError(err) @@ -150,8 +152,8 @@ func (suite *KeeperTestSuite) TestAuthenticateCapability() { } func (suite *KeeperTestSuite) TestClaimCapability() { - sk1 := suite.keeper.ScopeToModule(banktypes.ModuleName) - sk2 := suite.keeper.ScopeToModule(stakingtypes.ModuleName) + sk1 := suite.keeper.ScopeToModule(bankModuleName) + sk2 := suite.keeper.ScopeToModule(stakingModuleName) sk3 := suite.keeper.ScopeToModule("foo") cap, err := sk1.NewCapability(suite.ctx, "transfer") @@ -174,8 +176,8 @@ func (suite *KeeperTestSuite) TestClaimCapability() { } func (suite *KeeperTestSuite) TestGetOwners() { - sk1 := suite.keeper.ScopeToModule(banktypes.ModuleName) - sk2 := suite.keeper.ScopeToModule(stakingtypes.ModuleName) + sk1 := suite.keeper.ScopeToModule(bankModuleName) + sk2 := suite.keeper.ScopeToModule(stakingModuleName) sk3 := suite.keeper.ScopeToModule("foo") sks := []keeper.ScopedKeeper{sk1, sk2, sk3} @@ -187,7 +189,7 @@ func (suite *KeeperTestSuite) TestGetOwners() { suite.Require().NoError(sk2.ClaimCapability(suite.ctx, cap, "transfer")) suite.Require().NoError(sk3.ClaimCapability(suite.ctx, cap, "transfer")) - expectedOrder := []string{banktypes.ModuleName, "foo", stakingtypes.ModuleName} + expectedOrder := []string{bankModuleName, "foo", stakingModuleName} // Ensure all scoped keepers can get owners for _, sk := range sks { owners, ok := sk.GetOwners(suite.ctx, "transfer") @@ -214,7 +216,7 @@ func (suite *KeeperTestSuite) TestGetOwners() { suite.Require().Nil(err, "could not release capability") // new expected order and scoped capabilities - expectedOrder = []string{banktypes.ModuleName, stakingtypes.ModuleName} + expectedOrder = []string{bankModuleName, stakingModuleName} sks = []keeper.ScopedKeeper{sk1, sk2} // Ensure all scoped keepers can get owners @@ -242,8 +244,8 @@ func (suite *KeeperTestSuite) TestGetOwners() { } func (suite *KeeperTestSuite) TestReleaseCapability() { - sk1 := suite.keeper.ScopeToModule(banktypes.ModuleName) - sk2 := suite.keeper.ScopeToModule(stakingtypes.ModuleName) + sk1 := suite.keeper.ScopeToModule(bankModuleName) + sk2 := suite.keeper.ScopeToModule(stakingModuleName) cap1, err := sk1.NewCapability(suite.ctx, "transfer") suite.Require().NoError(err) @@ -271,7 +273,7 @@ func (suite *KeeperTestSuite) TestReleaseCapability() { } func (suite KeeperTestSuite) TestRevertCapability() { - sk := suite.keeper.ScopeToModule(banktypes.ModuleName) + sk := suite.keeper.ScopeToModule(bankModuleName) ms := suite.ctx.MultiStore() diff --git a/x/crisis/keeper/keeper.go b/x/crisis/keeper/keeper.go index c806e917134f..3c191e11c19d 100644 --- a/x/crisis/keeper/keeper.go +++ b/x/crisis/keeper/keeper.go @@ -37,7 +37,6 @@ func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, invCheckPeriod uint, supplyKeeper types.SupplyKeeper, feeCollectorName string, authority string, ) *Keeper { - return &Keeper{ storeKey: storeKey, cdc: cdc, diff --git a/x/crisis/keeper/keeper_test.go b/x/crisis/keeper/keeper_test.go index f710a166a35e..905cb99aee7b 100644 --- a/x/crisis/keeper/keeper_test.go +++ b/x/crisis/keeper/keeper_test.go @@ -3,48 +3,58 @@ package keeper_test import ( "testing" + "github.com/cosmos/cosmos-sdk/testutil" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" - abci "github.com/tendermint/tendermint/abci/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/crisis" + "github.com/cosmos/cosmos-sdk/x/crisis/keeper" + crisistestutil "github.com/cosmos/cosmos-sdk/x/crisis/testutil" "github.com/cosmos/cosmos-sdk/x/crisis/types" ) func TestLogger(t *testing.T) { - app := simapp.Setup(t, false) + ctrl := gomock.NewController(t) + supplyKeeper := crisistestutil.NewMockSupplyKeeper(ctrl) - ctx := app.NewContext(true, tmproto.Header{}) + key := sdk.NewKVStoreKey(types.StoreKey) + testCtx := testutil.DefaultContextWithDB(t, key, sdk.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(crisis.AppModuleBasic{}) + keeper := keeper.NewKeeper(encCfg.Codec, key, 5, supplyKeeper, "", "") require.Equal(t, - ctx.Logger().With("module", "x/"+types.ModuleName), - app.CrisisKeeper.Logger(ctx)) + testCtx.Ctx.Logger().With("module", "x/"+types.ModuleName), + keeper.Logger(testCtx.Ctx)) } func TestInvariants(t *testing.T) { - app := simapp.Setup(t, false) - app.Commit() - app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1}}) + ctrl := gomock.NewController(t) + supplyKeeper := crisistestutil.NewMockSupplyKeeper(ctrl) - require.Equal(t, app.CrisisKeeper.InvCheckPeriod(), uint(5)) + key := sdk.NewKVStoreKey(types.StoreKey) + encCfg := moduletestutil.MakeTestEncodingConfig(crisis.AppModuleBasic{}) + keeper := keeper.NewKeeper(encCfg.Codec, key, 5, supplyKeeper, "", "") + require.Equal(t, keeper.InvCheckPeriod(), uint(5)) - // SimApp has 11 registered invariants - orgInvRoutes := app.CrisisKeeper.Routes() - app.CrisisKeeper.RegisterRoute("testModule", "testRoute", func(sdk.Context) (string, bool) { return "", false }) - require.Equal(t, len(app.CrisisKeeper.Routes()), len(orgInvRoutes)+1) + orgInvRoutes := keeper.Routes() + keeper.RegisterRoute("testModule", "testRoute", func(sdk.Context) (string, bool) { return "", false }) + require.Equal(t, len(keeper.Routes()), len(orgInvRoutes)+1) } func TestAssertInvariants(t *testing.T) { - app := simapp.Setup(t, false) - app.Commit() - app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1}}) + ctrl := gomock.NewController(t) + supplyKeeper := crisistestutil.NewMockSupplyKeeper(ctrl) - ctx := app.NewContext(true, tmproto.Header{}) + key := sdk.NewKVStoreKey(types.StoreKey) + testCtx := testutil.DefaultContextWithDB(t, key, sdk.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(crisis.AppModuleBasic{}) + keeper := keeper.NewKeeper(encCfg.Codec, key, 5, supplyKeeper, "", "") - app.CrisisKeeper.RegisterRoute("testModule", "testRoute1", func(sdk.Context) (string, bool) { return "", false }) - require.NotPanics(t, func() { app.CrisisKeeper.AssertInvariants(ctx) }) + keeper.RegisterRoute("testModule", "testRoute1", func(sdk.Context) (string, bool) { return "", false }) + require.NotPanics(t, func() { keeper.AssertInvariants(testCtx.Ctx) }) - app.CrisisKeeper.RegisterRoute("testModule", "testRoute2", func(sdk.Context) (string, bool) { return "", true }) - require.Panics(t, func() { app.CrisisKeeper.AssertInvariants(ctx) }) + keeper.RegisterRoute("testModule", "testRoute2", func(sdk.Context) (string, bool) { return "", true }) + require.Panics(t, func() { keeper.AssertInvariants(testCtx.Ctx) }) } diff --git a/x/crisis/keeper/migrator.go b/x/crisis/keeper/migrator.go index 6094e0dbb3d8..53b68fb17f5e 100644 --- a/x/crisis/keeper/migrator.go +++ b/x/crisis/keeper/migrator.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/crisis/exported" - v046 "github.com/cosmos/cosmos-sdk/x/crisis/migrations/v046" + v2 "github.com/cosmos/cosmos-sdk/x/crisis/migrations/v2" ) // Migrator is a struct for handling in-place state migrations. @@ -24,5 +24,5 @@ func NewMigrator(k *Keeper, ss exported.Subspace) Migrator { // and managed by the x/params modules and stores them directly into the x/mint // module state. func (m Migrator) Migrate1to2(ctx sdk.Context) error { - return v046.MigrateStore(ctx, m.keeper.storeKey, m.legacySubspace, m.keeper.cdc) + return v2.MigrateStore(ctx, m.keeper.storeKey, m.legacySubspace, m.keeper.cdc) } diff --git a/x/crisis/keeper/msg_server_test.go b/x/crisis/keeper/msg_server_test.go index 6d4ba8e546f1..2c2ac3ebebbd 100644 --- a/x/crisis/keeper/msg_server_test.go +++ b/x/crisis/keeper/msg_server_test.go @@ -3,13 +3,15 @@ package keeper_test import ( "testing" - "github.com/cosmos/cosmos-sdk/simapp" + "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/crisis" "github.com/cosmos/cosmos-sdk/x/crisis/keeper" + crisistestutil "github.com/cosmos/cosmos-sdk/x/crisis/testutil" "github.com/cosmos/cosmos-sdk/x/crisis/types" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" - abci "github.com/tendermint/tendermint/abci/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) type KeeperTestSuite struct { @@ -20,13 +22,16 @@ type KeeperTestSuite struct { } func (s *KeeperTestSuite) SetupTest() { - app := simapp.Setup(s.T(), false) - app.Commit() - app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1}}) - ctx := app.NewContext(true, tmproto.Header{}) + ctrl := gomock.NewController(s.T()) + supplyKeeper := crisistestutil.NewMockSupplyKeeper(ctrl) - s.ctx = ctx - s.keeper = app.CrisisKeeper + key := sdk.NewKVStoreKey(types.StoreKey) + testCtx := testutil.DefaultContextWithDB(s.T(), key, sdk.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(crisis.AppModuleBasic{}) + keeper := keeper.NewKeeper(encCfg.Codec, key, 5, supplyKeeper, "", "") + + s.ctx = testCtx.Ctx + s.keeper = keeper } func (s *KeeperTestSuite) TestMsgUpdateParams() { diff --git a/x/crisis/migrations/v046/migrate.go b/x/crisis/migrations/v2/migrate.go similarity index 98% rename from x/crisis/migrations/v046/migrate.go rename to x/crisis/migrations/v2/migrate.go index 333b4be89403..e019e1eb4dca 100644 --- a/x/crisis/migrations/v046/migrate.go +++ b/x/crisis/migrations/v2/migrate.go @@ -1,4 +1,4 @@ -package v046 +package v2 import ( "github.com/cosmos/cosmos-sdk/codec" diff --git a/x/crisis/migrations/v046/migrate_test.go b/x/crisis/migrations/v2/migrate_test.go similarity index 81% rename from x/crisis/migrations/v046/migrate_test.go rename to x/crisis/migrations/v2/migrate_test.go index ae283a688f85..4239b675d0ae 100644 --- a/x/crisis/migrations/v046/migrate_test.go +++ b/x/crisis/migrations/v2/migrate_test.go @@ -1,15 +1,16 @@ -package v046_test +package v2_test import ( "testing" + "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - v046 "github.com/cosmos/cosmos-sdk/x/crisis/migrations/v046" + v2 "github.com/cosmos/cosmos-sdk/x/crisis/migrations/v2" "github.com/cosmos/cosmos-sdk/x/crisis/types" "github.com/cosmos/cosmos-sdk/x/distribution" - "github.com/stretchr/testify/require" ) type mockSubspace struct { @@ -28,16 +29,16 @@ func TestMigrate(t *testing.T) { encCfg := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}) cdc := encCfg.Codec - storeKey := sdk.NewKVStoreKey(v046.ModuleName) + storeKey := sdk.NewKVStoreKey(v2.ModuleName) tKey := sdk.NewTransientStoreKey("transient_test") ctx := testutil.DefaultContext(storeKey, tKey) store := ctx.KVStore(storeKey) legacySubspace := newMockSubspace(types.DefaultGenesisState().ConstantFee) - require.NoError(t, v046.MigrateStore(ctx, storeKey, legacySubspace, cdc)) + require.NoError(t, v2.MigrateStore(ctx, storeKey, legacySubspace, cdc)) var res sdk.Coin - bz := store.Get(v046.ConstantFeeKey) + bz := store.Get(v2.ConstantFeeKey) require.NoError(t, cdc.Unmarshal(bz, &res)) require.NotNil(t, res) require.Equal(t, legacySubspace.constantFee, res) diff --git a/x/crisis/module.go b/x/crisis/module.go index 424fcaec3790..ca66890b9c5f 100644 --- a/x/crisis/module.go +++ b/x/crisis/module.go @@ -5,14 +5,14 @@ import ( "fmt" "time" + modulev1 "cosmossdk.io/api/cosmos/crisis/module/v1" "cosmossdk.io/core/appmodule" + "cosmossdk.io/depinject" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cast" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - modulev1 "cosmossdk.io/api/cosmos/crisis/module/v1" - "cosmossdk.io/depinject" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/crisis/testutil/expected_keepers_mocks.go b/x/crisis/testutil/expected_keepers_mocks.go new file mode 100644 index 000000000000..152ee6dce37d --- /dev/null +++ b/x/crisis/testutil/expected_keepers_mocks.go @@ -0,0 +1,49 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: x/crisis/types/expected_keepers.go + +// Package testutil is a generated GoMock package. +package testutil + +import ( + reflect "reflect" + + types "github.com/cosmos/cosmos-sdk/types" + gomock "github.com/golang/mock/gomock" +) + +// MockSupplyKeeper is a mock of SupplyKeeper interface. +type MockSupplyKeeper struct { + ctrl *gomock.Controller + recorder *MockSupplyKeeperMockRecorder +} + +// MockSupplyKeeperMockRecorder is the mock recorder for MockSupplyKeeper. +type MockSupplyKeeperMockRecorder struct { + mock *MockSupplyKeeper +} + +// NewMockSupplyKeeper creates a new mock instance. +func NewMockSupplyKeeper(ctrl *gomock.Controller) *MockSupplyKeeper { + mock := &MockSupplyKeeper{ctrl: ctrl} + mock.recorder = &MockSupplyKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockSupplyKeeper) EXPECT() *MockSupplyKeeperMockRecorder { + return m.recorder +} + +// SendCoinsFromAccountToModule mocks base method. +func (m *MockSupplyKeeper) SendCoinsFromAccountToModule(ctx types.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SendCoinsFromAccountToModule", ctx, senderAddr, recipientModule, amt) + ret0, _ := ret[0].(error) + return ret0 +} + +// SendCoinsFromAccountToModule indicates an expected call of SendCoinsFromAccountToModule. +func (mr *MockSupplyKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromAccountToModule", reflect.TypeOf((*MockSupplyKeeper)(nil).SendCoinsFromAccountToModule), ctx, senderAddr, recipientModule, amt) +} diff --git a/x/crisis/types/keys.go b/x/crisis/types/keys.go index 9cc09faf5808..fb936e6665de 100644 --- a/x/crisis/types/keys.go +++ b/x/crisis/types/keys.go @@ -7,6 +7,4 @@ const ( StoreKey = ModuleName ) -var ( - ConstantFeeKey = []byte{0x01} -) +var ConstantFeeKey = []byte{0x01} diff --git a/x/distribution/keeper/migrations.go b/x/distribution/keeper/migrations.go index cc928e3f79b6..1ea8c0f16088 100644 --- a/x/distribution/keeper/migrations.go +++ b/x/distribution/keeper/migrations.go @@ -4,7 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/distribution/exported" v043 "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v043" - v046 "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v046" + v3 "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v3" ) // Migrator is a struct for handling in-place store migrations. @@ -28,5 +28,5 @@ func (m Migrator) Migrate1to2(ctx sdk.Context) error { // and managed by the x/params module and stores them directly into the x/distribution // module state. func (m Migrator) Migrate2to3(ctx sdk.Context) error { - return v046.MigrateStore(ctx, m.keeper.storeKey, m.legacySubspace, m.keeper.cdc) + return v3.MigrateStore(ctx, m.keeper.storeKey, m.legacySubspace, m.keeper.cdc) } diff --git a/x/distribution/migrations/v046/migrate.go b/x/distribution/migrations/v3/migrate.go similarity index 95% rename from x/distribution/migrations/v046/migrate.go rename to x/distribution/migrations/v3/migrate.go index 0a4c99a111f1..d5e2f4086a07 100644 --- a/x/distribution/migrations/v046/migrate.go +++ b/x/distribution/migrations/v3/migrate.go @@ -1,4 +1,4 @@ -package v046 +package v3 import ( "github.com/cosmos/cosmos-sdk/codec" @@ -12,9 +12,7 @@ const ( ModuleName = "distribution" ) -var ( - ParamsKey = []byte{0x09} -) +var ParamsKey = []byte{0x09} // MigrateStore migrates the x/distribution module state from the consensus version 2 to // version 3. Specifically, it takes the parameters that are currently stored diff --git a/x/distribution/migrations/v046/migrate_test.go b/x/distribution/migrations/v3/migrate_test.go similarity index 81% rename from x/distribution/migrations/v046/migrate_test.go rename to x/distribution/migrations/v3/migrate_test.go index 56bf5df0447b..b0de4b46051a 100644 --- a/x/distribution/migrations/v046/migrate_test.go +++ b/x/distribution/migrations/v3/migrate_test.go @@ -1,16 +1,17 @@ -package v046_test +package v3_test import ( "testing" + "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/distribution" "github.com/cosmos/cosmos-sdk/x/distribution/exported" - v046 "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v046" + v3 "github.com/cosmos/cosmos-sdk/x/distribution/migrations/v3" "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/stretchr/testify/require" ) type mockSubspace struct { @@ -29,16 +30,16 @@ func TestMigrate(t *testing.T) { encCfg := moduletestutil.MakeTestEncodingConfig(distribution.AppModuleBasic{}) cdc := encCfg.Codec - storeKey := sdk.NewKVStoreKey(v046.ModuleName) + storeKey := sdk.NewKVStoreKey(v3.ModuleName) tKey := sdk.NewTransientStoreKey("transient_test") ctx := testutil.DefaultContext(storeKey, tKey) store := ctx.KVStore(storeKey) legacySubspace := newMockSubspace(types.DefaultParams()) - require.NoError(t, v046.MigrateStore(ctx, storeKey, legacySubspace, cdc)) + require.NoError(t, v3.MigrateStore(ctx, storeKey, legacySubspace, cdc)) var res types.Params - bz := store.Get(v046.ParamsKey) + bz := store.Get(v3.ParamsKey) require.NoError(t, cdc.Unmarshal(bz, &res)) require.Equal(t, legacySubspace.ps, res) } diff --git a/x/distribution/module.go b/x/distribution/module.go index 7366ce1d1adb..2d1f16c0a31b 100644 --- a/x/distribution/module.go +++ b/x/distribution/module.go @@ -6,13 +6,13 @@ import ( "fmt" "math/rand" + modulev1 "cosmossdk.io/api/cosmos/distribution/module/v1" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/depinject" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - modulev1 "cosmossdk.io/api/cosmos/distribution/module/v1" - "cosmossdk.io/core/appmodule" - "cosmossdk.io/depinject" sdkclient "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/feegrant/basic_fee_test.go b/x/feegrant/basic_fee_test.go index d2795e82b70e..a6c66c8ae982 100644 --- a/x/feegrant/basic_fee_test.go +++ b/x/feegrant/basic_fee_test.go @@ -8,33 +8,16 @@ import ( "github.com/stretchr/testify/require" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" "github.com/cosmos/cosmos-sdk/x/feegrant" - "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" - "github.com/cosmos/cosmos-sdk/x/feegrant/testutil" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" ) func TestBasicFeeValidAllow(t *testing.T) { - var ( - interfaceRegistry codectypes.InterfaceRegistry - bankKeeper bankkeeper.Keeper - stakingKeeper *stakingkeeper.Keeper - feegrantKeeper keeper.Keeper - ) + key := sdk.NewKVStoreKey(feegrant.StoreKey) + testCtx := testutil.DefaultContextWithDB(t, key, sdk.NewTransientStoreKey("transient_test")) - app, err := simtestutil.Setup(testutil.AppConfig, - &feegrantKeeper, - &bankKeeper, - &stakingKeeper, - &interfaceRegistry, - ) - require.NoError(t, err) - - ctx := app.BaseApp.NewContext(false, tmproto.Header{Height: 1}) + ctx := testCtx.Ctx.WithBlockHeader(tmproto.Header{Height: 1}) badTime := ctx.BlockTime().AddDate(0, 0, -1) allowace := &feegrant.BasicAllowance{ @@ -42,7 +25,7 @@ func TestBasicFeeValidAllow(t *testing.T) { } require.Error(t, allowace.ValidateBasic()) - ctx = app.BaseApp.NewContext(false, tmproto.Header{ + ctx = ctx.WithBlockHeader(tmproto.Header{ Time: time.Now(), }) eth := sdk.NewCoins(sdk.NewInt64Coin("eth", 10)) @@ -150,7 +133,7 @@ func TestBasicFeeValidAllow(t *testing.T) { err := tc.allowance.ValidateBasic() require.NoError(t, err) - ctx := app.BaseApp.NewContext(false, tmproto.Header{}).WithBlockTime(tc.blockTime) + ctx := testCtx.Ctx.WithBlockTime(tc.blockTime) // now try to deduct removed, err := tc.allowance.Accept(ctx, tc.fee, []sdk.Msg{}) diff --git a/x/feegrant/filtered_fee_test.go b/x/feegrant/filtered_fee_test.go index 4bda42a5b2cf..0f33cb2fd8cf 100644 --- a/x/feegrant/filtered_fee_test.go +++ b/x/feegrant/filtered_fee_test.go @@ -8,37 +8,20 @@ import ( "github.com/stretchr/testify/require" ocproto "github.com/tendermint/tendermint/proto/tendermint/types" - "cosmossdk.io/depinject" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/feegrant" - "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" - "github.com/cosmos/cosmos-sdk/x/feegrant/testutil" - feegranttestutil "github.com/cosmos/cosmos-sdk/x/feegrant/testutil" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + "github.com/cosmos/cosmos-sdk/x/feegrant/module" ) func TestFilteredFeeValidAllow(t *testing.T) { - var ( - interfaceRegistry codectypes.InterfaceRegistry - bankKeeper bankkeeper.Keeper - stakingKeeper *stakingkeeper.Keeper - feegrantKeeper keeper.Keeper - ) - - app, err := simtestutil.Setup(testutil.AppConfig, - &feegrantKeeper, - &bankKeeper, - &stakingKeeper, - &interfaceRegistry, - ) - require.NoError(t, err) - - ctx := app.BaseApp.NewContext(false, ocproto.Header{Time: time.Now()}) + key := sdk.NewKVStoreKey(feegrant.StoreKey) + testCtx := testutil.DefaultContextWithDB(t, key, sdk.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(module.AppModuleBasic{}) + + ctx := testCtx.Ctx.WithBlockHeader(ocproto.Header{Time: time.Now()}) eth := sdk.NewCoins(sdk.NewInt64Coin("eth", 10)) atom := sdk.NewCoins(sdk.NewInt64Coin("atom", 555)) @@ -155,7 +138,7 @@ func TestFilteredFeeValidAllow(t *testing.T) { err := tc.allowance.ValidateBasic() require.NoError(t, err) - ctx := app.BaseApp.NewContext(false, ocproto.Header{}).WithBlockTime(tc.blockTime) + ctx := testCtx.Ctx.WithBlockTime(tc.blockTime) // create grant var granter, grantee sdk.AccAddress @@ -187,14 +170,12 @@ func TestFilteredFeeValidAllow(t *testing.T) { require.NoError(t, err) // save the grant - var cdc codec.Codec - depinject.Inject(feegranttestutil.AppConfig, &cdc) - bz, err := cdc.Marshal(&newGrant) + bz, err := encCfg.Codec.Marshal(&newGrant) require.NoError(t, err) // load the grant var loadedGrant feegrant.Grant - err = cdc.Unmarshal(bz, &loadedGrant) + err = encCfg.Codec.Unmarshal(bz, &loadedGrant) require.NoError(t, err) newAllowance, err := loadedGrant.GetGrant() diff --git a/x/feegrant/grant_test.go b/x/feegrant/grant_test.go index b96e76644600..2d945c6bb73a 100644 --- a/x/feegrant/grant_test.go +++ b/x/feegrant/grant_test.go @@ -7,36 +7,19 @@ import ( "github.com/stretchr/testify/require" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/feegrant" - "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" - "github.com/cosmos/cosmos-sdk/x/feegrant/testutil" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + "github.com/cosmos/cosmos-sdk/x/feegrant/module" ) func TestGrant(t *testing.T) { - var ( - interfaceRegistry codectypes.InterfaceRegistry - bankKeeper bankkeeper.Keeper - stakingKeeper *stakingkeeper.Keeper - feegrantKeeper keeper.Keeper - cdc codec.Codec - ) + key := sdk.NewKVStoreKey(feegrant.StoreKey) + testCtx := testutil.DefaultContextWithDB(t, key, sdk.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(module.AppModuleBasic{}) - app, err := simtestutil.Setup(testutil.AppConfig, - &feegrantKeeper, - &bankKeeper, - &stakingKeeper, - &interfaceRegistry, - &cdc, - ) - require.NoError(t, err) - - ctx := app.BaseApp.NewContext(false, tmproto.Header{Time: time.Now()}) + ctx := testCtx.Ctx.WithBlockHeader(tmproto.Header{Time: time.Now()}) addr, err := sdk.AccAddressFromBech32("cosmos1qk93t4j0yyzgqgt6k5qf8deh8fq6smpn3ntu3x") require.NoError(t, err) @@ -109,10 +92,10 @@ func TestGrant(t *testing.T) { require.NoError(t, err) // if it is valid, let's try to serialize, deserialize, and make sure it matches - bz, err := cdc.Marshal(&grant) + bz, err := encCfg.Codec.Marshal(&grant) require.NoError(t, err) var loaded feegrant.Grant - err = cdc.Unmarshal(bz, &loaded) + err = encCfg.Codec.Unmarshal(bz, &loaded) require.NoError(t, err) err = loaded.ValidateBasic() diff --git a/x/feegrant/keeper/genesis_test.go b/x/feegrant/keeper/genesis_test.go index b7a17ade4309..8db78b5f7c65 100644 --- a/x/feegrant/keeper/genesis_test.go +++ b/x/feegrant/keeper/genesis_test.go @@ -3,20 +3,20 @@ package keeper_test import ( "testing" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/feegrant" "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" - "github.com/cosmos/cosmos-sdk/x/feegrant/testutil" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + "github.com/cosmos/cosmos-sdk/x/feegrant/module" + feegranttestutil "github.com/cosmos/cosmos-sdk/x/feegrant/testutil" ) type GenesisTestSuite struct { @@ -26,24 +26,17 @@ type GenesisTestSuite struct { } func (suite *GenesisTestSuite) SetupTest() { - checkTx := false - - var ( - interfaceRegistry codectypes.InterfaceRegistry - bankKeeper bankkeeper.Keeper - stakingKeeper *stakingkeeper.Keeper - cdc codec.Codec - ) - - app, err := simtestutil.Setup(testutil.AppConfig, - &suite.feegrantKeeper, - &bankKeeper, - &stakingKeeper, - &interfaceRegistry, - &cdc, - ) - suite.Require().NoError(err) - suite.ctx = app.BaseApp.NewContext(checkTx, tmproto.Header{Height: 1}) + key := sdk.NewKVStoreKey(feegrant.StoreKey) + testCtx := testutil.DefaultContextWithDB(suite.T(), key, sdk.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(module.AppModuleBasic{}) + + ctrl := gomock.NewController(suite.T()) + accountKeeper := feegranttestutil.NewMockAccountKeeper(ctrl) + accountKeeper.EXPECT().GetAccount(gomock.Any(), granteeAddr).Return(authtypes.NewBaseAccountWithAddress(granteeAddr)).AnyTimes() + + suite.feegrantKeeper = keeper.NewKeeper(encCfg.Codec, key, accountKeeper) + + suite.ctx = testCtx.Ctx } var ( diff --git a/x/feegrant/keeper/keeper.go b/x/feegrant/keeper/keeper.go index 3f198edd8a7b..302e5f1cd243 100644 --- a/x/feegrant/keeper/keeper.go +++ b/x/feegrant/keeper/keeper.go @@ -112,7 +112,6 @@ func (k Keeper) GrantAllowance(ctx sdk.Context, granter, grantee sdk.AccAddress, } store.Set(key, bz) - ctx.EventManager().EmitEvent( sdk.NewEvent( feegrant.EventTypeSetFeeGrant, @@ -222,7 +221,6 @@ func (k Keeper) IterateAllFeeAllowances(ctx sdk.Context, cb func(grant feegrant. if err := k.cdc.Unmarshal(bz, &feeGrant); err != nil { return err } - stop = cb(feeGrant) } diff --git a/x/feegrant/keeper/keeper_test.go b/x/feegrant/keeper/keeper_test.go index b1f4f478e710..16d10a532cd6 100644 --- a/x/feegrant/keeper/keeper_test.go +++ b/x/feegrant/keeper/keeper_test.go @@ -3,30 +3,29 @@ package keeper_test import ( "testing" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/testutil" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/feegrant" "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" - "github.com/cosmos/cosmos-sdk/x/feegrant/testutil" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + "github.com/cosmos/cosmos-sdk/x/feegrant/module" + feegranttestutil "github.com/cosmos/cosmos-sdk/x/feegrant/testutil" ) type KeeperTestSuite struct { suite.Suite - ctx sdk.Context - addrs []sdk.AccAddress - msgSrvr feegrant.MsgServer - atom sdk.Coins - feegrantKeeper keeper.Keeper - interfaceRegistry codectypes.InterfaceRegistry - bankKeeper bankkeeper.Keeper - stakingKeeper *stakingkeeper.Keeper + ctx sdk.Context + addrs []sdk.AccAddress + msgSrvr feegrant.MsgServer + atom sdk.Coins + feegrantKeeper keeper.Keeper + accountKeeper *feegranttestutil.MockAccountKeeper } func TestKeeperTestSuite(t *testing.T) { @@ -34,16 +33,21 @@ func TestKeeperTestSuite(t *testing.T) { } func (suite *KeeperTestSuite) SetupTest() { - app, err := simtestutil.Setup(testutil.AppConfig, - &suite.feegrantKeeper, - &suite.bankKeeper, - &suite.stakingKeeper, - &suite.interfaceRegistry, - ) - suite.Require().NoError(err) - - suite.ctx = app.BaseApp.NewContext(false, tmproto.Header{Height: 1}) - suite.addrs = simtestutil.AddTestAddrsIncremental(suite.bankKeeper, suite.stakingKeeper, suite.ctx, 4, sdk.NewInt(30000000)) + suite.addrs = simtestutil.CreateIncrementalAccounts(4) + key := sdk.NewKVStoreKey(feegrant.StoreKey) + testCtx := testutil.DefaultContextWithDB(suite.T(), key, sdk.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(module.AppModuleBasic{}) + + // setup gomock and initialize some globally expected executions + ctrl := gomock.NewController(suite.T()) + suite.accountKeeper = feegranttestutil.NewMockAccountKeeper(ctrl) + suite.accountKeeper.EXPECT().GetAccount(gomock.Any(), suite.addrs[0]).Return(authtypes.NewBaseAccountWithAddress(suite.addrs[0])).AnyTimes() + suite.accountKeeper.EXPECT().GetAccount(gomock.Any(), suite.addrs[1]).Return(authtypes.NewBaseAccountWithAddress(suite.addrs[1])).AnyTimes() + suite.accountKeeper.EXPECT().GetAccount(gomock.Any(), suite.addrs[2]).Return(authtypes.NewBaseAccountWithAddress(suite.addrs[2])).AnyTimes() + suite.accountKeeper.EXPECT().GetAccount(gomock.Any(), suite.addrs[3]).Return(authtypes.NewBaseAccountWithAddress(suite.addrs[3])).AnyTimes() + + suite.feegrantKeeper = keeper.NewKeeper(encCfg.Codec, key, suite.accountKeeper) + suite.ctx = testCtx.Ctx suite.msgSrvr = keeper.NewMsgServerImpl(suite.feegrantKeeper) suite.atom = sdk.NewCoins(sdk.NewCoin("atom", sdk.NewInt(555))) } @@ -146,6 +150,7 @@ func (suite *KeeperTestSuite) TestKeeperCrud() { } accAddr, err := sdk.AccAddressFromBech32("cosmos1rxr4mq58w3gtnx5tsc438mwjjafv3mja7k5pnu") suite.Require().NoError(err) + suite.accountKeeper.EXPECT().GetAccount(gomock.Any(), accAddr).Return(authtypes.NewBaseAccountWithAddress(accAddr)).AnyTimes() // let's grant and revoke authorization to non existing account err = suite.feegrantKeeper.GrantAllowance(suite.ctx, suite.addrs[3], accAddr, basic2) diff --git a/x/feegrant/module/abci_test.go b/x/feegrant/module/abci_test.go index db094a30bd28..30a0a4cc3918 100644 --- a/x/feegrant/module/abci_test.go +++ b/x/feegrant/module/abci_test.go @@ -4,51 +4,44 @@ import ( "testing" "github.com/cosmos/cosmos-sdk/baseapp" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/testutil" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/feegrant" "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" "github.com/cosmos/cosmos-sdk/x/feegrant/module" - "github.com/cosmos/cosmos-sdk/x/feegrant/testutil" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + feegranttestutil "github.com/cosmos/cosmos-sdk/x/feegrant/testutil" + "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" - abci "github.com/tendermint/tendermint/abci/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) func TestFeegrantPruning(t *testing.T) { - var ( - interfaceRegistry codectypes.InterfaceRegistry - bankKeeper bankkeeper.Keeper - stakingKeeper *stakingkeeper.Keeper - feegrantKeeper keeper.Keeper - ) + key := sdk.NewKVStoreKey(feegrant.StoreKey) + testCtx := testutil.DefaultContextWithDB(t, key, sdk.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(module.AppModuleBasic{}) - app, err := simtestutil.Setup(testutil.AppConfig, - &feegrantKeeper, - &bankKeeper, - &stakingKeeper, - &interfaceRegistry, - ) - require.NoError(t, err) - - ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - addrs := simtestutil.AddTestAddrsIncremental(bankKeeper, stakingKeeper, ctx, 4, sdk.NewInt(1000)) + addrs := simtestutil.CreateIncrementalAccounts(4) granter1 := addrs[0] granter2 := addrs[1] granter3 := addrs[2] grantee := addrs[3] spendLimit := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(1000))) - now := ctx.BlockTime() + now := testCtx.Ctx.BlockTime() oneDay := now.AddDate(0, 0, 1) - header := tmproto.Header{Height: app.LastBlockHeight() + 1} - app.BeginBlock(abci.RequestBeginBlock{Header: header}) + ctrl := gomock.NewController(t) + accountKeeper := feegranttestutil.NewMockAccountKeeper(ctrl) + accountKeeper.EXPECT().GetAccount(gomock.Any(), grantee).Return(authtypes.NewBaseAccountWithAddress(grantee)).AnyTimes() + accountKeeper.EXPECT().GetAccount(gomock.Any(), granter1).Return(authtypes.NewBaseAccountWithAddress(granter1)).AnyTimes() + accountKeeper.EXPECT().GetAccount(gomock.Any(), granter2).Return(authtypes.NewBaseAccountWithAddress(granter2)).AnyTimes() + accountKeeper.EXPECT().GetAccount(gomock.Any(), granter3).Return(authtypes.NewBaseAccountWithAddress(granter3)).AnyTimes() + + feegrantKeeper := keeper.NewKeeper(encCfg.Codec, key, accountKeeper) feegrantKeeper.GrantAllowance( - ctx, + testCtx.Ctx, granter1, grantee, &feegrant.BasicAllowance{ @@ -56,7 +49,7 @@ func TestFeegrantPruning(t *testing.T) { }, ) feegrantKeeper.GrantAllowance( - ctx, + testCtx.Ctx, granter2, grantee, &feegrant.BasicAllowance{ @@ -64,7 +57,7 @@ func TestFeegrantPruning(t *testing.T) { }, ) feegrantKeeper.GrantAllowance( - ctx, + testCtx.Ctx, granter3, grantee, &feegrant.BasicAllowance{ @@ -72,23 +65,23 @@ func TestFeegrantPruning(t *testing.T) { }, ) - queryHelper := baseapp.NewQueryServerTestHelper(ctx, interfaceRegistry) + queryHelper := baseapp.NewQueryServerTestHelper(testCtx.Ctx, encCfg.InterfaceRegistry) feegrant.RegisterQueryServer(queryHelper, feegrantKeeper) queryClient := feegrant.NewQueryClient(queryHelper) - module.EndBlocker(ctx, feegrantKeeper) + module.EndBlocker(testCtx.Ctx, feegrantKeeper) - res, err := queryClient.Allowances(ctx.Context(), &feegrant.QueryAllowancesRequest{ + res, err := queryClient.Allowances(testCtx.Ctx.Context(), &feegrant.QueryAllowancesRequest{ Grantee: grantee.String(), }) require.NoError(t, err) require.NotNil(t, res) require.Len(t, res.Allowances, 3) - ctx = ctx.WithBlockTime(now.AddDate(0, 0, 2)) - module.EndBlocker(ctx, feegrantKeeper) + testCtx.Ctx = testCtx.Ctx.WithBlockTime(now.AddDate(0, 0, 2)) + module.EndBlocker(testCtx.Ctx, feegrantKeeper) - res, err = queryClient.Allowances(ctx.Context(), &feegrant.QueryAllowancesRequest{ + res, err = queryClient.Allowances(testCtx.Ctx.Context(), &feegrant.QueryAllowancesRequest{ Grantee: grantee.String(), }) require.NoError(t, err) diff --git a/x/feegrant/periodic_fee_test.go b/x/feegrant/periodic_fee_test.go index d8b6052f023e..1ac45b312a6c 100644 --- a/x/feegrant/periodic_fee_test.go +++ b/x/feegrant/periodic_fee_test.go @@ -8,36 +8,16 @@ import ( "github.com/stretchr/testify/require" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" "github.com/cosmos/cosmos-sdk/x/feegrant" - "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" - "github.com/cosmos/cosmos-sdk/x/feegrant/testutil" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" ) func TestPeriodicFeeValidAllow(t *testing.T) { - var ( - interfaceRegistry codectypes.InterfaceRegistry - bankKeeper bankkeeper.Keeper - stakingKeeper *stakingkeeper.Keeper - feegrantKeeper keeper.Keeper - cdc codec.Codec - ) + key := sdk.NewKVStoreKey(feegrant.StoreKey) + testCtx := testutil.DefaultContextWithDB(t, key, sdk.NewTransientStoreKey("transient_test")) - app, err := simtestutil.Setup(testutil.AppConfig, - &feegrantKeeper, - &bankKeeper, - &stakingKeeper, - &interfaceRegistry, - &cdc, - ) - require.NoError(t, err) - - ctx := app.BaseApp.NewContext(false, tmproto.Header{Time: time.Now()}) + ctx := testCtx.Ctx.WithBlockHeader(tmproto.Header{Time: time.Now()}) atom := sdk.NewCoins(sdk.NewInt64Coin("atom", 555)) smallAtom := sdk.NewCoins(sdk.NewInt64Coin("atom", 43)) @@ -212,7 +192,7 @@ func TestPeriodicFeeValidAllow(t *testing.T) { } require.NoError(t, err) - ctx := app.BaseApp.NewContext(false, tmproto.Header{}).WithBlockTime(tc.blockTime) + ctx := testCtx.Ctx.WithBlockTime(tc.blockTime) // now try to deduct remove, err := tc.allow.Accept(ctx, tc.fee, []sdk.Msg{}) if !tc.accept { diff --git a/x/feegrant/simulation/decoder_test.go b/x/feegrant/simulation/decoder_test.go index 4652dd11461c..055b99db8670 100644 --- a/x/feegrant/simulation/decoder_test.go +++ b/x/feegrant/simulation/decoder_test.go @@ -19,7 +19,6 @@ import ( var ( granterPk = ed25519.GenPrivKey().PubKey() granterAddr = sdk.AccAddress(granterPk.Address()) - granteePk = ed25519.GenPrivKey().PubKey() granteeAddr = sdk.AccAddress(granterPk.Address()) ) diff --git a/x/feegrant/simulation/genesis_test.go b/x/feegrant/simulation/genesis_test.go index 39f22909e964..f15d1dd4b91f 100644 --- a/x/feegrant/simulation/genesis_test.go +++ b/x/feegrant/simulation/genesis_test.go @@ -8,34 +8,24 @@ import ( "github.com/stretchr/testify/require" sdkmath "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/codec" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - "github.com/cosmos/cosmos-sdk/types/module" + moduletypes "github.com/cosmos/cosmos-sdk/types/module" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/feegrant" - "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" + "github.com/cosmos/cosmos-sdk/x/feegrant/module" "github.com/cosmos/cosmos-sdk/x/feegrant/simulation" - "github.com/cosmos/cosmos-sdk/x/feegrant/testutil" ) func TestRandomizedGenState(t *testing.T) { - var feegrantKeeper keeper.Keeper - var cdc codec.Codec - - _, err := simtestutil.Setup(testutil.AppConfig, - &feegrantKeeper, - &cdc, - ) - require.NoError(t, err) - + encCfg := moduletestutil.MakeTestEncodingConfig(module.AppModuleBasic{}) s := rand.NewSource(1) r := rand.New(s) accounts := simtypes.RandomAccounts(r, 3) - simState := module.SimulationState{ + simState := moduletypes.SimulationState{ AppParams: make(simtypes.AppParams), - Cdc: cdc, + Cdc: encCfg.Codec, Rand: r, NumBonded: 3, Accounts: accounts, diff --git a/x/feegrant/simulation/operations_test.go b/x/feegrant/simulation/operations_test.go index a3843e803a57..2ca0dd3d0c10 100644 --- a/x/feegrant/simulation/operations_test.go +++ b/x/feegrant/simulation/operations_test.go @@ -18,7 +18,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" "github.com/cosmos/cosmos-sdk/x/feegrant/simulation" "github.com/cosmos/cosmos-sdk/x/feegrant/testutil" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/stretchr/testify/suite" abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" @@ -33,7 +32,6 @@ type SimTestSuite struct { interfaceRegistry codectypes.InterfaceRegistry accountKeeper authkeeper.AccountKeeper bankKeeper bankkeeper.Keeper - stakingKeeper *stakingkeeper.Keeper cdc codec.Codec legacyAmino *codec.LegacyAmino } @@ -43,7 +41,6 @@ func (suite *SimTestSuite) SetupTest() { suite.app, err = simtestutil.Setup(testutil.AppConfig, &suite.feegrantKeeper, &suite.bankKeeper, - &suite.stakingKeeper, &suite.accountKeeper, &suite.interfaceRegistry, &suite.cdc, @@ -56,7 +53,6 @@ func (suite *SimTestSuite) SetupTest() { func (suite *SimTestSuite) getTestingAccounts(r *rand.Rand, n int) []simtypes.Account { accounts := simtypes.RandomAccounts(r, n) - initAmt := sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) initCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initAmt)) @@ -152,7 +148,7 @@ func (suite *SimTestSuite) TestSimulateMsgRevokeAllowance() { // begin a new block app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) - feeAmt := suite.stakingKeeper.TokensFromConsensusPower(ctx, 200000) + feeAmt := sdk.TokensFromConsensusPower(200000, sdk.DefaultPowerReduction) feeCoins := sdk.NewCoins(sdk.NewCoin("foo", feeAmt)) granter, grantee := accounts[0], accounts[1] diff --git a/x/feegrant/testutil/app_config.go b/x/feegrant/testutil/app_config.go index 6de28a03ba9e..05a298c79c75 100644 --- a/x/feegrant/testutil/app_config.go +++ b/x/feegrant/testutil/app_config.go @@ -18,6 +18,4 @@ import ( //go:embed app.yaml var appConfig []byte -var ( - AppConfig = appconfig.LoadYAML(appConfig) -) +var AppConfig = appconfig.LoadYAML(appConfig) diff --git a/x/feegrant/testutil/expected_keepers_mocks.go b/x/feegrant/testutil/expected_keepers_mocks.go new file mode 100644 index 000000000000..c00c4b0d71fc --- /dev/null +++ b/x/feegrant/testutil/expected_keepers_mocks.go @@ -0,0 +1,155 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: x/feegrant/expected_keepers.go + +// Package testutil is a generated GoMock package. +package testutil + +import ( + reflect "reflect" + + types "github.com/cosmos/cosmos-sdk/types" + types0 "github.com/cosmos/cosmos-sdk/x/auth/types" + gomock "github.com/golang/mock/gomock" +) + +// MockAccountKeeper is a mock of AccountKeeper interface. +type MockAccountKeeper struct { + ctrl *gomock.Controller + recorder *MockAccountKeeperMockRecorder +} + +// MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper. +type MockAccountKeeperMockRecorder struct { + mock *MockAccountKeeper +} + +// NewMockAccountKeeper creates a new mock instance. +func NewMockAccountKeeper(ctrl *gomock.Controller) *MockAccountKeeper { + mock := &MockAccountKeeper{ctrl: ctrl} + mock.recorder = &MockAccountKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockAccountKeeper) EXPECT() *MockAccountKeeperMockRecorder { + return m.recorder +} + +// GetAccount mocks base method. +func (m *MockAccountKeeper) GetAccount(ctx types.Context, addr types.AccAddress) types0.AccountI { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAccount", ctx, addr) + ret0, _ := ret[0].(types0.AccountI) + return ret0 +} + +// GetAccount indicates an expected call of GetAccount. +func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetAccount), ctx, addr) +} + +// GetModuleAccount mocks base method. +func (m *MockAccountKeeper) GetModuleAccount(ctx types.Context, moduleName string) types0.ModuleAccountI { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetModuleAccount", ctx, moduleName) + ret0, _ := ret[0].(types0.ModuleAccountI) + return ret0 +} + +// GetModuleAccount indicates an expected call of GetModuleAccount. +func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, moduleName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAccount), ctx, moduleName) +} + +// GetModuleAddress mocks base method. +func (m *MockAccountKeeper) GetModuleAddress(moduleName string) types.AccAddress { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetModuleAddress", moduleName) + ret0, _ := ret[0].(types.AccAddress) + return ret0 +} + +// GetModuleAddress indicates an expected call of GetModuleAddress. +func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(moduleName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), moduleName) +} + +// NewAccountWithAddress mocks base method. +func (m *MockAccountKeeper) NewAccountWithAddress(ctx types.Context, addr types.AccAddress) types0.AccountI { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "NewAccountWithAddress", ctx, addr) + ret0, _ := ret[0].(types0.AccountI) + return ret0 +} + +// NewAccountWithAddress indicates an expected call of NewAccountWithAddress. +func (mr *MockAccountKeeperMockRecorder) NewAccountWithAddress(ctx, addr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewAccountWithAddress", reflect.TypeOf((*MockAccountKeeper)(nil).NewAccountWithAddress), ctx, addr) +} + +// SetAccount mocks base method. +func (m *MockAccountKeeper) SetAccount(ctx types.Context, acc types0.AccountI) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetAccount", ctx, acc) +} + +// SetAccount indicates an expected call of SetAccount. +func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, acc interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetAccount), ctx, acc) +} + +// MockBankKeeper is a mock of BankKeeper interface. +type MockBankKeeper struct { + ctrl *gomock.Controller + recorder *MockBankKeeperMockRecorder +} + +// MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper. +type MockBankKeeperMockRecorder struct { + mock *MockBankKeeper +} + +// NewMockBankKeeper creates a new mock instance. +func NewMockBankKeeper(ctrl *gomock.Controller) *MockBankKeeper { + mock := &MockBankKeeper{ctrl: ctrl} + mock.recorder = &MockBankKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder { + return m.recorder +} + +// SendCoinsFromAccountToModule mocks base method. +func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx types.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SendCoinsFromAccountToModule", ctx, senderAddr, recipientModule, amt) + ret0, _ := ret[0].(error) + return ret0 +} + +// SendCoinsFromAccountToModule indicates an expected call of SendCoinsFromAccountToModule. +func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoinsFromAccountToModule", reflect.TypeOf((*MockBankKeeper)(nil).SendCoinsFromAccountToModule), ctx, senderAddr, recipientModule, amt) +} + +// SpendableCoins mocks base method. +func (m *MockBankKeeper) SpendableCoins(ctx types.Context, addr types.AccAddress) types.Coins { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SpendableCoins", ctx, addr) + ret0, _ := ret[0].(types.Coins) + return ret0 +} + +// SpendableCoins indicates an expected call of SpendableCoins. +func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableCoins", reflect.TypeOf((*MockBankKeeper)(nil).SpendableCoins), ctx, addr) +} diff --git a/x/gov/client/cli/query.go b/x/gov/client/cli/query.go index 4700f8e753fa..2c9cff73506a 100644 --- a/x/gov/client/cli/query.go +++ b/x/gov/client/cli/query.go @@ -32,7 +32,7 @@ func GetQueryCmd() *cobra.Command { GetCmdQueryProposals(), GetCmdQueryVote(), GetCmdQueryVotes(), - GetCmdQueryParam(), + // GetCmdQueryParam(), GetCmdQueryParams(), GetCmdQueryProposer(), GetCmdQueryDeposit(), @@ -532,37 +532,15 @@ $ %s query gov params // Query store for all 3 params ctx := cmd.Context() - votingRes, err := queryClient.Params( - ctx, - &v1.QueryParamsRequest{ParamsType: "voting"}, - ) - if err != nil { - return err - } - - tallyRes, err := queryClient.Params( - ctx, - &v1.QueryParamsRequest{ParamsType: "tallying"}, - ) - if err != nil { - return err - } - - depositRes, err := queryClient.Params( + res, err := queryClient.Params( ctx, - &v1.QueryParamsRequest{ParamsType: "deposit"}, + &v1.QueryParamsRequest{}, ) if err != nil { return err } - params := v1.NewParams( - *votingRes.GetVotingParams(), - *tallyRes.GetTallyParams(), - *depositRes.GetDepositParams(), - ) - - return clientCtx.PrintObjectLegacy(params) + return clientCtx.PrintProto(res) }, } @@ -571,59 +549,59 @@ $ %s query gov params return cmd } -// GetCmdQueryParam implements the query param command. -func GetCmdQueryParam() *cobra.Command { - cmd := &cobra.Command{ - Use: "param [param-type]", - Args: cobra.ExactArgs(1), - Short: "Query the parameters (voting|tallying|deposit) of the governance process", - Long: strings.TrimSpace( - fmt.Sprintf(`Query the all the parameters for the governance process. - -Example: -$ %s query gov param voting -$ %s query gov param tallying -$ %s query gov param deposit -`, - version.AppName, version.AppName, version.AppName, - ), - ), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := v1.NewQueryClient(clientCtx) - - // Query store - res, err := queryClient.Params( - cmd.Context(), - &v1.QueryParamsRequest{ParamsType: args[0]}, - ) - if err != nil { - return err - } - - var out fmt.Stringer - switch args[0] { - case "voting": - out = res.GetVotingParams() - case "tallying": - out = res.GetTallyParams() - case "deposit": - out = res.GetDepositParams() - default: - return fmt.Errorf("argument must be one of (voting|tallying|deposit), was %s", args[0]) - } - - return clientCtx.PrintObjectLegacy(out) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} +// // GetCmdQueryParam implements the query param command. +// func GetCmdQueryParam() *cobra.Command { +// cmd := &cobra.Command{ +// Use: "param [param-type]", +// Args: cobra.ExactArgs(1), +// Short: "Query the parameters (voting|tallying|deposit) of the governance process", +// Long: strings.TrimSpace( +// fmt.Sprintf(`Query the all the parameters for the governance process. + +// Example: +// $ %s query gov param voting +// $ %s query gov param tallying +// $ %s query gov param deposit +// `, +// version.AppName, version.AppName, version.AppName, +// ), +// ), +// RunE: func(cmd *cobra.Command, args []string) error { +// clientCtx, err := client.GetClientQueryContext(cmd) +// if err != nil { +// return err +// } +// queryClient := v1.NewQueryClient(clientCtx) + +// // Query store +// res, err := queryClient.Params( +// cmd.Context(), +// &v1.QueryParamsRequest{ParamsType: args[0]}, +// ) +// if err != nil { +// return err +// } + +// var out fmt.Stringer +// switch args[0] { +// case "voting": +// out = res.GetVotingParams() +// case "tallying": +// out = res.GetTallyParams() +// case "deposit": +// out = res.GetDepositParams() +// default: +// return fmt.Errorf("argument must be one of (voting|tallying|deposit), was %s", args[0]) +// } + +// return clientCtx.PrintObjectLegacy(out) +// }, +// } + +// flags.AddQueryFlagsToCmd(cmd) + +// return cmd +// } // GetCmdQueryProposer implements the query proposer command. func GetCmdQueryProposer() *cobra.Command { diff --git a/x/gov/client/testutil/cli_test.go b/x/gov/client/testutil/cli_test.go index bd14e890a4d0..090444d54241 100644 --- a/x/gov/client/testutil/cli_test.go +++ b/x/gov/client/testutil/cli_test.go @@ -5,7 +5,6 @@ import ( "time" "github.com/cosmos/cosmos-sdk/testutil/network" - sdk "github.com/cosmos/cosmos-sdk/types" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/stretchr/testify/require" @@ -17,11 +16,13 @@ func TestIntegrationTestSuite(t *testing.T) { cfg.NumValidators = 1 suite.Run(t, NewIntegrationTestSuite(cfg)) - dp := v1.NewDepositParams(sdk.NewCoins(sdk.NewCoin(cfg.BondDenom, v1.DefaultMinDepositTokens)), time.Duration(15)*time.Second) - vp := v1.NewVotingParams(time.Duration(5) * time.Second) + // dp := v1.NewDepositParams(sdk.NewCoins(sdk.NewCoin(cfg.BondDenom, v1.DefaultMinDepositTokens)), time.Duration(15)*time.Second) + // vp := v1.NewVotingParams(time.Duration(5) * time.Second) genesisState := v1.DefaultGenesisState() - genesisState.DepositParams = &dp - genesisState.VotingParams = &vp + maxDepPeriod := time.Duration(15) * time.Second + votingPeriod := time.Duration(5) * time.Second + genesisState.Params.MaxDepositPeriod = &maxDepPeriod + genesisState.Params.VotingPeriod = &votingPeriod bz, err := cfg.Codec.MarshalJSON(genesisState) require.NoError(t, err) cfg.GenesisState["gov"] = bz diff --git a/x/gov/client/testutil/grpc.go b/x/gov/client/testutil/grpc.go index 67ebba6aa9d5..35c4d4eb85c4 100644 --- a/x/gov/client/testutil/grpc.go +++ b/x/gov/client/testutil/grpc.go @@ -3,8 +3,6 @@ package testutil import ( "fmt" - "github.com/gogo/protobuf/proto" - "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/rest" sdk "github.com/cosmos/cosmos-sdk/types" @@ -354,62 +352,62 @@ func (s *IntegrationTestSuite) TestGetTallyGRPC() { } } -func (s *IntegrationTestSuite) TestGetParamsGRPC() { - val := s.network.Validators[0] - - dp := v1.DefaultDepositParams() - vp := v1.DefaultVotingParams() - tp := v1.DefaultTallyParams() - - testCases := []struct { - name string - url string - expErr bool - respType proto.Message - expectResp proto.Message - }{ - { - "request params with empty params type", - fmt.Sprintf("%s/cosmos/gov/v1/params/%s", val.APIAddress, ""), - true, nil, nil, - }, - { - "get deposit params", - fmt.Sprintf("%s/cosmos/gov/v1/params/%s", val.APIAddress, v1.ParamDeposit), - false, - &v1.QueryParamsResponse{}, - &v1.QueryParamsResponse{DepositParams: &dp}, - }, - { - "get vote params", - fmt.Sprintf("%s/cosmos/gov/v1/params/%s", val.APIAddress, v1.ParamVoting), - false, - &v1.QueryParamsResponse{}, - &v1.QueryParamsResponse{VotingParams: &vp}, - }, - { - "get tally params", - fmt.Sprintf("%s/cosmos/gov/v1/params/%s", val.APIAddress, v1.ParamTallying), - false, - &v1.QueryParamsResponse{}, - &v1.QueryParamsResponse{TallyParams: &tp}, - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - resp, err := rest.GetRequest(tc.url) - s.Require().NoError(err) - - err = val.ClientCtx.Codec.UnmarshalJSON(resp, tc.respType) - - if tc.expErr { - s.Require().Error(err) - } else { - s.Require().NoError(err) - s.Require().Equal(tc.expectResp.String(), tc.respType.String()) - } - }) - } -} +// func (s *IntegrationTestSuite) TestGetParamsGRPC() { +// val := s.network.Validators[0] + +// dp := v1.DefaultDepositParams() +// vp := v1.DefaultVotingParams() +// tp := v1.DefaultTallyParams() + +// testCases := []struct { +// name string +// url string +// expErr bool +// respType proto.Message +// expectResp proto.Message +// }{ +// { +// "request params with empty params type", +// fmt.Sprintf("%s/cosmos/gov/v1/params/%s", val.APIAddress, ""), +// true, nil, nil, +// }, +// { +// "get deposit params", +// fmt.Sprintf("%s/cosmos/gov/v1/params/%s", val.APIAddress, v1.ParamDeposit), +// false, +// &v1.QueryParamsResponse{}, +// &v1.QueryParamsResponse{DepositParams: &dp}, +// }, +// { +// "get vote params", +// fmt.Sprintf("%s/cosmos/gov/v1/params/%s", val.APIAddress, v1.ParamVoting), +// false, +// &v1.QueryParamsResponse{}, +// &v1.QueryParamsResponse{VotingParams: &vp}, +// }, +// { +// "get tally params", +// fmt.Sprintf("%s/cosmos/gov/v1/params/%s", val.APIAddress, v1.ParamTallying), +// false, +// &v1.QueryParamsResponse{}, +// &v1.QueryParamsResponse{TallyParams: &tp}, +// }, +// } + +// for _, tc := range testCases { +// tc := tc +// s.Run(tc.name, func() { +// resp, err := rest.GetRequest(tc.url) +// s.Require().NoError(err) + +// err = val.ClientCtx.Codec.UnmarshalJSON(resp, tc.respType) + +// if tc.expErr { +// s.Require().Error(err) +// } else { +// s.Require().NoError(err) +// s.Require().Equal(tc.expectResp.String(), tc.respType.String()) +// } +// }) +// } +// } diff --git a/x/gov/client/testutil/query.go b/x/gov/client/testutil/query.go index 5f0502a8f039..7060083649bd 100644 --- a/x/gov/client/testutil/query.go +++ b/x/gov/client/testutil/query.go @@ -59,53 +59,53 @@ voting_params: } } -func (s *IntegrationTestSuite) TestCmdParam() { - val := s.network.Validators[0] - - testCases := []struct { - name string - args []string - expectedOutput string - }{ - { - "voting params", - []string{ - "voting", - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - `{"voting_period":"172800000000000"}`, - }, - { - "tally params", - []string{ - "tallying", - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - `{"quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"}`, - }, - { - "deposit params", - []string{ - "deposit", - fmt.Sprintf("--%s=json", tmcli.OutputFlag), - }, - `{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800000000000"}`, - }, - } - - for _, tc := range testCases { - tc := tc - - s.Run(tc.name, func() { - cmd := cli.GetCmdQueryParam() - clientCtx := val.ClientCtx - - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) - s.Require().NoError(err) - s.Require().Equal(strings.TrimSpace(tc.expectedOutput), strings.TrimSpace(out.String())) - }) - } -} +// func (s *IntegrationTestSuite) TestCmdParam() { +// val := s.network.Validators[0] + +// testCases := []struct { +// name string +// args []string +// expectedOutput string +// }{ +// { +// "voting params", +// []string{ +// "voting", +// fmt.Sprintf("--%s=json", tmcli.OutputFlag), +// }, +// `{"voting_period":"172800000000000"}`, +// }, +// { +// "tally params", +// []string{ +// "tallying", +// fmt.Sprintf("--%s=json", tmcli.OutputFlag), +// }, +// `{"quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"}`, +// }, +// { +// "deposit params", +// []string{ +// "deposit", +// fmt.Sprintf("--%s=json", tmcli.OutputFlag), +// }, +// `{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800000000000"}`, +// }, +// } + +// for _, tc := range testCases { +// tc := tc + +// s.Run(tc.name, func() { +// cmd := cli.GetCmdQueryParam() +// clientCtx := val.ClientCtx + +// out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) +// s.Require().NoError(err) +// s.Require().Equal(strings.TrimSpace(tc.expectedOutput), strings.TrimSpace(out.String())) +// }) +// } +// } func (s *IntegrationTestSuite) TestCmdProposer() { val := s.network.Validators[0] diff --git a/x/gov/exported/exported.go b/x/gov/exported/exported.go new file mode 100644 index 000000000000..08a5d2594e90 --- /dev/null +++ b/x/gov/exported/exported.go @@ -0,0 +1,18 @@ +package exported + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" +) + +type ( + ParamSet = paramtypes.ParamSet + + // Subspace defines an interface that implements the legacy x/params Subspace + // type. + // + // NOTE: This is used solely for migration of x/params managed parameters. + ParamSubspace interface { + Get(ctx sdk.Context, key []byte, ptr interface{}) + } +) diff --git a/x/gov/genesis.go b/x/gov/genesis.go index 53f2a1fa7ebd..1153015e7b45 100644 --- a/x/gov/genesis.go +++ b/x/gov/genesis.go @@ -12,9 +12,10 @@ import ( // InitGenesis - store genesis parameters func InitGenesis(ctx sdk.Context, ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper, data *v1.GenesisState) { k.SetProposalID(ctx, data.StartingProposalId) - k.SetDepositParams(ctx, *data.DepositParams) - k.SetVotingParams(ctx, *data.VotingParams) - k.SetTallyParams(ctx, *data.TallyParams) + // k.SetDepositParams(ctx, *data.DepositParams) + // k.SetVotingParams(ctx, *data.VotingParams) + // k.SetTallyParams(ctx, *data.TallyParams) + k.SetParams(ctx, *data.Params) // check if the deposits pool account exists moduleAcc := k.GetGovernanceAccount(ctx) @@ -57,10 +58,11 @@ func InitGenesis(ctx sdk.Context, ak types.AccountKeeper, bk types.BankKeeper, k // ExportGenesis - output genesis parameters func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *v1.GenesisState { startingProposalID, _ := k.GetProposalID(ctx) - depositParams := k.GetDepositParams(ctx) - votingParams := k.GetVotingParams(ctx) - tallyParams := k.GetTallyParams(ctx) + // depositParams := k.GetDepositParams(ctx) + // votingParams := k.GetVotingParams(ctx) + // tallyParams := k.GetTallyParams(ctx) proposals := k.GetProposals(ctx) + params := k.GetParams(ctx) var proposalsDeposits v1.Deposits var proposalsVotes v1.Votes @@ -77,8 +79,6 @@ func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *v1.GenesisState { Deposits: proposalsDeposits, Votes: proposalsVotes, Proposals: proposals, - DepositParams: &depositParams, - VotingParams: &votingParams, - TallyParams: &tallyParams, + Params: ¶ms, } } diff --git a/x/gov/keeper/grpc_query.go b/x/gov/keeper/grpc_query.go index afdfc53652b3..d58083ac4700 100644 --- a/x/gov/keeper/grpc_query.go +++ b/x/gov/keeper/grpc_query.go @@ -158,24 +158,11 @@ func (q Keeper) Params(c context.Context, req *v1.QueryParamsRequest) (*v1.Query } ctx := sdk.UnwrapSDKContext(c) - - switch req.ParamsType { - case v1.ParamDeposit: - depositParmas := q.GetDepositParams(ctx) - return &v1.QueryParamsResponse{DepositParams: &depositParmas}, nil - - case v1.ParamVoting: - votingParmas := q.GetVotingParams(ctx) - return &v1.QueryParamsResponse{VotingParams: &votingParmas}, nil - - case v1.ParamTallying: - tallyParams := q.GetTallyParams(ctx) - return &v1.QueryParamsResponse{TallyParams: &tallyParams}, nil - - default: - return nil, status.Errorf(codes.InvalidArgument, - "%s is not a valid parameter type", req.ParamsType) - } + params := q.GetParams(ctx) + // if err != nil { + // return nil, err + // } + return &v1.QueryParamsResponse{Params: ¶ms}, nil } // Deposit queries single deposit information based on proposalID, depositAddr. @@ -365,8 +352,8 @@ func (q legacyQueryServer) Votes(c context.Context, req *v1beta1.QueryVotesReque } func (q legacyQueryServer) Params(c context.Context, req *v1beta1.QueryParamsRequest) (*v1beta1.QueryParamsResponse, error) { - resp, err := q.keeper.Params(c, &v1.QueryParamsRequest{ - ParamsType: req.ParamsType, + _, err := q.keeper.Params(c, &v1.QueryParamsRequest{ + // ParamsType: req.ParamsType, }) if err != nil { return nil, err @@ -374,31 +361,31 @@ func (q legacyQueryServer) Params(c context.Context, req *v1beta1.QueryParamsReq response := &v1beta1.QueryParamsResponse{} - if resp.DepositParams != nil { - minDeposit := sdk.NewCoins(resp.DepositParams.MinDeposit...) - response.DepositParams = v1beta1.NewDepositParams(minDeposit, *resp.DepositParams.MaxDepositPeriod) - } - - if resp.VotingParams != nil { - response.VotingParams = v1beta1.NewVotingParams(*resp.VotingParams.VotingPeriod) - } - - if resp.TallyParams != nil { - quorum, err := sdk.NewDecFromStr(resp.TallyParams.Quorum) - if err != nil { - return nil, err - } - threshold, err := sdk.NewDecFromStr(resp.TallyParams.Threshold) - if err != nil { - return nil, err - } - vetoThreshold, err := sdk.NewDecFromStr(resp.TallyParams.VetoThreshold) - if err != nil { - return nil, err - } - - response.TallyParams = v1beta1.NewTallyParams(quorum, threshold, vetoThreshold) - } + // if resp.DepositParams != nil { + // minDeposit := sdk.NewCoins(resp.DepositParams.MinDeposit...) + // response.DepositParams = v1beta1.NewDepositParams(minDeposit, *resp.DepositParams.MaxDepositPeriod) + // } + + // if resp.VotingParams != nil { + // response.VotingParams = v1beta1.NewVotingParams(*resp.VotingParams.VotingPeriod) + // } + + // if resp.TallyParams != nil { + // quorum, err := sdk.NewDecFromStr(resp.TallyParams.Quorum) + // if err != nil { + // return nil, err + // } + // threshold, err := sdk.NewDecFromStr(resp.TallyParams.Threshold) + // if err != nil { + // return nil, err + // } + // vetoThreshold, err := sdk.NewDecFromStr(resp.TallyParams.VetoThreshold) + // if err != nil { + // return nil, err + // } + + // response.TallyParams = v1beta1.NewTallyParams(quorum, threshold, vetoThreshold) + // } return response, nil } diff --git a/x/gov/keeper/grpc_query_test.go b/x/gov/keeper/grpc_query_test.go index 03d93544a628..32219bf8daa0 100644 --- a/x/gov/keeper/grpc_query_test.go +++ b/x/gov/keeper/grpc_query_test.go @@ -785,177 +785,177 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryVotes() { } } -func (suite *KeeperTestSuite) TestGRPCQueryParams() { - queryClient := suite.queryClient - - var ( - req *v1.QueryParamsRequest - expRes *v1.QueryParamsResponse - ) - - testCases := []struct { - msg string - malleate func() - expPass bool - }{ - { - "empty request", - func() { - req = &v1.QueryParamsRequest{} - }, - false, - }, - { - "deposit params request", - func() { - req = &v1.QueryParamsRequest{ParamsType: v1.ParamDeposit} - depositParams := v1.DefaultDepositParams() - expRes = &v1.QueryParamsResponse{ - DepositParams: &depositParams, - } - }, - true, - }, - { - "voting params request", - func() { - req = &v1.QueryParamsRequest{ParamsType: v1.ParamVoting} - votingParams := v1.DefaultVotingParams() - expRes = &v1.QueryParamsResponse{ - VotingParams: &votingParams, - } - }, - true, - }, - { - "tally params request", - func() { - req = &v1.QueryParamsRequest{ParamsType: v1.ParamTallying} - tallyParams := v1.DefaultTallyParams() - expRes = &v1.QueryParamsResponse{ - TallyParams: &tallyParams, - } - }, - true, - }, - { - "invalid request", - func() { - req = &v1.QueryParamsRequest{ParamsType: "wrongPath"} - expRes = &v1.QueryParamsResponse{} - }, - false, - }, - } - - for _, testCase := range testCases { - suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { - testCase.malleate() - - params, err := queryClient.Params(gocontext.Background(), req) - - if testCase.expPass { - suite.Require().NoError(err) - suite.Require().Equal(expRes.GetDepositParams(), params.GetDepositParams()) - suite.Require().Equal(expRes.GetVotingParams(), params.GetVotingParams()) - suite.Require().Equal(expRes.GetTallyParams(), params.GetTallyParams()) - } else { - suite.Require().Error(err) - suite.Require().Nil(params) - } - }) - } -} - -func (suite *KeeperTestSuite) TestLegacyGRPCQueryParams() { - queryClient := suite.legacyQueryClient - - var ( - req *v1beta1.QueryParamsRequest - expRes *v1beta1.QueryParamsResponse - ) - - defaultTallyParams := v1beta1.TallyParams{ - Quorum: sdk.NewDec(0), - Threshold: sdk.NewDec(0), - VetoThreshold: sdk.NewDec(0), - } - - testCases := []struct { - msg string - malleate func() - expPass bool - }{ - { - "empty request", - func() { - req = &v1beta1.QueryParamsRequest{} - }, - false, - }, - { - "deposit params request", - func() { - req = &v1beta1.QueryParamsRequest{ParamsType: v1beta1.ParamDeposit} - depositParams := v1beta1.DefaultDepositParams() - expRes = &v1beta1.QueryParamsResponse{ - DepositParams: depositParams, - TallyParams: defaultTallyParams, - } - }, - true, - }, - { - "voting params request", - func() { - req = &v1beta1.QueryParamsRequest{ParamsType: v1beta1.ParamVoting} - votingParams := v1beta1.DefaultVotingParams() - expRes = &v1beta1.QueryParamsResponse{ - VotingParams: votingParams, - TallyParams: defaultTallyParams, - } - }, - true, - }, - { - "tally params request", - func() { - req = &v1beta1.QueryParamsRequest{ParamsType: v1beta1.ParamTallying} - tallyParams := v1beta1.DefaultTallyParams() - expRes = &v1beta1.QueryParamsResponse{ - TallyParams: tallyParams, - } - }, - true, - }, - { - "invalid request", - func() { - req = &v1beta1.QueryParamsRequest{ParamsType: "wrongPath"} - expRes = &v1beta1.QueryParamsResponse{} - }, - false, - }, - } - - for _, testCase := range testCases { - suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { - testCase.malleate() - - params, err := queryClient.Params(gocontext.Background(), req) - - if testCase.expPass { - suite.Require().NoError(err) - suite.Require().Equal(expRes.GetDepositParams(), params.GetDepositParams()) - suite.Require().Equal(expRes.GetVotingParams(), params.GetVotingParams()) - suite.Require().Equal(expRes.GetTallyParams(), params.GetTallyParams()) - } else { - suite.Require().Error(err) - suite.Require().Nil(params) - } - }) - } -} +// func (suite *KeeperTestSuite) TestGRPCQueryParams() { +// queryClient := suite.queryClient + +// var ( +// req *v1.QueryParamsRequest +// expRes *v1.QueryParamsResponse +// ) + +// testCases := []struct { +// msg string +// malleate func() +// expPass bool +// }{ +// { +// "empty request", +// func() { +// req = &v1.QueryParamsRequest{} +// }, +// false, +// }, +// { +// "deposit params request", +// func() { +// req = &v1.QueryParamsRequest{ParamsType: v1.ParamDeposit} +// depositParams := v1.DefaultDepositParams() +// expRes = &v1.QueryParamsResponse{ +// DepositParams: &depositParams, +// } +// }, +// true, +// }, +// { +// "voting params request", +// func() { +// req = &v1.QueryParamsRequest{ParamsType: v1.ParamVoting} +// votingParams := v1.DefaultVotingParams() +// expRes = &v1.QueryParamsResponse{ +// VotingParams: &votingParams, +// } +// }, +// true, +// }, +// { +// "tally params request", +// func() { +// req = &v1.QueryParamsRequest{ParamsType: v1.ParamTallying} +// tallyParams := v1.DefaultTallyParams() +// expRes = &v1.QueryParamsResponse{ +// TallyParams: &tallyParams, +// } +// }, +// true, +// }, +// { +// "invalid request", +// func() { +// req = &v1.QueryParamsRequest{ParamsType: "wrongPath"} +// expRes = &v1.QueryParamsResponse{} +// }, +// false, +// }, +// } + +// for _, testCase := range testCases { +// suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { +// testCase.malleate() + +// params, err := queryClient.Params(gocontext.Background(), req) + +// if testCase.expPass { +// suite.Require().NoError(err) +// suite.Require().Equal(expRes.GetDepositParams(), params.GetDepositParams()) +// suite.Require().Equal(expRes.GetVotingParams(), params.GetVotingParams()) +// suite.Require().Equal(expRes.GetTallyParams(), params.GetTallyParams()) +// } else { +// suite.Require().Error(err) +// suite.Require().Nil(params) +// } +// }) +// } +// } + +// func (suite *KeeperTestSuite) TestLegacyGRPCQueryParams() { +// queryClient := suite.legacyQueryClient + +// var ( +// req *v1beta1.QueryParamsRequest +// expRes *v1beta1.QueryParamsResponse +// ) + +// defaultTallyParams := v1beta1.TallyParams{ +// Quorum: sdk.NewDec(0), +// Threshold: sdk.NewDec(0), +// VetoThreshold: sdk.NewDec(0), +// } + +// testCases := []struct { +// msg string +// malleate func() +// expPass bool +// }{ +// { +// "empty request", +// func() { +// req = &v1beta1.QueryParamsRequest{} +// }, +// false, +// }, +// { +// "deposit params request", +// func() { +// req = &v1beta1.QueryParamsRequest{ParamsType: v1beta1.ParamDeposit} +// depositParams := v1beta1.DefaultDepositParams() +// expRes = &v1beta1.QueryParamsResponse{ +// DepositParams: depositParams, +// TallyParams: defaultTallyParams, +// } +// }, +// true, +// }, +// { +// "voting params request", +// func() { +// req = &v1beta1.QueryParamsRequest{ParamsType: v1beta1.ParamVoting} +// votingParams := v1beta1.DefaultVotingParams() +// expRes = &v1beta1.QueryParamsResponse{ +// VotingParams: votingParams, +// TallyParams: defaultTallyParams, +// } +// }, +// true, +// }, +// { +// "tally params request", +// func() { +// req = &v1beta1.QueryParamsRequest{ParamsType: v1beta1.ParamTallying} +// tallyParams := v1beta1.DefaultTallyParams() +// expRes = &v1beta1.QueryParamsResponse{ +// TallyParams: tallyParams, +// } +// }, +// true, +// }, +// { +// "invalid request", +// func() { +// req = &v1beta1.QueryParamsRequest{ParamsType: "wrongPath"} +// expRes = &v1beta1.QueryParamsResponse{} +// }, +// false, +// }, +// } + +// for _, testCase := range testCases { +// suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { +// testCase.malleate() + +// params, err := queryClient.Params(gocontext.Background(), req) + +// if testCase.expPass { +// suite.Require().NoError(err) +// suite.Require().Equal(expRes.GetDepositParams(), params.GetDepositParams()) +// suite.Require().Equal(expRes.GetVotingParams(), params.GetVotingParams()) +// suite.Require().Equal(expRes.GetTallyParams(), params.GetTallyParams()) +// } else { +// suite.Require().Error(err) +// suite.Require().Nil(params) +// } +// }) +// } +// } func (suite *KeeperTestSuite) TestGRPCQueryDeposit() { app, ctx, queryClient, addrs := suite.app, suite.ctx, suite.queryClient, suite.addrs diff --git a/x/gov/keeper/keeper.go b/x/gov/keeper/keeper.go index 514ec2b96936..c03609ac34a0 100644 --- a/x/gov/keeper/keeper.go +++ b/x/gov/keeper/keeper.go @@ -43,6 +43,10 @@ type Keeper struct { router *baseapp.MsgServiceRouter config types.Config + + // the address capable of executing a MsgUpdateParams message. Typically, this + // should be the x/gov module account. + authority string } // NewKeeper returns a governance keeper. It handles: @@ -53,9 +57,9 @@ type Keeper struct { // // CONTRACT: the parameter Subspace must have the param key table already initialized func NewKeeper( - cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace types.ParamSubspace, - authKeeper types.AccountKeeper, bankKeeper types.BankKeeper, sk types.StakingKeeper, - router *baseapp.MsgServiceRouter, config types.Config, + cdc codec.BinaryCodec, key storetypes.StoreKey, authKeeper types.AccountKeeper, + bankKeeper types.BankKeeper, sk types.StakingKeeper, + router *baseapp.MsgServiceRouter, config types.Config, authority string, ) *Keeper { // ensure governance module account is set if addr := authKeeper.GetModuleAddress(types.ModuleName); addr == nil { @@ -69,13 +73,13 @@ func NewKeeper( return &Keeper{ storeKey: key, - paramSpace: paramSpace, authKeeper: authKeeper, bankKeeper: bankKeeper, sk: sk, cdc: cdc, router: router, config: config, + authority: authority, } } diff --git a/x/gov/keeper/migrations.go b/x/gov/keeper/migrations.go index 6131d5601f4b..65a1918fff8a 100644 --- a/x/gov/keeper/migrations.go +++ b/x/gov/keeper/migrations.go @@ -2,18 +2,23 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/gov/exported" v043 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v043" v046 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v046" ) // Migrator is a struct for handling in-place store migrations. type Migrator struct { - keeper *Keeper + keeper *Keeper + legacySubspace exported.ParamSubspace } // NewMigrator returns a new Migrator. -func NewMigrator(keeper *Keeper) Migrator { - return Migrator{keeper: keeper} +func NewMigrator(keeper *Keeper, legacySubspace exported.ParamSubspace) Migrator { + return Migrator{ + keeper: keeper, + legacySubspace: legacySubspace, + } } // Migrate1to2 migrates from version 1 to 2. diff --git a/x/gov/keeper/msg_server.go b/x/gov/keeper/msg_server.go index 3982451dd0f7..0a26d9615fe3 100644 --- a/x/gov/keeper/msg_server.go +++ b/x/gov/keeper/msg_server.go @@ -10,8 +10,10 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) @@ -206,6 +208,27 @@ func (k msgServer) Deposit(goCtx context.Context, msg *v1.MsgDeposit) (*v1.MsgDe return &v1.MsgDepositResponse{}, nil } +func (k msgServer) UpdateParams(goCtx context.Context, msg *v1.MsgUpdateParams) (*v1.MsgUpdateParamsResponse, error) { + if k.authority != msg.Authority { + return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.authority, msg.Authority) + } + + ctx := sdk.UnwrapSDKContext(goCtx) + if err := k.SetParams(ctx, msg.Params); err != nil { + return nil, err + } + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), + sdk.NewAttribute(sdk.AttributeKeySender, msg.Authority), + ), + ) + + return &v1.MsgUpdateParamsResponse{}, nil +} + type legacyMsgServer struct { govAcct string server v1.MsgServer diff --git a/x/gov/keeper/params.go b/x/gov/keeper/params.go index 942f2e3b0b0e..cc3ddb825343 100644 --- a/x/gov/keeper/params.go +++ b/x/gov/keeper/params.go @@ -2,6 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/types" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" ) @@ -40,3 +41,25 @@ func (keeper Keeper) SetVotingParams(ctx sdk.Context, votingParams v1.VotingPara func (keeper Keeper) SetTallyParams(ctx sdk.Context, tallyParams v1.TallyParams) { keeper.paramSpace.Set(ctx, v1.ParamStoreKeyTallyParams, &tallyParams) } + +func (k Keeper) SetParams(ctx sdk.Context, params v1.Params) error { + store := ctx.KVStore(k.storeKey) + bz, err := k.cdc.Marshal(¶ms) + if err != nil { + return err + } + store.Set(types.ParamsKey, bz) + + return nil +} + +func (k Keeper) GetParams(clientCtx sdk.Context) (params v1.Params) { + store := clientCtx.KVStore(k.storeKey) + bz := store.Get(types.ParamsKey) + if bz == nil { + return params + } + + k.cdc.MustUnmarshal(bz, ¶ms) + return params +} diff --git a/x/gov/migrations/v046/json.go b/x/gov/migrations/v046/json.go index ec10fcf12884..763875f0827e 100644 --- a/x/gov/migrations/v046/json.go +++ b/x/gov/migrations/v046/json.go @@ -27,8 +27,13 @@ func MigrateJSON(oldState *v1beta1.GenesisState) (*v1.GenesisState, error) { Deposits: convertToNewDeposits(oldState.Deposits), Votes: newVotes, Proposals: newProps, - DepositParams: &depParams, - VotingParams: &votingParms, - TallyParams: &tallyParams, + Params: &v1.Params{ + MinDeposit: depParams.MinDeposit, + MaxDepositPeriod: depParams.MaxDepositPeriod, + VotingPeriod: votingParms.VotingPeriod, + Quorum: tallyParams.Quorum, + Threshold: tallyParams.Threshold, + VetoThreshold: tallyParams.VetoThreshold, + }, }, nil } diff --git a/x/gov/migrations/v046/keys.go b/x/gov/migrations/v046/keys.go index aaf810f3b00d..caa7c65cd002 100644 --- a/x/gov/migrations/v046/keys.go +++ b/x/gov/migrations/v046/keys.go @@ -4,3 +4,6 @@ const ( // ModuleName is the name of the module ModuleName = "gov" ) + +// ParamsKey is the key of x/gov params +var ParamsKey = []byte{0x30} diff --git a/x/gov/migrations/v046/store.go b/x/gov/migrations/v046/store.go index c0ad36dfb4b7..e9a34f269aed 100644 --- a/x/gov/migrations/v046/store.go +++ b/x/gov/migrations/v046/store.go @@ -5,7 +5,9 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/gov/exported" v042 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v042" + v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) @@ -40,12 +42,45 @@ func migrateProposals(store sdk.KVStore, cdc codec.BinaryCodec) error { return nil } +func migrateParams(ctx sdk.Context, storeKey storetypes.StoreKey, legacySubspace exported.ParamSubspace, cdc codec.BinaryCodec) error { + store := ctx.KVStore(storeKey) + + dp := v1beta1.DepositParams{} + vp := v1beta1.VotingParams{} + tp := v1beta1.TallyParams{} + legacySubspace.Get(ctx, v1.ParamStoreKeyDepositParams, &dp) + legacySubspace.Get(ctx, v1.ParamStoreKeyVotingParams, &vp) + legacySubspace.Get(ctx, v1.ParamStoreKeyTallyParams, &tp) + + params := v1.NewParams( + dp.MinDeposit, + dp.MaxDepositPeriod, + vp.VotingPeriod, + tp.Quorum.String(), + tp.Threshold.String(), + tp.VetoThreshold.String(), + ) + + bz, err := cdc.Marshal(¶ms) + if err != nil { + return err + } + + store.Set(ParamsKey, bz) + + return nil +} + // MigrateStore performs in-place store migrations from v0.43 to v0.46. The // migration includes: // // - Migrate proposals to be Msg-based. -func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error { +func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, legacySubspace exported.ParamSubspace, cdc codec.BinaryCodec) error { store := ctx.KVStore(storeKey) - return migrateProposals(store, cdc) + if err := migrateProposals(store, cdc); err != nil { + return err + } + + return migrateParams(ctx, storeKey, legacySubspace, cdc) } diff --git a/x/gov/module.go b/x/gov/module.go index ad54cdd9f696..1bc9e8ebb644 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -27,16 +27,20 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govclient "github.com/cosmos/cosmos-sdk/x/gov/client" "github.com/cosmos/cosmos-sdk/x/gov/client/cli" "github.com/cosmos/cosmos-sdk/x/gov/keeper" "github.com/cosmos/cosmos-sdk/x/gov/simulation" "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) +const ConsensusVersion = 3 + var ( _ module.AppModule = AppModule{} _ module.AppModuleBasic = AppModuleBasic{} @@ -126,15 +130,23 @@ type AppModule struct { keeper *keeper.Keeper accountKeeper types.AccountKeeper bankKeeper types.BankKeeper + + // legacySubspace is used solely for migration of x/params managed parameters + legacySubspace types.ParamSubspace } // NewAppModule creates a new AppModule object -func NewAppModule(cdc codec.Codec, keeper *keeper.Keeper, ak types.AccountKeeper, bk types.BankKeeper) AppModule { +func NewAppModule( + cdc codec.Codec, keeper *keeper.Keeper, + ak types.AccountKeeper, bk types.BankKeeper, ss types.ParamSubspace, +) AppModule { + return AppModule{ AppModuleBasic: AppModuleBasic{cdc: cdc}, keeper: keeper, accountKeeper: ak, bankKeeper: bk, + legacySubspace: ss, } } @@ -155,11 +167,13 @@ type govInputs struct { Config *modulev1.Module Cdc codec.Codec Key *store.KVStoreKey - Subspace types.ParamSubspace MsgServiceRouter *baseapp.MsgServiceRouter AccountKeeper types.AccountKeeper BankKeeper types.BankKeeper StakingKeeper types.StakingKeeper + + // LegacySubspace is used solely for migration of x/params managed parameters + LegacySubspace types.ParamSubspace } type govOutputs struct { @@ -176,8 +190,17 @@ func provideModule(in govInputs) govOutputs { kConfig.MaxMetadataLen = in.Config.MaxMetadataLen } - k := keeper.NewKeeper(in.Cdc, in.Key, in.Subspace, in.AccountKeeper, in.BankKeeper, in.StakingKeeper, in.MsgServiceRouter, kConfig) - m := NewAppModule(in.Cdc, k, in.AccountKeeper, in.BankKeeper) + k := keeper.NewKeeper( + in.Cdc, + in.Key, + in.AccountKeeper, + in.BankKeeper, + in.StakingKeeper, + in.MsgServiceRouter, + kConfig, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + m := NewAppModule(in.Cdc, k, in.AccountKeeper, in.BankKeeper, in.LegacySubspace) hr := v1beta1.HandlerRoute{Handler: v1beta1.ProposalHandler, RouteKey: types.RouterKey} return govOutputs{Module: runtime.WrapAppModule(m), Keeper: k, HandlerRoute: hr} @@ -264,7 +287,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { v1beta1.RegisterQueryServer(cfg.QueryServer(), legacyQueryServer) v1.RegisterQueryServer(cfg.QueryServer(), am.keeper) - m := keeper.NewMigrator(am.keeper) + m := keeper.NewMigrator(am.keeper, am.legacySubspace) err := cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2) if err != nil { panic(err) @@ -292,7 +315,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // ConsensusVersion implements AppModule/ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return 3 } +func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion } // BeginBlock performs a no-op. func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} @@ -317,9 +340,11 @@ func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.We return simulation.ProposalContents() } -// RandomizedParams creates randomized gov param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { - return simulation.ParamChanges(r) +// TODO: Returns an empty slice which will make parameter changes a no-op during +// simulations. Once all modules are migrated, remove RandomizedParams from +// the simulation interface. +func (AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { + return []simtypes.ParamChange{} } // RegisterStoreDecoder registers a decoder for gov module's types diff --git a/x/gov/simulation/genesis.go b/x/gov/simulation/genesis.go index 9c83be198dc5..56bee918d8ea 100644 --- a/x/gov/simulation/genesis.go +++ b/x/gov/simulation/genesis.go @@ -97,9 +97,7 @@ func RandomizedGenState(simState *module.SimulationState) { govGenesis := v1.NewGenesisState( startingProposalID, - v1.NewDepositParams(minDeposit, depositPeriod), - v1.NewVotingParams(votingPeriod), - v1.NewTallyParams(quorum, threshold, veto), + v1.NewParams(minDeposit, depositPeriod, votingPeriod, quorum.String(), threshold.String(), veto.String()), ) bz, err := json.MarshalIndent(&govGenesis, "", " ") diff --git a/x/gov/simulation/genesis_test.go b/x/gov/simulation/genesis_test.go index 281487751e38..37868dd942f6 100644 --- a/x/gov/simulation/genesis_test.go +++ b/x/gov/simulation/genesis_test.go @@ -46,12 +46,12 @@ func TestRandomizedGenState(t *testing.T) { dec2, _ := sdk.NewDecFromStr("0.512000000000000000") dec3, _ := sdk.NewDecFromStr("0.267000000000000000") - require.Equal(t, "905stake", govGenesis.DepositParams.MinDeposit[0].String()) - require.Equal(t, "77h26m10s", govGenesis.DepositParams.MaxDepositPeriod.String()) - require.Equal(t, float64(148296), govGenesis.VotingParams.VotingPeriod.Seconds()) - require.Equal(t, dec1.String(), govGenesis.TallyParams.Quorum) - require.Equal(t, dec2.String(), govGenesis.TallyParams.Threshold) - require.Equal(t, dec3.String(), govGenesis.TallyParams.VetoThreshold) + require.Equal(t, "905stake", govGenesis.Params.MinDeposit[0].String()) + require.Equal(t, "77h26m10s", govGenesis.Params.MaxDepositPeriod.String()) + require.Equal(t, float64(148296), govGenesis.Params.VotingPeriod.Seconds()) + require.Equal(t, dec1.String(), govGenesis.Params.Quorum) + require.Equal(t, dec2.String(), govGenesis.Params.Threshold) + require.Equal(t, dec3.String(), govGenesis.Params.VetoThreshold) require.Equal(t, uint64(0x28), govGenesis.StartingProposalId) require.Equal(t, []*v1.Deposit{}, govGenesis.Deposits) require.Equal(t, []*v1.Vote{}, govGenesis.Votes) diff --git a/x/gov/types/keys.go b/x/gov/types/keys.go index 7f58d8fdfbac..0e57200f66ec 100644 --- a/x/gov/types/keys.go +++ b/x/gov/types/keys.go @@ -37,6 +37,8 @@ const ( // - 0x10: Deposit // // - 0x20: Voter +// +// - 0x30: Params var ( ProposalsKeyPrefix = []byte{0x00} ActiveProposalQueuePrefix = []byte{0x01} @@ -46,6 +48,9 @@ var ( DepositsKeyPrefix = []byte{0x10} VotesKeyPrefix = []byte{0x20} + + // ParamsKey is the querier route for gov + ParamsKey = []byte{0x30} ) var lenTime = len(sdk.FormatTimeBytes(time.Now())) diff --git a/x/gov/types/v1/codec.go b/x/gov/types/v1/codec.go index 327094960d7b..6574ca57cbe2 100644 --- a/x/gov/types/v1/codec.go +++ b/x/gov/types/v1/codec.go @@ -19,6 +19,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { legacy.RegisterAminoMsg(cdc, &MsgVote{}, "cosmos-sdk/v1/MsgVote") legacy.RegisterAminoMsg(cdc, &MsgVoteWeighted{}, "cosmos-sdk/v1/MsgVoteWeighted") legacy.RegisterAminoMsg(cdc, &MsgExecLegacyContent{}, "cosmos-sdk/v1/MsgExecLegacyContent") + legacy.RegisterAminoMsg(cdc, &MsgSubmitProposal{}, "cosmos-sdk/v1/MsgSubmitProposal") } func RegisterInterfaces(registry codectypes.InterfaceRegistry) { @@ -28,6 +29,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &MsgVoteWeighted{}, &MsgDeposit{}, &MsgExecLegacyContent{}, + &MsgSubmitProposal{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/gov/types/v1/genesis.go b/x/gov/types/v1/genesis.go index 0e661b4a2014..c8fefaa841db 100644 --- a/x/gov/types/v1/genesis.go +++ b/x/gov/types/v1/genesis.go @@ -2,18 +2,18 @@ package v1 import ( "errors" - "fmt" "github.com/cosmos/cosmos-sdk/codec/types" ) // NewGenesisState creates a new genesis state for the governance module -func NewGenesisState(startingProposalID uint64, dp DepositParams, vp VotingParams, tp TallyParams) *GenesisState { +func NewGenesisState(startingProposalID uint64, params Params) *GenesisState { return &GenesisState{ StartingProposalId: startingProposalID, - DepositParams: &dp, - VotingParams: &vp, - TallyParams: &tp, + Params: ¶ms, + // DepositParams: &dp, + // VotingParams: &vp, + // TallyParams: &tp, } } @@ -21,18 +21,16 @@ func NewGenesisState(startingProposalID uint64, dp DepositParams, vp VotingParam func DefaultGenesisState() *GenesisState { return NewGenesisState( DefaultStartingProposalID, - DefaultDepositParams(), - DefaultVotingParams(), - DefaultTallyParams(), + DefaultParams(), ) } // Empty returns true if a GenesisState is empty func (data GenesisState) Empty() bool { return data.StartingProposalId == 0 || - data.DepositParams == nil || - data.VotingParams == nil || - data.TallyParams == nil + data.Params == nil + // data.VotingParams == nil || + // data.TallyParams == nil } // ValidateGenesis checks if parameters are within valid ranges @@ -41,17 +39,17 @@ func ValidateGenesis(data *GenesisState) error { return errors.New("starting proposal id must be greater than 0") } - if err := validateTallyParams(*data.TallyParams); err != nil { - return fmt.Errorf("invalid tally params: %w", err) - } + // if err := validateTallyParams(*data.TallyParams); err != nil { + // return fmt.Errorf("invalid tally params: %w", err) + // } - if err := validateVotingParams(*data.VotingParams); err != nil { - return fmt.Errorf("invalid voting params: %w", err) - } + // if err := validateVotingParams(*data.VotingParams); err != nil { + // return fmt.Errorf("invalid voting params: %w", err) + // } - if err := validateDepositParams(*data.DepositParams); err != nil { - return fmt.Errorf("invalid deposit params: %w", err) - } + // if err := validateDepositParams(*data.DepositParams); err != nil { + // return fmt.Errorf("invalid deposit params: %w", err) + // } return nil } diff --git a/x/gov/types/v1/genesis.pb.go b/x/gov/types/v1/genesis.pb.go index 2d4773082e5a..a2bc06cd5ef2 100644 --- a/x/gov/types/v1/genesis.pb.go +++ b/x/gov/types/v1/genesis.pb.go @@ -32,12 +32,8 @@ type GenesisState struct { Votes []*Vote `protobuf:"bytes,3,rep,name=votes,proto3" json:"votes,omitempty"` // proposals defines all the proposals present at genesis. Proposals []*Proposal `protobuf:"bytes,4,rep,name=proposals,proto3" json:"proposals,omitempty"` - // params defines all the paramaters of related to deposit. - DepositParams *DepositParams `protobuf:"bytes,5,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"` - // params defines all the paramaters of related to voting. - VotingParams *VotingParams `protobuf:"bytes,6,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"` - // params defines all the paramaters of related to tally. - TallyParams *TallyParams `protobuf:"bytes,7,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` + // params defines all the paramaters of x/gov module. + Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -101,23 +97,9 @@ func (m *GenesisState) GetProposals() []*Proposal { return nil } -func (m *GenesisState) GetDepositParams() *DepositParams { +func (m *GenesisState) GetParams() *Params { if m != nil { - return m.DepositParams - } - return nil -} - -func (m *GenesisState) GetVotingParams() *VotingParams { - if m != nil { - return m.VotingParams - } - return nil -} - -func (m *GenesisState) GetTallyParams() *TallyParams { - if m != nil { - return m.TallyParams + return m.Params } return nil } @@ -129,29 +111,25 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1/genesis.proto", fileDescriptor_ef7cfd15e3ded621) } var fileDescriptor_ef7cfd15e3ded621 = []byte{ - // 341 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xcd, 0x4e, 0xc2, 0x40, - 0x14, 0x85, 0xa9, 0xfc, 0xa8, 0x03, 0xb8, 0x18, 0x8d, 0x34, 0x60, 0x1a, 0xe2, 0x0a, 0x63, 0x6c, - 0x05, 0xe3, 0xd2, 0xc4, 0xf8, 0x13, 0xe3, 0x8e, 0x54, 0xe3, 0xc2, 0x0d, 0x29, 0x74, 0x52, 0x1b, - 0x81, 0xdb, 0xf4, 0x5e, 0x27, 0xf2, 0x16, 0x3e, 0x80, 0x0f, 0xe4, 0x92, 0xa5, 0x4b, 0x03, 0x2f, - 0x62, 0x98, 0x69, 0x05, 0xab, 0xab, 0xc9, 0xcd, 0xf9, 0xce, 0x99, 0x93, 0x7b, 0x59, 0x63, 0x00, - 0x38, 0x02, 0x74, 0x02, 0x90, 0x8e, 0x6c, 0x3b, 0x81, 0x18, 0x0b, 0x0c, 0xd1, 0x8e, 0x62, 0x20, - 0xe0, 0x55, 0x2d, 0xda, 0x01, 0x48, 0x5b, 0xb6, 0xeb, 0xb5, 0x0c, 0x0b, 0x52, 0x73, 0xfb, 0xef, - 0x79, 0x56, 0xb9, 0xd1, 0xce, 0x3b, 0xf2, 0x48, 0xf0, 0x63, 0xb6, 0x83, 0xe4, 0xc5, 0x14, 0x8e, - 0x83, 0x5e, 0x14, 0x43, 0x04, 0xe8, 0x0d, 0x7b, 0xa1, 0x6f, 0x1a, 0x4d, 0xa3, 0x55, 0x70, 0x79, - 0xaa, 0x75, 0x13, 0xe9, 0xd6, 0xe7, 0x1d, 0xb6, 0xe1, 0x8b, 0x08, 0x30, 0x24, 0x34, 0xd7, 0x9a, - 0xf9, 0x56, 0xb9, 0xb3, 0x6b, 0xff, 0xfa, 0xdd, 0xbe, 0xd2, 0xb2, 0xfb, 0xc3, 0xf1, 0x03, 0x56, - 0x94, 0x40, 0x02, 0xcd, 0xbc, 0x32, 0x6c, 0x67, 0x0c, 0x0f, 0x40, 0xc2, 0xd5, 0x04, 0x3f, 0x65, - 0x9b, 0x69, 0x0f, 0x34, 0x0b, 0x0a, 0xaf, 0x65, 0xf0, 0xb4, 0x8c, 0xbb, 0x24, 0xf9, 0x25, 0xdb, - 0x4a, 0x7e, 0xeb, 0x45, 0x5e, 0xec, 0x8d, 0xd0, 0x2c, 0x36, 0x8d, 0x56, 0xb9, 0xb3, 0xf7, 0x7f, - 0xb7, 0xae, 0x62, 0xdc, 0xaa, 0xbf, 0x3a, 0xf2, 0x73, 0x56, 0x95, 0xa0, 0x57, 0xa1, 0x33, 0x4a, - 0x2a, 0xa3, 0xf1, 0xb7, 0xee, 0x62, 0x25, 0x3a, 0xa2, 0x22, 0x57, 0x26, 0x7e, 0xc6, 0x2a, 0xe4, - 0x0d, 0x87, 0x93, 0x34, 0x60, 0x5d, 0x05, 0xd4, 0x33, 0x01, 0xf7, 0x0b, 0x24, 0xf1, 0x97, 0x69, - 0x39, 0x5c, 0x5c, 0x7f, 0xcc, 0x2c, 0x63, 0x3a, 0xb3, 0x8c, 0xaf, 0x99, 0x65, 0xbc, 0xcd, 0xad, - 0xdc, 0x74, 0x6e, 0xe5, 0x3e, 0xe7, 0x56, 0xee, 0xf1, 0x30, 0x08, 0xe9, 0xe9, 0xa5, 0x6f, 0x0f, - 0x60, 0xe4, 0x24, 0xc7, 0xd5, 0xcf, 0x11, 0xfa, 0xcf, 0xce, 0xab, 0xba, 0x34, 0x4d, 0x22, 0x81, - 0x8e, 0x6c, 0xf7, 0x4b, 0xea, 0xd8, 0x27, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf3, 0xec, 0x74, - 0x03, 0x33, 0x02, 0x00, 0x00, + // 284 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0xcd, 0x4a, 0xc4, 0x30, + 0x14, 0x46, 0x27, 0xf3, 0x87, 0x66, 0x74, 0x13, 0x7f, 0xa6, 0x28, 0x84, 0xc1, 0xd5, 0x88, 0x4c, + 0x62, 0x2b, 0xbe, 0x80, 0x28, 0xe2, 0x4e, 0x2a, 0xb8, 0x70, 0x33, 0x74, 0xa6, 0xa1, 0x16, 0xed, + 0xdc, 0xd0, 0x1b, 0x83, 0x3e, 0x80, 0x7b, 0x1f, 0xcb, 0xe5, 0x2c, 0x5d, 0x4a, 0xfb, 0x22, 0x42, + 0xd3, 0x2a, 0x76, 0x95, 0xc5, 0x39, 0x87, 0x5c, 0x3e, 0x7a, 0xb8, 0x04, 0xcc, 0x00, 0x65, 0x02, + 0x56, 0x5a, 0x5f, 0x26, 0x6a, 0xa5, 0x30, 0x45, 0xa1, 0x73, 0x30, 0xc0, 0xb6, 0x1d, 0x14, 0x09, + 0x58, 0x61, 0xfd, 0x83, 0x71, 0xcb, 0x05, 0xeb, 0xbc, 0xa3, 0xf7, 0x2e, 0xdd, 0xba, 0x76, 0xe5, + 0x9d, 0x89, 0x8c, 0x62, 0xa7, 0x74, 0x17, 0x4d, 0x94, 0x9b, 0x74, 0x95, 0xcc, 0x75, 0x0e, 0x1a, + 0x30, 0x7a, 0x9e, 0xa7, 0xb1, 0x47, 0x26, 0x64, 0xda, 0x0f, 0x59, 0xc3, 0x6e, 0x6b, 0x74, 0x13, + 0xb3, 0x80, 0x6e, 0xc4, 0x4a, 0x03, 0xa6, 0x06, 0xbd, 0xee, 0xa4, 0x37, 0x1d, 0x05, 0xfb, 0xe2, + 0xdf, 0xef, 0xe2, 0xd2, 0xe1, 0xf0, 0xd7, 0x63, 0xc7, 0x74, 0x60, 0xc1, 0x28, 0xf4, 0x7a, 0x55, + 0xb0, 0xd3, 0x0a, 0xee, 0xc1, 0xa8, 0xd0, 0x19, 0xec, 0x9c, 0x6e, 0x36, 0x77, 0xa0, 0xd7, 0xaf, + 0xf4, 0x71, 0x4b, 0x6f, 0x8e, 0x09, 0xff, 0x4c, 0x36, 0xa3, 0x43, 0x1d, 0xe5, 0x51, 0x86, 0xde, + 0x60, 0x42, 0xa6, 0xa3, 0x60, 0xaf, 0xdd, 0x54, 0x30, 0xac, 0xa5, 0x8b, 0xab, 0xcf, 0x82, 0x93, + 0x75, 0xc1, 0xc9, 0x77, 0xc1, 0xc9, 0x47, 0xc9, 0x3b, 0xeb, 0x92, 0x77, 0xbe, 0x4a, 0xde, 0x79, + 0x38, 0x49, 0x52, 0xf3, 0xf8, 0xb2, 0x10, 0x4b, 0xc8, 0x64, 0xbd, 0xa2, 0x7b, 0x66, 0x18, 0x3f, + 0xc9, 0xd7, 0x6a, 0x52, 0xf3, 0xa6, 0x15, 0x4a, 0xeb, 0x2f, 0x86, 0xd5, 0xaa, 0x67, 0x3f, 0x01, + 0x00, 0x00, 0xff, 0xff, 0x06, 0x05, 0xbf, 0x43, 0x9c, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -174,33 +152,9 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.TallyParams != nil { - { - size, err := m.TallyParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.VotingParams != nil { + if m.Params != nil { { - size, err := m.VotingParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.DepositParams != nil { - { - size, err := m.DepositParams.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -298,16 +252,8 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } - if m.DepositParams != nil { - l = m.DepositParams.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - if m.VotingParams != nil { - l = m.VotingParams.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - if m.TallyParams != nil { - l = m.TallyParams.Size() + if m.Params != nil { + l = m.Params.Size() n += 1 + l + sovGenesis(uint64(l)) } return n @@ -471,79 +417,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DepositParams == nil { - m.DepositParams = &DepositParams{} - } - if err := m.DepositParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VotingParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.VotingParams == nil { - m.VotingParams = &VotingParams{} - } - if err := m.VotingParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TallyParams", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -570,10 +444,10 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TallyParams == nil { - m.TallyParams = &TallyParams{} + if m.Params == nil { + m.Params = &Params{} } - if err := m.TallyParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/gov/types/v1/genesis_test.go b/x/gov/types/v1/genesis_test.go index 16b90087833f..27ee1380d332 100644 --- a/x/gov/types/v1/genesis_test.go +++ b/x/gov/types/v1/genesis_test.go @@ -1,85 +1,85 @@ package v1_test -import ( - "testing" +// import ( +// "testing" - v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - "github.com/stretchr/testify/require" -) +// v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" +// "github.com/stretchr/testify/require" +// ) -func TestEmptyGenesis(t *testing.T) { - state1 := v1.GenesisState{} - require.True(t, state1.Empty()) +// func TestEmptyGenesis(t *testing.T) { +// state1 := v1.GenesisState{} +// require.True(t, state1.Empty()) - state2 := v1.DefaultGenesisState() - require.False(t, state2.Empty()) -} +// state2 := v1.DefaultGenesisState() +// require.False(t, state2.Empty()) +// } -func TestValidateGenesis(t *testing.T) { - depositParams := v1.DefaultDepositParams() - votingParams := v1.DefaultVotingParams() - tallyParams := v1.DefaultTallyParams() +// func TestValidateGenesis(t *testing.T) { +// depositParams := v1.DefaultDepositParams() +// votingParams := v1.DefaultVotingParams() +// tallyParams := v1.DefaultTallyParams() - testCases := []struct { - name string - genesisState *v1.GenesisState - expErr bool - }{ - { - name: "valid", - genesisState: v1.DefaultGenesisState(), - }, - { - name: "invalid StartingProposalId", - genesisState: &v1.GenesisState{ - StartingProposalId: 0, - DepositParams: &depositParams, - VotingParams: &votingParams, - TallyParams: &tallyParams, - }, - expErr: true, - }, - { - name: "invalid TallyParams", - genesisState: &v1.GenesisState{ - StartingProposalId: v1.DefaultStartingProposalID, - DepositParams: &depositParams, - VotingParams: &votingParams, - TallyParams: &v1.TallyParams{}, - }, - expErr: true, - }, - { - name: "invalid VotingParams", - genesisState: &v1.GenesisState{ - StartingProposalId: v1.DefaultStartingProposalID, - DepositParams: &depositParams, - VotingParams: &v1.VotingParams{}, - TallyParams: &tallyParams, - }, - expErr: true, - }, - { - name: "invalid DepositParams", - genesisState: &v1.GenesisState{ - StartingProposalId: v1.DefaultStartingProposalID, - DepositParams: &v1.DepositParams{}, - VotingParams: &votingParams, - TallyParams: &tallyParams, - }, - expErr: true, - }, - } +// testCases := []struct { +// name string +// genesisState *v1.GenesisState +// expErr bool +// }{ +// { +// name: "valid", +// genesisState: v1.DefaultGenesisState(), +// }, +// { +// name: "invalid StartingProposalId", +// genesisState: &v1.GenesisState{ +// StartingProposalId: 0, +// DepositParams: &depositParams, +// VotingParams: &votingParams, +// TallyParams: &tallyParams, +// }, +// expErr: true, +// }, +// { +// name: "invalid TallyParams", +// genesisState: &v1.GenesisState{ +// StartingProposalId: v1.DefaultStartingProposalID, +// DepositParams: &depositParams, +// VotingParams: &votingParams, +// TallyParams: &v1.TallyParams{}, +// }, +// expErr: true, +// }, +// { +// name: "invalid VotingParams", +// genesisState: &v1.GenesisState{ +// StartingProposalId: v1.DefaultStartingProposalID, +// DepositParams: &depositParams, +// VotingParams: &v1.VotingParams{}, +// TallyParams: &tallyParams, +// }, +// expErr: true, +// }, +// { +// name: "invalid DepositParams", +// genesisState: &v1.GenesisState{ +// StartingProposalId: v1.DefaultStartingProposalID, +// DepositParams: &v1.DepositParams{}, +// VotingParams: &votingParams, +// TallyParams: &tallyParams, +// }, +// expErr: true, +// }, +// } - for _, tc := range testCases { - tc := tc - t.Run(tc.name, func(t *testing.T) { - err := v1.ValidateGenesis(tc.genesisState) - if tc.expErr { - require.Error(t, err) - } else { - require.NoError(t, err) - } - }) - } -} +// for _, tc := range testCases { +// tc := tc +// t.Run(tc.name, func(t *testing.T) { +// err := v1.ValidateGenesis(tc.genesisState) +// if tc.expErr { +// require.Error(t, err) +// } else { +// require.NoError(t, err) +// } +// }) +// } +// } diff --git a/x/gov/types/v1/gov.pb.go b/x/gov/types/v1/gov.pb.go index 36b207454fff..8d20909c613e 100644 --- a/x/gov/types/v1/gov.pb.go +++ b/x/gov/types/v1/gov.pb.go @@ -664,6 +664,100 @@ func (m *TallyParams) GetVetoThreshold() string { return "" } +// Params defines the parameters for the x/gov module. +type Params struct { + // Minimum deposit for a proposal to enter voting period. + MinDeposit []types.Coin `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3" json:"min_deposit,omitempty"` + // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + // months. + MaxDepositPeriod *time.Duration `protobuf:"bytes,2,opt,name=max_deposit_period,json=maxDepositPeriod,proto3,stdduration" json:"max_deposit_period,omitempty"` + // Length of the voting period. + VotingPeriod *time.Duration `protobuf:"bytes,3,opt,name=voting_period,json=votingPeriod,proto3,stdduration" json:"voting_period,omitempty"` + // Minimum percentage of total stake needed to vote for a result to be + // considered valid. + Quorum string `protobuf:"bytes,4,opt,name=quorum,proto3" json:"quorum,omitempty"` + // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. + Threshold string `protobuf:"bytes,5,opt,name=threshold,proto3" json:"threshold,omitempty"` + // Minimum value of Veto votes to Total votes ratio for proposal to be + // vetoed. Default value: 1/3. + VetoThreshold string `protobuf:"bytes,6,opt,name=veto_threshold,json=vetoThreshold,proto3" json:"veto_threshold,omitempty"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_e05cb1c0d030febb, []int{8} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetMinDeposit() []types.Coin { + if m != nil { + return m.MinDeposit + } + return nil +} + +func (m *Params) GetMaxDepositPeriod() *time.Duration { + if m != nil { + return m.MaxDepositPeriod + } + return nil +} + +func (m *Params) GetVotingPeriod() *time.Duration { + if m != nil { + return m.VotingPeriod + } + return nil +} + +func (m *Params) GetQuorum() string { + if m != nil { + return m.Quorum + } + return "" +} + +func (m *Params) GetThreshold() string { + if m != nil { + return m.Threshold + } + return "" +} + +func (m *Params) GetVetoThreshold() string { + if m != nil { + return m.VetoThreshold + } + return "" +} + func init() { proto.RegisterEnum("cosmos.gov.v1.VoteOption", VoteOption_name, VoteOption_value) proto.RegisterEnum("cosmos.gov.v1.ProposalStatus", ProposalStatus_name, ProposalStatus_value) @@ -675,81 +769,85 @@ func init() { proto.RegisterType((*DepositParams)(nil), "cosmos.gov.v1.DepositParams") proto.RegisterType((*VotingParams)(nil), "cosmos.gov.v1.VotingParams") proto.RegisterType((*TallyParams)(nil), "cosmos.gov.v1.TallyParams") + proto.RegisterType((*Params)(nil), "cosmos.gov.v1.Params") } func init() { proto.RegisterFile("cosmos/gov/v1/gov.proto", fileDescriptor_e05cb1c0d030febb) } var fileDescriptor_e05cb1c0d030febb = []byte{ - // 1104 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0x4f, 0x53, 0xdb, 0x46, - 0x14, 0x47, 0xb6, 0x30, 0xe6, 0x19, 0x1b, 0x75, 0xa1, 0x45, 0x90, 0x60, 0x13, 0x4f, 0xdb, 0xa1, - 0xa4, 0xd8, 0x25, 0x99, 0xb6, 0x33, 0xcd, 0xc9, 0xc6, 0x4a, 0x31, 0xc3, 0x60, 0x57, 0x52, 0xcc, - 0xa4, 0x17, 0x8d, 0x8c, 0x14, 0x5b, 0x53, 0x4b, 0xeb, 0x6a, 0xd7, 0x0e, 0xfe, 0x08, 0xbd, 0xe5, - 0xd8, 0x99, 0x7e, 0x8d, 0x4c, 0x3f, 0x43, 0x4e, 0x9d, 0x4c, 0x0e, 0xfd, 0x73, 0x71, 0x5b, 0xb8, - 0xf1, 0x29, 0x32, 0x5a, 0xad, 0xb0, 0x2d, 0xc8, 0xc0, 0x49, 0xd2, 0x7b, 0xbf, 0xdf, 0xef, 0xbd, - 0xdd, 0xf7, 0xd3, 0x4a, 0xb0, 0x76, 0x8a, 0x89, 0x8b, 0x49, 0xb9, 0x83, 0x87, 0xe5, 0xe1, 0x5e, - 0x70, 0x29, 0xf5, 0x7d, 0x4c, 0x31, 0xca, 0x86, 0x89, 0x52, 0x10, 0x19, 0xee, 0x6d, 0xe4, 0x39, - 0xae, 0x6d, 0x12, 0xbb, 0x3c, 0xdc, 0x6b, 0xdb, 0xd4, 0xdc, 0x2b, 0x9f, 0x62, 0xc7, 0x0b, 0xe1, - 0x1b, 0xab, 0x1d, 0xdc, 0xc1, 0xec, 0xb6, 0x1c, 0xdc, 0xf1, 0x68, 0xa1, 0x83, 0x71, 0xa7, 0x67, - 0x97, 0xd9, 0x53, 0x7b, 0xf0, 0xa2, 0x4c, 0x1d, 0xd7, 0x26, 0xd4, 0x74, 0xfb, 0x1c, 0xb0, 0x1e, - 0x07, 0x98, 0xde, 0x88, 0xa7, 0xf2, 0xf1, 0x94, 0x35, 0xf0, 0x4d, 0xea, 0xe0, 0xa8, 0xe2, 0x7a, - 0xd8, 0x91, 0x11, 0x16, 0xe5, 0xdd, 0xb2, 0x87, 0x22, 0x06, 0x74, 0x62, 0x3b, 0x9d, 0x2e, 0xb5, - 0xad, 0x16, 0xa6, 0x76, 0xa3, 0x1f, 0xd0, 0xd0, 0x1e, 0xa4, 0x30, 0xbb, 0x93, 0x85, 0x2d, 0x61, - 0x3b, 0xf7, 0x68, 0xbd, 0x34, 0xb3, 0xc4, 0xd2, 0x04, 0xaa, 0x72, 0x20, 0xfa, 0x1c, 0x52, 0x2f, - 0x99, 0x90, 0x9c, 0xd8, 0x12, 0xb6, 0x17, 0xab, 0xb9, 0x77, 0xaf, 0x77, 0x81, 0xb3, 0x6a, 0xf6, - 0xa9, 0xca, 0xb3, 0xc5, 0xdf, 0x04, 0x58, 0xa8, 0xd9, 0x7d, 0x4c, 0x1c, 0x8a, 0x0a, 0x90, 0xe9, - 0xfb, 0xb8, 0x8f, 0x89, 0xd9, 0x33, 0x1c, 0x8b, 0xd5, 0x12, 0x55, 0x88, 0x42, 0x75, 0x0b, 0x7d, - 0x03, 0x8b, 0x56, 0x88, 0xc5, 0x3e, 0xd7, 0x95, 0xdf, 0xbd, 0xde, 0x5d, 0xe5, 0xba, 0x15, 0xcb, - 0xf2, 0x6d, 0x42, 0x34, 0xea, 0x3b, 0x5e, 0x47, 0x9d, 0x40, 0xd1, 0xb7, 0x90, 0x32, 0x5d, 0x3c, - 0xf0, 0xa8, 0x9c, 0xdc, 0x4a, 0x6e, 0x67, 0x26, 0xfd, 0x07, 0x33, 0x29, 0xf1, 0x99, 0x94, 0xf6, - 0xb1, 0xe3, 0x55, 0xc5, 0x37, 0xe3, 0xc2, 0x9c, 0xca, 0xe1, 0xc5, 0x3f, 0x45, 0x48, 0x37, 0x79, - 0x7d, 0x94, 0x83, 0xc4, 0x55, 0x57, 0x09, 0xc7, 0x42, 0x5f, 0x41, 0xda, 0xb5, 0x09, 0x31, 0x3b, - 0x36, 0x91, 0x13, 0x4c, 0x77, 0xb5, 0x14, 0xee, 0x7c, 0x29, 0xda, 0xf9, 0x52, 0xc5, 0x1b, 0xa9, - 0x57, 0x28, 0xf4, 0x35, 0xa4, 0x08, 0x35, 0xe9, 0x80, 0xc8, 0x49, 0xb6, 0x8f, 0x9b, 0xb1, 0x7d, - 0x8c, 0x4a, 0x69, 0x0c, 0xa4, 0x72, 0x30, 0x3a, 0x00, 0xf4, 0xc2, 0xf1, 0xcc, 0x9e, 0x41, 0xcd, - 0x5e, 0x6f, 0x64, 0xf8, 0x36, 0x19, 0xf4, 0xa8, 0x2c, 0x6e, 0x09, 0xdb, 0x99, 0x47, 0x1b, 0x31, - 0x09, 0x3d, 0x80, 0xa8, 0x0c, 0xa1, 0x4a, 0x8c, 0x35, 0x15, 0x41, 0x15, 0xc8, 0x90, 0x41, 0xdb, - 0x75, 0xa8, 0x11, 0xd8, 0x49, 0x9e, 0xe7, 0x12, 0xf1, 0xae, 0xf5, 0xc8, 0x6b, 0x55, 0xf1, 0xd5, - 0xbf, 0x05, 0x41, 0x85, 0x90, 0x14, 0x84, 0xd1, 0x21, 0x48, 0x7c, 0x63, 0x0d, 0xdb, 0xb3, 0x42, - 0x9d, 0xd4, 0x1d, 0x75, 0x72, 0x9c, 0xa9, 0x78, 0x16, 0xd3, 0xaa, 0x41, 0x96, 0x62, 0x6a, 0xf6, - 0x0c, 0x1e, 0x97, 0x17, 0xee, 0x36, 0x9e, 0x25, 0xc6, 0x8a, 0x6c, 0x73, 0x04, 0x1f, 0x0d, 0x31, - 0x75, 0xbc, 0x8e, 0x41, 0xa8, 0xe9, 0xf3, 0xa5, 0xa5, 0xef, 0xd8, 0xd2, 0x72, 0x48, 0xd5, 0x02, - 0x26, 0xeb, 0xe9, 0x00, 0x78, 0x68, 0xb2, 0xbc, 0xc5, 0x3b, 0x6a, 0x65, 0x43, 0x62, 0xb4, 0xba, - 0x8d, 0xc0, 0x1f, 0xd4, 0xb4, 0x4c, 0x6a, 0xca, 0x10, 0x98, 0x55, 0xbd, 0x7a, 0x2e, 0xfe, 0x25, - 0x40, 0x66, 0x7a, 0x30, 0x0f, 0x61, 0x71, 0x64, 0x13, 0xe3, 0x94, 0x99, 0x54, 0xb8, 0xf6, 0xc6, - 0xd4, 0x3d, 0xaa, 0xa6, 0x47, 0x36, 0xd9, 0x0f, 0xf2, 0xe8, 0x31, 0x64, 0xcd, 0x36, 0xa1, 0xa6, - 0xe3, 0x71, 0x42, 0xe2, 0x46, 0xc2, 0x12, 0x07, 0x85, 0xa4, 0x2f, 0x20, 0xed, 0x61, 0x8e, 0x4f, - 0xde, 0x88, 0x5f, 0xf0, 0x70, 0x08, 0x7d, 0x02, 0xc8, 0xc3, 0xc6, 0x4b, 0x87, 0x76, 0x8d, 0xa1, - 0x4d, 0x23, 0x92, 0x78, 0x23, 0x69, 0xd9, 0xc3, 0x27, 0x0e, 0xed, 0xb6, 0x6c, 0x1a, 0x92, 0x8b, - 0xbf, 0x0b, 0x20, 0x06, 0xe7, 0xc1, 0xed, 0x6f, 0x73, 0x09, 0xe6, 0x87, 0x98, 0xda, 0xb7, 0xbf, - 0xc9, 0x21, 0x0c, 0x3d, 0x81, 0x85, 0xf0, 0x70, 0x21, 0xb2, 0xc8, 0x7c, 0xf2, 0x20, 0xe6, 0xfd, - 0xeb, 0x27, 0x97, 0x1a, 0x31, 0x66, 0x86, 0x31, 0x3f, 0x3b, 0x8c, 0x43, 0x31, 0x9d, 0x94, 0xc4, - 0xe2, 0x3f, 0x02, 0x64, 0xb9, 0xa5, 0x9a, 0xa6, 0x6f, 0xba, 0x04, 0x3d, 0x87, 0x8c, 0xeb, 0x78, - 0x57, 0xe6, 0x14, 0x6e, 0x33, 0xe7, 0x66, 0x60, 0xce, 0xcb, 0x71, 0xe1, 0xe3, 0x29, 0xd6, 0x97, - 0xd8, 0x75, 0xa8, 0xed, 0xf6, 0xe9, 0x48, 0x05, 0xd7, 0xf1, 0x22, 0xcf, 0xba, 0x80, 0x5c, 0xf3, - 0x2c, 0x02, 0x19, 0x7d, 0xdb, 0x77, 0xb0, 0xc5, 0x36, 0x22, 0xa8, 0x10, 0x37, 0x5a, 0x8d, 0x9f, - 0xdf, 0xd5, 0x4f, 0x2f, 0xc7, 0x85, 0xfb, 0xd7, 0x89, 0x93, 0x22, 0xbf, 0x06, 0x3e, 0x94, 0x5c, - 0xf3, 0x2c, 0x5a, 0x09, 0xcb, 0x17, 0x75, 0x58, 0x6a, 0x31, 0x6f, 0xf2, 0x95, 0xd5, 0x80, 0x7b, - 0x35, 0xaa, 0x2c, 0xdc, 0x56, 0x59, 0x64, 0xca, 0x4b, 0x21, 0x8b, 0xab, 0xfe, 0x1f, 0x99, 0x98, - 0xab, 0x7e, 0x07, 0xa9, 0x9f, 0x07, 0xd8, 0x1f, 0xb8, 0xdc, 0xc1, 0xc5, 0xcb, 0x71, 0x41, 0x0a, - 0x23, 0x93, 0x0e, 0xe3, 0xdf, 0x81, 0x30, 0x8f, 0xf6, 0x61, 0x91, 0x76, 0x7d, 0x9b, 0x74, 0x71, - 0xcf, 0xe2, 0x86, 0xf8, 0xec, 0x72, 0x5c, 0x58, 0xb9, 0x0a, 0x7e, 0x50, 0x61, 0xc2, 0x43, 0x3f, - 0x40, 0x8e, 0x19, 0x76, 0xa2, 0x14, 0x3a, 0x7d, 0xe7, 0x72, 0x5c, 0x90, 0x67, 0x33, 0x1f, 0x94, - 0xcb, 0x06, 0x38, 0x3d, 0x82, 0xed, 0xfc, 0x22, 0x00, 0x4c, 0x7d, 0x09, 0xef, 0xc1, 0x5a, 0xab, - 0xa1, 0x2b, 0x46, 0xa3, 0xa9, 0xd7, 0x1b, 0xc7, 0xc6, 0xb3, 0x63, 0xad, 0xa9, 0xec, 0xd7, 0x9f, - 0xd6, 0x95, 0x9a, 0x34, 0x87, 0x56, 0x60, 0x79, 0x3a, 0xf9, 0x5c, 0xd1, 0x24, 0x01, 0xad, 0xc1, - 0xca, 0x74, 0xb0, 0x52, 0xd5, 0xf4, 0x4a, 0xfd, 0x58, 0x4a, 0x20, 0x04, 0xb9, 0xe9, 0xc4, 0x71, - 0x43, 0x4a, 0xa2, 0xfb, 0x20, 0xcf, 0xc6, 0x8c, 0x93, 0xba, 0x7e, 0x60, 0xb4, 0x14, 0xbd, 0x21, - 0x89, 0x3b, 0x7f, 0x08, 0x90, 0x9b, 0xfd, 0x44, 0xa0, 0x02, 0xdc, 0x6b, 0xaa, 0x8d, 0x66, 0x43, - 0xab, 0x1c, 0x19, 0x9a, 0x5e, 0xd1, 0x9f, 0x69, 0xb1, 0x9e, 0x8a, 0x90, 0x8f, 0x03, 0x6a, 0x4a, - 0xb3, 0xa1, 0xd5, 0x75, 0xa3, 0xa9, 0xa8, 0xf5, 0x46, 0x4d, 0x12, 0xd0, 0x03, 0xd8, 0x8c, 0x63, - 0x5a, 0x0d, 0xbd, 0x7e, 0xfc, 0x7d, 0x04, 0x49, 0xa0, 0x0d, 0xf8, 0x24, 0x0e, 0x69, 0x56, 0x34, - 0x4d, 0xa9, 0x85, 0x4d, 0xc7, 0x73, 0xaa, 0x72, 0xa8, 0xec, 0xeb, 0x4a, 0x4d, 0x12, 0x6f, 0x62, - 0x3e, 0xad, 0xd4, 0x8f, 0x94, 0x9a, 0x34, 0x5f, 0x55, 0xde, 0x9c, 0xe7, 0x85, 0xb7, 0xe7, 0x79, - 0xe1, 0xbf, 0xf3, 0xbc, 0xf0, 0xea, 0x22, 0x3f, 0xf7, 0xf6, 0x22, 0x3f, 0xf7, 0xf7, 0x45, 0x7e, - 0xee, 0xc7, 0x87, 0x1d, 0x87, 0x76, 0x07, 0xed, 0xd2, 0x29, 0x76, 0xf9, 0x0f, 0x0a, 0xbf, 0xec, - 0x12, 0xeb, 0xa7, 0xf2, 0x19, 0xfb, 0xe9, 0xa2, 0xa3, 0xbe, 0x4d, 0x82, 0x3f, 0xaa, 0x14, 0xb3, - 0xeb, 0xe3, 0xf7, 0x01, 0x00, 0x00, 0xff, 0xff, 0x73, 0xa8, 0x09, 0x8c, 0x92, 0x09, 0x00, 0x00, + // 1138 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0xcd, 0x6e, 0xdb, 0x46, + 0x17, 0x35, 0x25, 0x5a, 0x96, 0xaf, 0x2c, 0x85, 0xdf, 0xc4, 0x5f, 0x4d, 0x3b, 0xb1, 0xe4, 0x08, + 0x6d, 0xe1, 0x3a, 0xb5, 0x54, 0x27, 0x68, 0x0b, 0x34, 0x2b, 0xc9, 0x62, 0x6a, 0x19, 0x86, 0xa5, + 0x92, 0x8c, 0x8c, 0x74, 0x43, 0x50, 0x26, 0x23, 0x11, 0x15, 0x39, 0x2a, 0x67, 0xa4, 0x58, 0x8f, + 0xd0, 0x5d, 0x96, 0x05, 0xfa, 0x1a, 0x41, 0x9f, 0x21, 0xab, 0x22, 0xc8, 0xa2, 0x3f, 0x1b, 0xb5, + 0xb5, 0x77, 0x46, 0x1f, 0xa2, 0xe0, 0x70, 0x68, 0x49, 0xb4, 0x03, 0x1b, 0x4d, 0x57, 0x5d, 0x89, + 0xbc, 0xf7, 0x9c, 0x73, 0xef, 0xcc, 0x3d, 0x1c, 0x0d, 0xac, 0x1c, 0x63, 0xe2, 0x62, 0x52, 0xee, + 0xe0, 0x61, 0x79, 0xb8, 0x13, 0xfc, 0x94, 0xfa, 0x3e, 0xa6, 0x18, 0x65, 0xc3, 0x44, 0x29, 0x88, + 0x0c, 0x77, 0xd6, 0xf2, 0x1c, 0xd7, 0x36, 0x89, 0x5d, 0x1e, 0xee, 0xb4, 0x6d, 0x6a, 0xee, 0x94, + 0x8f, 0xb1, 0xe3, 0x85, 0xf0, 0xb5, 0xe5, 0x0e, 0xee, 0x60, 0xf6, 0x58, 0x0e, 0x9e, 0x78, 0xb4, + 0xd0, 0xc1, 0xb8, 0xd3, 0xb3, 0xcb, 0xec, 0xad, 0x3d, 0x78, 0x56, 0xa6, 0x8e, 0x6b, 0x13, 0x6a, + 0xba, 0x7d, 0x0e, 0x58, 0x8d, 0x03, 0x4c, 0x6f, 0xc4, 0x53, 0xf9, 0x78, 0xca, 0x1a, 0xf8, 0x26, + 0x75, 0x70, 0x54, 0x71, 0x35, 0xec, 0xc8, 0x08, 0x8b, 0xf2, 0x6e, 0xd9, 0x4b, 0x11, 0x03, 0x3a, + 0xb2, 0x9d, 0x4e, 0x97, 0xda, 0x56, 0x0b, 0x53, 0xbb, 0xd1, 0x0f, 0x68, 0x68, 0x07, 0x52, 0x98, + 0x3d, 0xc9, 0xc2, 0x86, 0xb0, 0x99, 0x7b, 0xb0, 0x5a, 0x9a, 0x59, 0x62, 0x69, 0x02, 0x55, 0x39, + 0x10, 0x7d, 0x08, 0xa9, 0xe7, 0x4c, 0x48, 0x4e, 0x6c, 0x08, 0x9b, 0x8b, 0xd5, 0xdc, 0x9b, 0x97, + 0xdb, 0xc0, 0x59, 0x35, 0xfb, 0x58, 0xe5, 0xd9, 0xe2, 0x0f, 0x02, 0x2c, 0xd4, 0xec, 0x3e, 0x26, + 0x0e, 0x45, 0x05, 0xc8, 0xf4, 0x7d, 0xdc, 0xc7, 0xc4, 0xec, 0x19, 0x8e, 0xc5, 0x6a, 0x89, 0x2a, + 0x44, 0xa1, 0xba, 0x85, 0x3e, 0x83, 0x45, 0x2b, 0xc4, 0x62, 0x9f, 0xeb, 0xca, 0x6f, 0x5e, 0x6e, + 0x2f, 0x73, 0xdd, 0x8a, 0x65, 0xf9, 0x36, 0x21, 0x1a, 0xf5, 0x1d, 0xaf, 0xa3, 0x4e, 0xa0, 0xe8, + 0x73, 0x48, 0x99, 0x2e, 0x1e, 0x78, 0x54, 0x4e, 0x6e, 0x24, 0x37, 0x33, 0x93, 0xfe, 0x83, 0x99, + 0x94, 0xf8, 0x4c, 0x4a, 0xbb, 0xd8, 0xf1, 0xaa, 0xe2, 0xab, 0x71, 0x61, 0x4e, 0xe5, 0xf0, 0xe2, + 0xcf, 0x22, 0xa4, 0x9b, 0xbc, 0x3e, 0xca, 0x41, 0xe2, 0xa2, 0xab, 0x84, 0x63, 0xa1, 0x4f, 0x20, + 0xed, 0xda, 0x84, 0x98, 0x1d, 0x9b, 0xc8, 0x09, 0xa6, 0xbb, 0x5c, 0x0a, 0x77, 0xbe, 0x14, 0xed, + 0x7c, 0xa9, 0xe2, 0x8d, 0xd4, 0x0b, 0x14, 0xfa, 0x14, 0x52, 0x84, 0x9a, 0x74, 0x40, 0xe4, 0x24, + 0xdb, 0xc7, 0xf5, 0xd8, 0x3e, 0x46, 0xa5, 0x34, 0x06, 0x52, 0x39, 0x18, 0xed, 0x01, 0x7a, 0xe6, + 0x78, 0x66, 0xcf, 0xa0, 0x66, 0xaf, 0x37, 0x32, 0x7c, 0x9b, 0x0c, 0x7a, 0x54, 0x16, 0x37, 0x84, + 0xcd, 0xcc, 0x83, 0xb5, 0x98, 0x84, 0x1e, 0x40, 0x54, 0x86, 0x50, 0x25, 0xc6, 0x9a, 0x8a, 0xa0, + 0x0a, 0x64, 0xc8, 0xa0, 0xed, 0x3a, 0xd4, 0x08, 0xec, 0x24, 0xcf, 0x73, 0x89, 0x78, 0xd7, 0x7a, + 0xe4, 0xb5, 0xaa, 0xf8, 0xe2, 0xf7, 0x82, 0xa0, 0x42, 0x48, 0x0a, 0xc2, 0x68, 0x1f, 0x24, 0xbe, + 0xb1, 0x86, 0xed, 0x59, 0xa1, 0x4e, 0xea, 0x86, 0x3a, 0x39, 0xce, 0x54, 0x3c, 0x8b, 0x69, 0xd5, + 0x20, 0x4b, 0x31, 0x35, 0x7b, 0x06, 0x8f, 0xcb, 0x0b, 0x37, 0x1b, 0xcf, 0x12, 0x63, 0x45, 0xb6, + 0x39, 0x80, 0xff, 0x0d, 0x31, 0x75, 0xbc, 0x8e, 0x41, 0xa8, 0xe9, 0xf3, 0xa5, 0xa5, 0x6f, 0xd8, + 0xd2, 0xad, 0x90, 0xaa, 0x05, 0x4c, 0xd6, 0xd3, 0x1e, 0xf0, 0xd0, 0x64, 0x79, 0x8b, 0x37, 0xd4, + 0xca, 0x86, 0xc4, 0x68, 0x75, 0x6b, 0x81, 0x3f, 0xa8, 0x69, 0x99, 0xd4, 0x94, 0x21, 0x30, 0xab, + 0x7a, 0xf1, 0x5e, 0xfc, 0x45, 0x80, 0xcc, 0xf4, 0x60, 0xee, 0xc3, 0xe2, 0xc8, 0x26, 0xc6, 0x31, + 0x33, 0xa9, 0x70, 0xe9, 0x8b, 0xa9, 0x7b, 0x54, 0x4d, 0x8f, 0x6c, 0xb2, 0x1b, 0xe4, 0xd1, 0x43, + 0xc8, 0x9a, 0x6d, 0x42, 0x4d, 0xc7, 0xe3, 0x84, 0xc4, 0x95, 0x84, 0x25, 0x0e, 0x0a, 0x49, 0x1f, + 0x41, 0xda, 0xc3, 0x1c, 0x9f, 0xbc, 0x12, 0xbf, 0xe0, 0xe1, 0x10, 0xfa, 0x08, 0x90, 0x87, 0x8d, + 0xe7, 0x0e, 0xed, 0x1a, 0x43, 0x9b, 0x46, 0x24, 0xf1, 0x4a, 0xd2, 0x2d, 0x0f, 0x1f, 0x39, 0xb4, + 0xdb, 0xb2, 0x69, 0x48, 0x2e, 0xfe, 0x28, 0x80, 0x18, 0x9c, 0x07, 0xd7, 0x7f, 0xcd, 0x25, 0x98, + 0x1f, 0x62, 0x6a, 0x5f, 0xff, 0x25, 0x87, 0x30, 0xf4, 0x08, 0x16, 0xc2, 0xc3, 0x85, 0xc8, 0x22, + 0xf3, 0xc9, 0xbd, 0x98, 0xf7, 0x2f, 0x9f, 0x5c, 0x6a, 0xc4, 0x98, 0x19, 0xc6, 0xfc, 0xec, 0x30, + 0xf6, 0xc5, 0x74, 0x52, 0x12, 0x8b, 0xbf, 0x09, 0x90, 0xe5, 0x96, 0x6a, 0x9a, 0xbe, 0xe9, 0x12, + 0xf4, 0x14, 0x32, 0xae, 0xe3, 0x5d, 0x98, 0x53, 0xb8, 0xce, 0x9c, 0xeb, 0x81, 0x39, 0xcf, 0xc7, + 0x85, 0xff, 0x4f, 0xb1, 0x3e, 0xc6, 0xae, 0x43, 0x6d, 0xb7, 0x4f, 0x47, 0x2a, 0xb8, 0x8e, 0x17, + 0x79, 0xd6, 0x05, 0xe4, 0x9a, 0x27, 0x11, 0xc8, 0xe8, 0xdb, 0xbe, 0x83, 0x2d, 0xb6, 0x11, 0x41, + 0x85, 0xb8, 0xd1, 0x6a, 0xfc, 0xfc, 0xae, 0xbe, 0x7f, 0x3e, 0x2e, 0xdc, 0xbd, 0x4c, 0x9c, 0x14, + 0xf9, 0x3e, 0xf0, 0xa1, 0xe4, 0x9a, 0x27, 0xd1, 0x4a, 0x58, 0xbe, 0xa8, 0xc3, 0x52, 0x8b, 0x79, + 0x93, 0xaf, 0xac, 0x06, 0xdc, 0xab, 0x51, 0x65, 0xe1, 0xba, 0xca, 0x22, 0x53, 0x5e, 0x0a, 0x59, + 0x5c, 0xf5, 0xcf, 0xc8, 0xc4, 0x5c, 0xf5, 0x0b, 0x48, 0x7d, 0x3b, 0xc0, 0xfe, 0xc0, 0xe5, 0x0e, + 0x2e, 0x9e, 0x8f, 0x0b, 0x52, 0x18, 0x99, 0x74, 0x18, 0xff, 0x1f, 0x08, 0xf3, 0x68, 0x17, 0x16, + 0x69, 0xd7, 0xb7, 0x49, 0x17, 0xf7, 0x2c, 0x6e, 0x88, 0x0f, 0xce, 0xc7, 0x85, 0xdb, 0x17, 0xc1, + 0xb7, 0x2a, 0x4c, 0x78, 0xe8, 0x2b, 0xc8, 0x31, 0xc3, 0x4e, 0x94, 0x42, 0xa7, 0x6f, 0x9d, 0x8f, + 0x0b, 0xf2, 0x6c, 0xe6, 0xad, 0x72, 0xd9, 0x00, 0xa7, 0x47, 0xb0, 0xe2, 0x5f, 0x49, 0x48, 0xfd, + 0xd7, 0xec, 0x70, 0x79, 0xfc, 0xc9, 0x7f, 0x30, 0xfe, 0xa9, 0x71, 0x8b, 0xef, 0x36, 0xee, 0xf9, + 0x7f, 0x6d, 0xdc, 0xa9, 0x77, 0x1c, 0xf7, 0xd6, 0x77, 0x02, 0xc0, 0xd4, 0xc5, 0xe7, 0x0e, 0xac, + 0xb4, 0x1a, 0xba, 0x62, 0x34, 0x9a, 0x7a, 0xbd, 0x71, 0x68, 0x3c, 0x39, 0xd4, 0x9a, 0xca, 0x6e, + 0xfd, 0x71, 0x5d, 0xa9, 0x49, 0x73, 0xe8, 0x36, 0xdc, 0x9a, 0x4e, 0x3e, 0x55, 0x34, 0x49, 0x40, + 0x2b, 0x70, 0x7b, 0x3a, 0x58, 0xa9, 0x6a, 0x7a, 0xa5, 0x7e, 0x28, 0x25, 0x10, 0x82, 0xdc, 0x74, + 0xe2, 0xb0, 0x21, 0x25, 0xd1, 0x5d, 0x90, 0x67, 0x63, 0xc6, 0x51, 0x5d, 0xdf, 0x33, 0x5a, 0x8a, + 0xde, 0x90, 0xc4, 0xad, 0x9f, 0x04, 0xc8, 0xcd, 0xde, 0x08, 0x50, 0x01, 0xee, 0x34, 0xd5, 0x46, + 0xb3, 0xa1, 0x55, 0x0e, 0x0c, 0x4d, 0xaf, 0xe8, 0x4f, 0xb4, 0x58, 0x4f, 0x45, 0xc8, 0xc7, 0x01, + 0x35, 0xa5, 0xd9, 0xd0, 0xea, 0xba, 0xd1, 0x54, 0xd4, 0x7a, 0xa3, 0x26, 0x09, 0xe8, 0x1e, 0xac, + 0xc7, 0x31, 0xad, 0x86, 0x5e, 0x3f, 0xfc, 0x32, 0x82, 0x24, 0xd0, 0x1a, 0xbc, 0x17, 0x87, 0x34, + 0x2b, 0x9a, 0xa6, 0xd4, 0xc2, 0xa6, 0xe3, 0x39, 0x55, 0xd9, 0x57, 0x76, 0x75, 0xa5, 0x26, 0x89, + 0x57, 0x31, 0x1f, 0x57, 0xea, 0x07, 0x4a, 0x4d, 0x9a, 0xaf, 0x2a, 0xaf, 0x4e, 0xf3, 0xc2, 0xeb, + 0xd3, 0xbc, 0xf0, 0xc7, 0x69, 0x5e, 0x78, 0x71, 0x96, 0x9f, 0x7b, 0x7d, 0x96, 0x9f, 0xfb, 0xf5, + 0x2c, 0x3f, 0xf7, 0xf5, 0xfd, 0x8e, 0x43, 0xbb, 0x83, 0x76, 0xe9, 0x18, 0xbb, 0xfc, 0x3e, 0xca, + 0x7f, 0xb6, 0x89, 0xf5, 0x4d, 0xf9, 0x84, 0xdd, 0xb1, 0xe9, 0xa8, 0x6f, 0x93, 0xe0, 0x02, 0x9d, + 0x62, 0xf6, 0x7c, 0xf8, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x03, 0xbe, 0xcf, 0x81, 0x0b, + 0x00, 0x00, } func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error) { @@ -1187,6 +1285,84 @@ func (m *TallyParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.VetoThreshold) > 0 { + i -= len(m.VetoThreshold) + copy(dAtA[i:], m.VetoThreshold) + i = encodeVarintGov(dAtA, i, uint64(len(m.VetoThreshold))) + i-- + dAtA[i] = 0x32 + } + if len(m.Threshold) > 0 { + i -= len(m.Threshold) + copy(dAtA[i:], m.Threshold) + i = encodeVarintGov(dAtA, i, uint64(len(m.Threshold))) + i-- + dAtA[i] = 0x2a + } + if len(m.Quorum) > 0 { + i -= len(m.Quorum) + copy(dAtA[i:], m.Quorum) + i = encodeVarintGov(dAtA, i, uint64(len(m.Quorum))) + i-- + dAtA[i] = 0x22 + } + if m.VotingPeriod != nil { + n8, err8 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.VotingPeriod, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.VotingPeriod):]) + if err8 != nil { + return 0, err8 + } + i -= n8 + i = encodeVarintGov(dAtA, i, uint64(n8)) + i-- + dAtA[i] = 0x1a + } + if m.MaxDepositPeriod != nil { + n9, err9 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.MaxDepositPeriod, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.MaxDepositPeriod):]) + if err9 != nil { + return 0, err9 + } + i -= n9 + i = encodeVarintGov(dAtA, i, uint64(n9)) + i-- + dAtA[i] = 0x12 + } + if len(m.MinDeposit) > 0 { + for iNdEx := len(m.MinDeposit) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MinDeposit[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGov(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintGov(dAtA []byte, offset int, v uint64) int { offset -= sovGov(v) base := offset @@ -1391,6 +1567,41 @@ func (m *TallyParams) Size() (n int) { return n } +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.MinDeposit) > 0 { + for _, e := range m.MinDeposit { + l = e.Size() + n += 1 + l + sovGov(uint64(l)) + } + } + if m.MaxDepositPeriod != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.MaxDepositPeriod) + n += 1 + l + sovGov(uint64(l)) + } + if m.VotingPeriod != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.VotingPeriod) + n += 1 + l + sovGov(uint64(l)) + } + l = len(m.Quorum) + if l > 0 { + n += 1 + l + sovGov(uint64(l)) + } + l = len(m.Threshold) + if l > 0 { + n += 1 + l + sovGov(uint64(l)) + } + l = len(m.VetoThreshold) + if l > 0 { + n += 1 + l + sovGov(uint64(l)) + } + return n +} + func sovGov(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2698,6 +2909,258 @@ func (m *TallyParams) Unmarshal(dAtA []byte) error { } return nil } +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinDeposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGov + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MinDeposit = append(m.MinDeposit, types.Coin{}) + if err := m.MinDeposit[len(m.MinDeposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxDepositPeriod", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGov + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MaxDepositPeriod == nil { + m.MaxDepositPeriod = new(time.Duration) + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.MaxDepositPeriod, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VotingPeriod", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGov + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VotingPeriod == nil { + m.VotingPeriod = new(time.Duration) + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.VotingPeriod, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quorum", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGov + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Quorum = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGov + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Threshold = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VetoThreshold", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGov + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VetoThreshold = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGov(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGov + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipGov(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/gov/types/v1/msgs.go b/x/gov/types/v1/msgs.go index 84b845c55732..74959b859202 100644 --- a/x/gov/types/v1/msgs.go +++ b/x/gov/types/v1/msgs.go @@ -12,8 +12,8 @@ import ( ) var ( - _, _, _, _, _ sdk.Msg = &MsgSubmitProposal{}, &MsgDeposit{}, &MsgVote{}, &MsgVoteWeighted{}, &MsgExecLegacyContent{} - _, _ codectypes.UnpackInterfacesMessage = &MsgSubmitProposal{}, &MsgExecLegacyContent{} + _, _, _, _, _, _ sdk.Msg = &MsgSubmitProposal{}, &MsgDeposit{}, &MsgVote{}, &MsgVoteWeighted{}, &MsgExecLegacyContent{}, &MsgUpdateParams{} + _, _ codectypes.UnpackInterfacesMessage = &MsgSubmitProposal{}, &MsgExecLegacyContent{} ) // NewMsgSubmitProposal creates a new MsgSubmitProposal. @@ -260,3 +260,60 @@ func (c MsgExecLegacyContent) UnpackInterfaces(unpacker codectypes.AnyUnpacker) var content v1beta1.Content return unpacker.UnpackAny(c.Content, &content) } + +// Route implements Msg +func (msg MsgUpdateParams) Route() string { return types.RouterKey } + +// Type implements Msg +func (msg MsgUpdateParams) Type() string { return sdk.MsgTypeURL(&msg) } + +// ValidateBasic implements Msg +func (msg MsgUpdateParams) ValidateBasic() error { + // if _, err := sdk.AccAddressFromBech32(msg.Voter); err != nil { + // return sdkerrors.ErrInvalidAddress.Wrapf("invalid voter address: %s", err) + // } + // if len(msg.Options) == 0 { + // return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, WeightedVoteOptions(msg.Options).String()) + // } + + // totalWeight := sdk.NewDec(0) + // usedOptions := make(map[VoteOption]bool) + // for _, option := range msg.Options { + // if !ValidWeightedVoteOption(option) { + // return sdkerrors.Wrap(types.ErrInvalidVote, option.String()) + // } + // totalWeight = totalWeight.Add(option.Weight) + // if usedOptions[option.Option] { + // return sdkerrors.Wrap(types.ErrInvalidVote, "Duplicated vote option") + // } + // usedOptions[option.Option] = true + // } + + // if totalWeight.GT(sdk.NewDec(1)) { + // return sdkerrors.Wrap(types.ErrInvalidVote, "Total weight overflow 1.00") + // } + + // if totalWeight.LT(sdk.NewDec(1)) { + // return sdkerrors.Wrap(types.ErrInvalidVote, "Total weight lower than 1.00") + // } + + return nil +} + +// // String implements the Stringer interface +// func (msg MsgUpdateParams) String() string { +// out, _ := yaml.Marshal(msg) +// return string(out) +// } + +// GetSignBytes implements Msg +func (msg MsgUpdateParams) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(&msg) + return sdk.MustSortJSON(bz) +} + +// GetSigners implements Msg +func (msg MsgUpdateParams) GetSigners() []sdk.AccAddress { + authority, _ := sdk.AccAddressFromBech32(msg.Authority) + return []sdk.AccAddress{authority} +} diff --git a/x/gov/types/v1/params.go b/x/gov/types/v1/params.go index b2321be75d55..52302cb65e27 100644 --- a/x/gov/types/v1/params.go +++ b/x/gov/types/v1/params.go @@ -6,7 +6,6 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) // Default period for deposits & voting @@ -22,42 +21,26 @@ var ( DefaultVetoThreshold = sdk.NewDecWithPrec(334, 3) ) -// Parameter store key -var ( - ParamStoreKeyDepositParams = []byte("depositparams") - ParamStoreKeyVotingParams = []byte("votingparams") - ParamStoreKeyTallyParams = []byte("tallyparams") -) - -// ParamKeyTable - Key declaration for parameters -func ParamKeyTable() paramtypes.KeyTable { - return paramtypes.NewKeyTable( - paramtypes.NewParamSetPair(ParamStoreKeyDepositParams, DepositParams{}, validateDepositParams), - paramtypes.NewParamSetPair(ParamStoreKeyVotingParams, VotingParams{}, validateVotingParams), - paramtypes.NewParamSetPair(ParamStoreKeyTallyParams, TallyParams{}, validateTallyParams), - ) -} - -// NewDepositParams creates a new DepositParams object -func NewDepositParams(minDeposit sdk.Coins, maxDepositPeriod time.Duration) DepositParams { - return DepositParams{ - MinDeposit: minDeposit, - MaxDepositPeriod: &maxDepositPeriod, - } -} - -// DefaultDepositParams default parameters for deposits -func DefaultDepositParams() DepositParams { - return NewDepositParams( - sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, DefaultMinDepositTokens)), - DefaultPeriod, - ) -} - -// Equal checks equality of DepositParams -func (dp DepositParams) Equal(dp2 DepositParams) bool { - return sdk.Coins(dp.MinDeposit).IsEqual(dp2.MinDeposit) && dp.MaxDepositPeriod == dp2.MaxDepositPeriod -} +// // NewDepositParams creates a new DepositParams object +// func NewDepositParams(minDeposit sdk.Coins, maxDepositPeriod time.Duration) DepositParams { +// return DepositParams{ +// MinDeposit: minDeposit, +// MaxDepositPeriod: &maxDepositPeriod, +// } +// } + +// // DefaultDepositParams default parameters for deposits +// func DefaultDepositParams() DepositParams { +// return NewDepositParams( +// sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, DefaultMinDepositTokens)), +// DefaultPeriod, +// ) +// } + +// // Equal checks equality of DepositParams +// func (dp DepositParams) Equal(dp2 DepositParams) bool { +// return sdk.Coins(dp.MinDeposit).IsEqual(dp2.MinDeposit) && dp.MaxDepositPeriod == dp2.MaxDepositPeriod +// } func validateDepositParams(i interface{}) error { v, ok := i.(DepositParams) @@ -75,24 +58,24 @@ func validateDepositParams(i interface{}) error { return nil } -// NewTallyParams creates a new TallyParams object -func NewTallyParams(quorum, threshold, vetoThreshold sdk.Dec) TallyParams { - return TallyParams{ - Quorum: quorum.String(), - Threshold: threshold.String(), - VetoThreshold: vetoThreshold.String(), - } -} +// // NewTallyParams creates a new TallyParams object +// func NewTallyParams(quorum, threshold, vetoThreshold sdk.Dec) TallyParams { +// return TallyParams{ +// Quorum: quorum.String(), +// Threshold: threshold.String(), +// VetoThreshold: vetoThreshold.String(), +// } +// } -// DefaultTallyParams default parameters for tallying -func DefaultTallyParams() TallyParams { - return NewTallyParams(DefaultQuorum, DefaultThreshold, DefaultVetoThreshold) -} +// // DefaultTallyParams default parameters for tallying +// func DefaultTallyParams() TallyParams { +// return NewTallyParams(DefaultQuorum, DefaultThreshold, DefaultVetoThreshold) +// } -// Equal checks equality of TallyParams -func (tp TallyParams) Equal(other TallyParams) bool { - return tp.Quorum == other.Quorum && tp.Threshold == other.Threshold && tp.VetoThreshold == other.VetoThreshold -} +// // Equal checks equality of TallyParams +// func (tp TallyParams) Equal(other TallyParams) bool { +// return tp.Quorum == other.Quorum && tp.Threshold == other.Threshold && tp.VetoThreshold == other.VetoThreshold +// } func validateTallyParams(i interface{}) error { v, ok := i.(TallyParams) @@ -136,22 +119,22 @@ func validateTallyParams(i interface{}) error { return nil } -// NewVotingParams creates a new VotingParams object -func NewVotingParams(votingPeriod time.Duration) VotingParams { - return VotingParams{ - VotingPeriod: &votingPeriod, - } -} +// // NewVotingParams creates a new VotingParams object +// func NewVotingParams(votingPeriod time.Duration) VotingParams { +// return VotingParams{ +// VotingPeriod: &votingPeriod, +// } +// } -// DefaultVotingParams default parameters for voting -func DefaultVotingParams() VotingParams { - return NewVotingParams(DefaultPeriod) -} +// // DefaultVotingParams default parameters for voting +// func DefaultVotingParams() VotingParams { +// return NewVotingParams(DefaultPeriod) +// } -// Equal checks equality of TallyParams -func (vp VotingParams) Equal(other VotingParams) bool { - return vp.VotingPeriod == other.VotingPeriod -} +// // Equal checks equality of TallyParams +// func (vp VotingParams) Equal(other VotingParams) bool { +// return vp.VotingPeriod == other.VotingPeriod +// } func validateVotingParams(i interface{}) error { v, ok := i.(VotingParams) @@ -170,28 +153,49 @@ func validateVotingParams(i interface{}) error { return nil } -// Params returns all of the governance params -type Params struct { - VotingParams VotingParams `json:"voting_params" yaml:"voting_params"` - TallyParams TallyParams `json:"tally_params" yaml:"tally_params"` - DepositParams DepositParams `json:"deposit_params" yaml:"deposit_params"` -} - -func (gp Params) String() string { - return gp.VotingParams.String() + "\n" + - gp.TallyParams.String() + "\n" + gp.DepositParams.String() -} - -// NewParams creates a new gov Params instance -func NewParams(vp VotingParams, tp TallyParams, dp DepositParams) Params { +// // Params returns all of the governance params +// type Params struct { +// VotingParams VotingParams `json:"voting_params" yaml:"voting_params"` +// TallyParams TallyParams `json:"tally_params" yaml:"tally_params"` +// DepositParams DepositParams `json:"deposit_params" yaml:"deposit_params"` +// } + +// func (gp Params) String() string { +// return gp.VotingParams.String() + "\n" + +// gp.TallyParams.String() + "\n" + gp.DepositParams.String() +// } + +// // NewParams creates a new gov Params instance +// func NewParams(vp VotingParams, tp TallyParams, dp DepositParams) Params { +// return Params{ +// VotingParams: vp, +// DepositParams: dp, +// TallyParams: tp, +// } +// } + +func NewParams( + minDeposit sdk.Coins, maxDepositPeriod time.Duration, votingPeriod time.Duration, + quorum string, threshold string, vetoThreshold string, +) Params { return Params{ - VotingParams: vp, - DepositParams: dp, - TallyParams: tp, + MinDeposit: minDeposit, + MaxDepositPeriod: &maxDepositPeriod, + VotingPeriod: &votingPeriod, + Quorum: quorum, + Threshold: threshold, + VetoThreshold: vetoThreshold, } } // DefaultParams default governance params func DefaultParams() Params { - return NewParams(DefaultVotingParams(), DefaultTallyParams(), DefaultDepositParams()) + return NewParams( + sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, DefaultMinDepositTokens)), + DefaultPeriod, + DefaultPeriod, + DefaultQuorum.String(), + DefaultThreshold.String(), + DefaultVetoThreshold.String(), + ) } diff --git a/x/gov/types/v1/params_legacy.go b/x/gov/types/v1/params_legacy.go new file mode 100644 index 000000000000..d9749e2ca30c --- /dev/null +++ b/x/gov/types/v1/params_legacy.go @@ -0,0 +1,21 @@ +package v1 + +import ( + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" +) + +// Parameter store key +var ( + ParamStoreKeyDepositParams = []byte("depositparams") + ParamStoreKeyVotingParams = []byte("votingparams") + ParamStoreKeyTallyParams = []byte("tallyparams") +) + +// ParamKeyTable - Key declaration for parameters +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable( + paramtypes.NewParamSetPair(ParamStoreKeyDepositParams, DepositParams{}, validateDepositParams), + paramtypes.NewParamSetPair(ParamStoreKeyVotingParams, VotingParams{}, validateVotingParams), + paramtypes.NewParamSetPair(ParamStoreKeyTallyParams, TallyParams{}, validateTallyParams), + ) +} diff --git a/x/gov/types/v1/query.pb.go b/x/gov/types/v1/query.pb.go index 2a7bbcc2fdf6..a8957ddfaea6 100644 --- a/x/gov/types/v1/query.pb.go +++ b/x/gov/types/v1/query.pb.go @@ -462,9 +462,6 @@ func (m *QueryVotesResponse) GetPagination() *query.PageResponse { // QueryParamsRequest is the request type for the Query/Params RPC method. type QueryParamsRequest struct { - // params_type defines which parameters to query for, can be one of "voting", - // "tallying" or "deposit". - ParamsType string `protobuf:"bytes,1,opt,name=params_type,json=paramsType,proto3" json:"params_type,omitempty"` } func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } @@ -500,21 +497,10 @@ func (m *QueryParamsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo -func (m *QueryParamsRequest) GetParamsType() string { - if m != nil { - return m.ParamsType - } - return "" -} - // QueryParamsResponse is the response type for the Query/Params RPC method. type QueryParamsResponse struct { - // voting_params defines the parameters related to voting. - VotingParams *VotingParams `protobuf:"bytes,1,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"` - // deposit_params defines the parameters related to deposit. - DepositParams *DepositParams `protobuf:"bytes,2,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"` - // tally_params defines the parameters related to tally. - TallyParams *TallyParams `protobuf:"bytes,3,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` + // params defines all the paramaters of x/gov module. + Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` } func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } @@ -550,23 +536,9 @@ func (m *QueryParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo -func (m *QueryParamsResponse) GetVotingParams() *VotingParams { - if m != nil { - return m.VotingParams - } - return nil -} - -func (m *QueryParamsResponse) GetDepositParams() *DepositParams { +func (m *QueryParamsResponse) GetParams() *Params { if m != nil { - return m.DepositParams - } - return nil -} - -func (m *QueryParamsResponse) GetTallyParams() *TallyParams { - if m != nil { - return m.TallyParams + return m.Params } return nil } @@ -895,67 +867,62 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1/query.proto", fileDescriptor_46a436d1109b50d0) } var fileDescriptor_46a436d1109b50d0 = []byte{ - // 945 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x5d, 0x6f, 0xdc, 0x44, - 0x14, 0xcd, 0x6c, 0x92, 0x76, 0xf7, 0xa6, 0x09, 0x70, 0x5b, 0x9a, 0xc5, 0x94, 0x6d, 0x70, 0x68, - 0x12, 0x28, 0xf5, 0xb0, 0xe9, 0x97, 0x04, 0xad, 0x04, 0x2d, 0x04, 0x90, 0x78, 0x08, 0xdb, 0x8a, - 0x07, 0x5e, 0x22, 0x27, 0x6b, 0x19, 0x8b, 0x8d, 0xc7, 0xdd, 0x99, 0x5d, 0x11, 0xd2, 0x08, 0xa9, - 0x12, 0x82, 0x27, 0x40, 0xa2, 0x12, 0xfc, 0x10, 0x7e, 0x04, 0x8f, 0x15, 0xbc, 0x20, 0x78, 0x41, - 0x09, 0x3f, 0x04, 0x79, 0xe6, 0xda, 0x6b, 0x3b, 0xde, 0xcd, 0xa6, 0x8a, 0xfa, 0x14, 0x8d, 0x7d, - 0xee, 0xb9, 0xe7, 0x7e, 0xf8, 0x4c, 0x16, 0x5e, 0xda, 0x12, 0x72, 0x5b, 0x48, 0xee, 0x8b, 0x3e, - 0xef, 0x37, 0xf9, 0x83, 0x9e, 0xd7, 0xdd, 0x71, 0xa2, 0xae, 0x50, 0x02, 0x67, 0xcd, 0x2b, 0xc7, - 0x17, 0x7d, 0xa7, 0xdf, 0xb4, 0xde, 0x20, 0xe4, 0xa6, 0x2b, 0x3d, 0x83, 0xe3, 0xfd, 0xe6, 0xa6, - 0xa7, 0xdc, 0x26, 0x8f, 0x5c, 0x3f, 0x08, 0x5d, 0x15, 0x88, 0xd0, 0x84, 0x5a, 0x17, 0x7c, 0x21, - 0xfc, 0x8e, 0xc7, 0xdd, 0x28, 0xe0, 0x6e, 0x18, 0x0a, 0xa5, 0x5f, 0x4a, 0x7a, 0x3b, 0x9f, 0xcf, - 0x19, 0xf3, 0x9b, 0x17, 0x24, 0x66, 0x43, 0x9f, 0x38, 0xa5, 0xd7, 0x07, 0xfb, 0x26, 0x9c, 0xfb, - 0x34, 0xce, 0xb9, 0xde, 0x15, 0x91, 0x90, 0x6e, 0xa7, 0xe5, 0x3d, 0xe8, 0x79, 0x52, 0xe1, 0x45, - 0x98, 0x89, 0xe8, 0xd1, 0x46, 0xd0, 0xae, 0xb3, 0x05, 0xb6, 0x32, 0xd5, 0x82, 0xe4, 0xd1, 0xc7, - 0x6d, 0xfb, 0x13, 0x78, 0xb1, 0x10, 0x28, 0x23, 0x11, 0x4a, 0x0f, 0xaf, 0x42, 0x35, 0x81, 0xe9, - 0xb0, 0x99, 0xd5, 0x79, 0x27, 0x57, 0xb1, 0x93, 0x86, 0xa4, 0x40, 0xfb, 0xc7, 0x4a, 0x81, 0x4e, - 0x26, 0x42, 0xd6, 0xe0, 0xb9, 0x54, 0x88, 0x54, 0xae, 0xea, 0x49, 0xcd, 0x3a, 0xb7, 0xfa, 0xca, - 0x10, 0xd6, 0x7b, 0x1a, 0xd4, 0x9a, 0x8b, 0x72, 0x67, 0x74, 0x60, 0xba, 0x2f, 0x94, 0xd7, 0xad, - 0x57, 0x16, 0xd8, 0x4a, 0xed, 0x4e, 0xfd, 0x8f, 0xdf, 0xae, 0x9c, 0x23, 0x82, 0xf7, 0xda, 0xed, - 0xae, 0x27, 0xe5, 0x3d, 0xd5, 0x0d, 0x42, 0xbf, 0x65, 0x60, 0x78, 0x03, 0x6a, 0x6d, 0x2f, 0x12, - 0x32, 0x50, 0xa2, 0x5b, 0x9f, 0x3c, 0x22, 0x66, 0x00, 0xc5, 0x35, 0x80, 0xc1, 0xd8, 0xea, 0x53, - 0xba, 0x01, 0x4b, 0x89, 0xd4, 0x78, 0xc6, 0x8e, 0xd9, 0x05, 0x9a, 0xb1, 0xb3, 0xee, 0xfa, 0x1e, - 0xd5, 0xda, 0xca, 0x44, 0xda, 0xbf, 0x32, 0x38, 0x5f, 0xec, 0x08, 0x75, 0xf8, 0x3a, 0xd4, 0x92, - 0xe2, 0xe2, 0x66, 0x4c, 0x8e, 0x6a, 0xf1, 0x00, 0x89, 0x1f, 0xe6, 0x94, 0x55, 0xb4, 0xb2, 0xe5, - 0x23, 0x95, 0x99, 0x9c, 0x39, 0x69, 0x5b, 0xf0, 0xbc, 0x56, 0xf6, 0x99, 0x50, 0xde, 0xb8, 0xfb, - 0x72, 0xdc, 0xfe, 0xdb, 0xb7, 0xe0, 0x85, 0x4c, 0x12, 0xaa, 0x7c, 0x19, 0xa6, 0xe2, 0xb7, 0xb4, - 0x57, 0x67, 0x0b, 0x45, 0x6b, 0xa8, 0x06, 0xd8, 0x0f, 0x33, 0xd1, 0x72, 0x6c, 0x8d, 0x6b, 0x25, - 0x1d, 0x7a, 0x9a, 0xd9, 0x7d, 0xcf, 0x00, 0xb3, 0xe9, 0x49, 0xfd, 0xeb, 0xa6, 0x05, 0xc9, 0xcc, - 0x4a, 0xe5, 0x1b, 0xc4, 0xc9, 0xcd, 0xea, 0x3a, 0x29, 0x59, 0x77, 0xbb, 0xee, 0x76, 0xae, 0x13, - 0xfa, 0xc1, 0x86, 0xda, 0x89, 0x4c, 0x3b, 0x6b, 0x71, 0x58, 0xfc, 0xe8, 0xfe, 0x4e, 0xe4, 0xd9, - 0xff, 0x30, 0x38, 0x9b, 0x8b, 0xa3, 0x12, 0xde, 0x85, 0xd9, 0xbe, 0x50, 0x41, 0xe8, 0x6f, 0x18, - 0x30, 0x4d, 0xe2, 0xe5, 0xc3, 0xa5, 0x04, 0xa1, 0x4f, 0xb1, 0x67, 0xfa, 0x99, 0x13, 0xde, 0x85, - 0x39, 0xfa, 0x58, 0x12, 0x0a, 0x53, 0xdd, 0x85, 0x02, 0xc5, 0xfb, 0x06, 0x44, 0x1c, 0xb3, 0xed, - 0xec, 0x11, 0x6f, 0xc3, 0x19, 0xe5, 0x76, 0x3a, 0x3b, 0x09, 0xc5, 0xa4, 0xa6, 0xb0, 0x0a, 0x14, - 0xf7, 0x63, 0x08, 0x11, 0xcc, 0xa8, 0xc1, 0xc1, 0x0e, 0xa9, 0x38, 0xca, 0x31, 0xf6, 0x7e, 0xe4, - 0x3c, 0xa1, 0x32, 0xb6, 0x27, 0xd8, 0x1f, 0x91, 0xc9, 0xa6, 0xf9, 0xa8, 0x9b, 0x6f, 0xc1, 0x69, - 0x02, 0x51, 0x1f, 0xcf, 0x97, 0x37, 0xa1, 0x95, 0xc0, 0xec, 0x6f, 0xf2, 0x4c, 0xcf, 0x7e, 0xb5, - 0x1f, 0x33, 0x32, 0xea, 0x81, 0x02, 0x2a, 0x66, 0x15, 0xaa, 0xa4, 0x32, 0x59, 0xf0, 0x61, 0xd5, - 0xa4, 0xb8, 0x93, 0x5b, 0xf3, 0xb7, 0x61, 0x5e, 0xab, 0xd2, 0x23, 0x6f, 0x79, 0xb2, 0xd7, 0x51, - 0xc7, 0xb8, 0xc9, 0xea, 0x87, 0x63, 0xd3, 0x09, 0x4d, 0xeb, 0xc5, 0xa1, 0xf9, 0x94, 0x6e, 0x18, - 0x85, 0x18, 0xe0, 0xea, 0xdf, 0x55, 0x98, 0xd6, 0x74, 0xf8, 0x2d, 0x83, 0x6a, 0xe2, 0xc3, 0xb8, - 0x58, 0x88, 0x2c, 0xbb, 0x74, 0xad, 0xd7, 0x46, 0x83, 0x8c, 0x26, 0xdb, 0x79, 0xf4, 0xe7, 0x7f, - 0x3f, 0x57, 0x56, 0x70, 0x89, 0xe7, 0xef, 0xfb, 0xd4, 0xe9, 0xf9, 0x6e, 0xa6, 0xe0, 0x3d, 0xfc, - 0x1a, 0x6a, 0xe9, 0x1d, 0x82, 0x23, 0x53, 0x24, 0xeb, 0x64, 0x5d, 0x3a, 0x02, 0x45, 0x4a, 0x16, - 0xb4, 0x12, 0x0b, 0xeb, 0xc3, 0x94, 0xe0, 0x77, 0x0c, 0xa6, 0x62, 0x5f, 0xc3, 0x8b, 0x65, 0x8c, - 0x99, 0x0b, 0xc4, 0x5a, 0x18, 0x0e, 0xa0, 0x6c, 0xb7, 0x74, 0xb6, 0x1b, 0x78, 0x6d, 0xbc, 0xba, - 0xb9, 0x76, 0x52, 0xbe, 0xab, 0xaf, 0x93, 0x3d, 0x7c, 0xc4, 0x60, 0x5a, 0xdb, 0x31, 0x0e, 0xcd, - 0x94, 0x96, 0xff, 0xea, 0x08, 0x04, 0x89, 0xb9, 0xa6, 0xc5, 0x38, 0xf8, 0xe6, 0x71, 0xc4, 0xe0, - 0x43, 0x38, 0x45, 0x0e, 0x56, 0x9a, 0x22, 0x67, 0xd2, 0x96, 0x3d, 0x0a, 0x42, 0x32, 0x2e, 0x6b, - 0x19, 0x97, 0x70, 0xb1, 0x28, 0x43, 0xc3, 0xf8, 0x6e, 0xc6, 0xe5, 0xf7, 0xf0, 0x17, 0x06, 0xa7, - 0xe9, 0x1b, 0xc4, 0x52, 0xf2, 0xbc, 0x1f, 0x5a, 0x8b, 0x23, 0x31, 0xa4, 0xe0, 0xae, 0x56, 0x70, - 0x1b, 0xdf, 0x19, 0xb3, 0x11, 0xc9, 0xb7, 0xcf, 0x77, 0x53, 0x7f, 0xdc, 0xc3, 0x1f, 0x18, 0x54, - 0x13, 0x43, 0xc1, 0x51, 0x69, 0xe5, 0xc8, 0x4f, 0xa5, 0xe8, 0x49, 0xf6, 0x4d, 0x2d, 0xae, 0x89, - 0xfc, 0x98, 0xe2, 0xf0, 0x31, 0x83, 0x99, 0xcc, 0xc7, 0x8d, 0x4b, 0x65, 0xe9, 0x0e, 0x9b, 0x8d, - 0xb5, 0x7c, 0x24, 0xee, 0x29, 0xf7, 0x47, 0x9b, 0xcb, 0x9d, 0x0f, 0x7e, 0xdf, 0x6f, 0xb0, 0x27, - 0xfb, 0x0d, 0xf6, 0xef, 0x7e, 0x83, 0xfd, 0x74, 0xd0, 0x98, 0x78, 0x72, 0xd0, 0x98, 0xf8, 0xeb, - 0xa0, 0x31, 0xf1, 0xf9, 0x65, 0x3f, 0x50, 0x5f, 0xf4, 0x36, 0x9d, 0x2d, 0xb1, 0x9d, 0x30, 0x9a, - 0x3f, 0x57, 0x64, 0xfb, 0x4b, 0xfe, 0x95, 0xa6, 0x8f, 0xb7, 0x40, 0xc6, 0x3f, 0x2e, 0x4e, 0xe9, - 0xff, 0xfd, 0xaf, 0xfe, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xce, 0x57, 0x85, 0xcf, 0xa5, 0x0c, 0x00, - 0x00, + // 876 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4d, 0x4f, 0x13, 0x5b, + 0x18, 0x66, 0x4a, 0x0b, 0xed, 0x4b, 0x2e, 0xf7, 0xde, 0xc3, 0x47, 0xe7, 0x4e, 0x2e, 0xa5, 0x77, + 0xb8, 0x02, 0x7e, 0x30, 0x63, 0x0b, 0x42, 0xa2, 0xb8, 0x10, 0x11, 0x35, 0x71, 0x81, 0xc5, 0xb8, + 0x70, 0x43, 0x06, 0x3a, 0x19, 0x1b, 0xcb, 0x9c, 0x61, 0xce, 0xb4, 0x11, 0x91, 0x98, 0x90, 0x18, + 0x5d, 0xa9, 0x89, 0x24, 0xfa, 0x43, 0xfc, 0x11, 0x2e, 0x5c, 0x10, 0xdd, 0xb8, 0x34, 0xe0, 0x0f, + 0x31, 0x73, 0xce, 0x99, 0xe9, 0xcc, 0xd0, 0x4e, 0x5b, 0x42, 0x5c, 0x35, 0x33, 0xe7, 0x79, 0xdf, + 0xe7, 0x79, 0x3f, 0xce, 0x33, 0x85, 0x7f, 0x36, 0x31, 0xd9, 0xc2, 0x44, 0x35, 0x70, 0x5d, 0xad, + 0x17, 0xd4, 0xed, 0x9a, 0x6e, 0xef, 0x28, 0x96, 0x8d, 0x1d, 0x8c, 0xfe, 0x60, 0x47, 0x8a, 0x81, + 0xeb, 0x4a, 0xbd, 0x20, 0x5d, 0xe0, 0xc8, 0x0d, 0x8d, 0xe8, 0x0c, 0xa7, 0xd6, 0x0b, 0x1b, 0xba, + 0xa3, 0x15, 0x54, 0x4b, 0x33, 0x2a, 0xa6, 0xe6, 0x54, 0xb0, 0xc9, 0x42, 0xa5, 0x7f, 0x0d, 0x8c, + 0x8d, 0xaa, 0xae, 0x6a, 0x56, 0x45, 0xd5, 0x4c, 0x13, 0x3b, 0xf4, 0x90, 0xf0, 0xd3, 0x6c, 0x98, + 0xd3, 0xcd, 0xcf, 0x0e, 0xb8, 0x98, 0x75, 0xfa, 0xa4, 0x72, 0x7a, 0xfa, 0x20, 0x2f, 0xc0, 0xf0, + 0x7d, 0x97, 0x73, 0xd5, 0xc6, 0x16, 0x26, 0x5a, 0xb5, 0xa4, 0x6f, 0xd7, 0x74, 0xe2, 0xa0, 0x71, + 0x18, 0xb0, 0xf8, 0xab, 0xf5, 0x4a, 0x59, 0x14, 0xf2, 0xc2, 0x74, 0xb2, 0x04, 0xde, 0xab, 0xbb, + 0x65, 0xf9, 0x1e, 0x8c, 0x44, 0x02, 0x89, 0x85, 0x4d, 0xa2, 0xa3, 0x59, 0x48, 0x7b, 0x30, 0x1a, + 0x36, 0x50, 0xcc, 0x2a, 0xa1, 0x8a, 0x15, 0x3f, 0xc4, 0x07, 0xca, 0x6f, 0x13, 0x91, 0x74, 0xc4, + 0x13, 0xb2, 0x02, 0x7f, 0xfa, 0x42, 0x88, 0xa3, 0x39, 0x35, 0x42, 0xb3, 0x0e, 0x16, 0xc7, 0x5a, + 0x64, 0x5d, 0xa3, 0xa0, 0xd2, 0xa0, 0x15, 0x7a, 0x46, 0x0a, 0xa4, 0xea, 0xd8, 0xd1, 0x6d, 0x31, + 0x91, 0x17, 0xa6, 0x33, 0x4b, 0xe2, 0xd7, 0x4f, 0x33, 0xc3, 0x3c, 0xc1, 0x8d, 0x72, 0xd9, 0xd6, + 0x09, 0x59, 0x73, 0xec, 0x8a, 0x69, 0x94, 0x18, 0x0c, 0xcd, 0x43, 0xa6, 0xac, 0x5b, 0x98, 0x54, + 0x1c, 0x6c, 0x8b, 0xbd, 0x6d, 0x62, 0x1a, 0x50, 0xb4, 0x02, 0xd0, 0x18, 0x9b, 0x98, 0xa4, 0x0d, + 0x98, 0xf4, 0xa4, 0xba, 0x33, 0x56, 0xd8, 0x2e, 0xf0, 0x19, 0x2b, 0xab, 0x9a, 0xa1, 0xf3, 0x5a, + 0x4b, 0x81, 0x48, 0xf9, 0xa3, 0x00, 0xa3, 0xd1, 0x8e, 0xf0, 0x0e, 0x5f, 0x81, 0x8c, 0x57, 0x9c, + 0xdb, 0x8c, 0xde, 0xb8, 0x16, 0x37, 0x90, 0xe8, 0x76, 0x48, 0x59, 0x82, 0x2a, 0x9b, 0x6a, 0xab, + 0x8c, 0x71, 0x86, 0xa4, 0x6d, 0xc2, 0x5f, 0x54, 0xd9, 0x43, 0xec, 0xe8, 0x9d, 0xee, 0x4b, 0xb7, + 0xfd, 0x97, 0x17, 0xe1, 0xef, 0x00, 0x09, 0xaf, 0x7c, 0x0a, 0x92, 0xee, 0x29, 0xdf, 0xab, 0xa1, + 0x48, 0xd1, 0x14, 0x4a, 0x01, 0xf2, 0xf3, 0x40, 0x34, 0xe9, 0x58, 0xe3, 0x4a, 0x93, 0x0e, 0x9d, + 0x66, 0x76, 0xaf, 0x05, 0x40, 0x41, 0x7a, 0xae, 0xfe, 0x3c, 0x6b, 0x81, 0x37, 0xb3, 0xa6, 0xf2, + 0x19, 0xe2, 0xec, 0x66, 0x35, 0xcc, 0x95, 0xac, 0x6a, 0xb6, 0xb6, 0xe5, 0x75, 0x42, 0x5e, 0x86, + 0xa1, 0xd0, 0x5b, 0x2e, 0x70, 0x06, 0xfa, 0x2c, 0xfa, 0x46, 0x4c, 0x51, 0xc6, 0x91, 0xe8, 0x56, + 0x31, 0x38, 0x07, 0xc9, 0x26, 0xcf, 0xb2, 0xcc, 0x96, 0xbf, 0xe3, 0x36, 0x87, 0xae, 0x56, 0xa2, + 0xe3, 0xab, 0x25, 0xdf, 0xe1, 0x5e, 0xe5, 0xf3, 0x71, 0xd9, 0x97, 0xa1, 0x9f, 0x83, 0xf8, 0x62, + 0x8c, 0x46, 0x74, 0x7b, 0x01, 0x1e, 0x4c, 0x7e, 0x11, 0xce, 0xf4, 0xfb, 0x37, 0xe4, 0x40, 0xe0, + 0x7e, 0xd7, 0x50, 0xc0, 0x8b, 0x29, 0x42, 0x9a, 0xab, 0xf4, 0xf6, 0xa4, 0x55, 0x35, 0x3e, 0xee, + 0xec, 0xb6, 0xe5, 0x2a, 0x64, 0xa9, 0xaa, 0x07, 0x5a, 0xb5, 0xba, 0x53, 0xd2, 0x49, 0xad, 0xea, + 0x74, 0xf1, 0x41, 0x10, 0x4f, 0xc6, 0xfa, 0x13, 0x4a, 0x39, 0xee, 0x6b, 0x3e, 0x1f, 0x29, 0x52, + 0x51, 0x30, 0x84, 0x01, 0x8b, 0x5f, 0xd2, 0x90, 0xa2, 0xe9, 0xd0, 0x4b, 0x01, 0xd2, 0x9e, 0x9d, + 0xa1, 0x89, 0x48, 0x64, 0xb3, 0x6f, 0x97, 0xf4, 0x7f, 0x3c, 0x88, 0x69, 0x92, 0x95, 0xfd, 0x6f, + 0x3f, 0xdf, 0x27, 0xa6, 0xd1, 0xa4, 0x1a, 0xfe, 0x6c, 0xfa, 0x86, 0xa9, 0xee, 0x06, 0x0a, 0xde, + 0x43, 0xcf, 0x20, 0xe3, 0x5b, 0x31, 0x8a, 0xa5, 0xf0, 0xd6, 0x49, 0x3a, 0xd7, 0x06, 0xc5, 0x95, + 0xe4, 0xa9, 0x12, 0x09, 0x89, 0xad, 0x94, 0xa0, 0x57, 0x02, 0x24, 0x5d, 0x7b, 0x40, 0xe3, 0xcd, + 0x32, 0x06, 0x7c, 0x58, 0xca, 0xb7, 0x06, 0x70, 0xb6, 0x45, 0xca, 0x36, 0x8f, 0xe6, 0x3a, 0xab, + 0x5b, 0xa5, 0x86, 0xa4, 0xee, 0x52, 0x57, 0xde, 0x43, 0xfb, 0x02, 0xa4, 0xa8, 0xab, 0xa1, 0x96, + 0x4c, 0x7e, 0xf9, 0xff, 0xc5, 0x20, 0xb8, 0x98, 0x39, 0x2a, 0x46, 0x41, 0x97, 0xba, 0x11, 0x83, + 0x4c, 0xe8, 0x63, 0x56, 0x84, 0x9a, 0x52, 0x84, 0xbc, 0x4e, 0x92, 0xe3, 0x20, 0x5c, 0xc6, 0x18, + 0x95, 0x91, 0x45, 0x23, 0x51, 0x19, 0x8c, 0xe5, 0x83, 0x00, 0xfd, 0xfc, 0xd6, 0xa1, 0xa6, 0xe9, + 0xc2, 0x0e, 0x28, 0x4d, 0xc4, 0x62, 0x38, 0xe7, 0x4d, 0xca, 0x79, 0x1d, 0x5d, 0xeb, 0xb0, 0x74, + 0xef, 0xb6, 0xab, 0xbb, 0xbe, 0x23, 0xee, 0xa1, 0x37, 0x02, 0xa4, 0x3d, 0x0b, 0x41, 0x71, 0xb4, + 0x24, 0xf6, 0x72, 0x44, 0x5d, 0x48, 0x5e, 0xa0, 0xe2, 0x0a, 0x48, 0xed, 0x52, 0x1c, 0x3a, 0x10, + 0x60, 0x20, 0x70, 0x9d, 0xd1, 0x64, 0x33, 0xba, 0x93, 0xf6, 0x22, 0x4d, 0xb5, 0xc5, 0x9d, 0x72, + 0x63, 0xa8, 0x9d, 0x2c, 0xdd, 0xfa, 0x7c, 0x94, 0x13, 0x0e, 0x8f, 0x72, 0xc2, 0x8f, 0xa3, 0x9c, + 0xf0, 0xee, 0x38, 0xd7, 0x73, 0x78, 0x9c, 0xeb, 0xf9, 0x7e, 0x9c, 0xeb, 0x79, 0x74, 0xd1, 0xa8, + 0x38, 0x8f, 0x6b, 0x1b, 0xca, 0x26, 0xde, 0xf2, 0x32, 0xb2, 0x9f, 0x19, 0x52, 0x7e, 0xa2, 0x3e, + 0xa5, 0xe9, 0x9d, 0x1d, 0x4b, 0x27, 0xee, 0xbf, 0xf2, 0x3e, 0xfa, 0xa7, 0x79, 0xf6, 0x57, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x4f, 0xff, 0xaf, 0xfa, 0xde, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1651,13 +1618,6 @@ func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.ParamsType) > 0 { - i -= len(m.ParamsType) - copy(dAtA[i:], m.ParamsType) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ParamsType))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } @@ -1681,9 +1641,9 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.TallyParams != nil { + if m.Params != nil { { - size, err := m.TallyParams.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1691,31 +1651,7 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a - } - if m.DepositParams != nil { - { - size, err := m.DepositParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.VotingParams != nil { - { - size, err := m.VotingParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + dAtA[i] = 0x2a } return len(dAtA) - i, nil } @@ -2091,10 +2027,6 @@ func (m *QueryParamsRequest) Size() (n int) { } var l int _ = l - l = len(m.ParamsType) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } return n } @@ -2104,16 +2036,8 @@ func (m *QueryParamsResponse) Size() (n int) { } var l int _ = l - if m.VotingParams != nil { - l = m.VotingParams.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.DepositParams != nil { - l = m.DepositParams.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.TallyParams != nil { - l = m.TallyParams.Size() + if m.Params != nil { + l = m.Params.Size() n += 1 + l + sovQuery(uint64(l)) } return n @@ -3099,38 +3023,6 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParamsType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ParamsType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3181,81 +3073,9 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VotingParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.VotingParams == nil { - m.VotingParams = &VotingParams{} - } - if err := m.VotingParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DepositParams == nil { - m.DepositParams = &DepositParams{} - } - if err := m.DepositParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TallyParams", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3282,10 +3102,10 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TallyParams == nil { - m.TallyParams = &TallyParams{} + if m.Params == nil { + m.Params = &Params{} } - if err := m.TallyParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/gov/types/v1/query.pb.gw.go b/x/gov/types/v1/query.pb.gw.go index 18bdf04d96c7..13bab966dcd3 100644 --- a/x/gov/types/v1/query.pb.gw.go +++ b/x/gov/types/v1/query.pb.gw.go @@ -275,24 +275,6 @@ func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, cl var protoReq QueryParamsRequest var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["params_type"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "params_type") - } - - protoReq.ParamsType, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "params_type", err) - } - msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -302,24 +284,6 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal var protoReq QueryParamsRequest var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["params_type"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "params_type") - } - - protoReq.ParamsType, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "params_type", err) - } - msg, err := server.Params(ctx, &protoReq) return msg, metadata, err @@ -930,7 +894,7 @@ var ( pattern_Query_Votes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"cosmos", "gov", "v1", "proposals", "proposal_id", "votes"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "gov", "v1", "params", "params_type"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "gov", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Deposit_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"cosmos", "gov", "v1", "proposals", "proposal_id", "deposits", "depositor"}, "", runtime.AssumeColonVerbOpt(false))) diff --git a/x/gov/types/v1/tx.pb.go b/x/gov/types/v1/tx.pb.go index 25696059d988..a36a467728e0 100644 --- a/x/gov/types/v1/tx.pb.go +++ b/x/gov/types/v1/tx.pb.go @@ -551,6 +551,105 @@ func (m *MsgDepositResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgDepositResponse proto.InternalMessageInfo +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParams struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/distribution parameters to update. + // + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_9ff8f4a63b6fc9a9, []int{10} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9ff8f4a63b6fc9a9, []int{11} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgSubmitProposal)(nil), "cosmos.gov.v1.MsgSubmitProposal") proto.RegisterType((*MsgSubmitProposalResponse)(nil), "cosmos.gov.v1.MsgSubmitProposalResponse") @@ -562,58 +661,64 @@ func init() { proto.RegisterType((*MsgVoteWeightedResponse)(nil), "cosmos.gov.v1.MsgVoteWeightedResponse") proto.RegisterType((*MsgDeposit)(nil), "cosmos.gov.v1.MsgDeposit") proto.RegisterType((*MsgDepositResponse)(nil), "cosmos.gov.v1.MsgDepositResponse") + proto.RegisterType((*MsgUpdateParams)(nil), "cosmos.gov.v1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cosmos.gov.v1.MsgUpdateParamsResponse") } func init() { proto.RegisterFile("cosmos/gov/v1/tx.proto", fileDescriptor_9ff8f4a63b6fc9a9) } var fileDescriptor_9ff8f4a63b6fc9a9 = []byte{ - // 734 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0xcf, 0x6a, 0xdb, 0x4a, - 0x14, 0xc6, 0xad, 0xd8, 0x37, 0x4e, 0x4e, 0x6e, 0x1c, 0x32, 0x98, 0x44, 0x16, 0x41, 0x71, 0x7c, - 0xe1, 0x62, 0x6e, 0x88, 0x14, 0xe7, 0x96, 0x16, 0x92, 0x52, 0x88, 0xd3, 0xd0, 0x16, 0x6a, 0x5a, - 0x14, 0x48, 0xa1, 0x14, 0x82, 0x6c, 0x4d, 0x27, 0xa2, 0x91, 0x46, 0x68, 0xc6, 0x26, 0x5e, 0xb6, - 0x4f, 0xd0, 0xf7, 0xe8, 0xa6, 0x8b, 0xec, 0xbb, 0x2b, 0xa1, 0xab, 0xd0, 0x55, 0x56, 0xa1, 0x24, - 0x8b, 0x42, 0x57, 0x7d, 0x84, 0x22, 0xcd, 0x48, 0x4e, 0xac, 0xfc, 0xeb, 0xa6, 0x2b, 0x4b, 0xe7, - 0x7c, 0xdf, 0x99, 0xf3, 0xd3, 0xcc, 0xf1, 0xc0, 0x4c, 0x87, 0x32, 0x8f, 0x32, 0x93, 0xd0, 0x9e, - 0xd9, 0x6b, 0x98, 0x7c, 0xdf, 0x08, 0x42, 0xca, 0x29, 0x9a, 0x14, 0x71, 0x83, 0xd0, 0x9e, 0xd1, - 0x6b, 0x68, 0xba, 0x94, 0xb5, 0x6d, 0x86, 0xcd, 0x5e, 0xa3, 0x8d, 0xb9, 0xdd, 0x30, 0x3b, 0xd4, - 0xf5, 0x85, 0x5c, 0x9b, 0xbd, 0x58, 0x26, 0x72, 0x89, 0x44, 0x99, 0x50, 0x42, 0xe3, 0x47, 0x33, - 0x7a, 0x92, 0xd1, 0x8a, 0x90, 0xef, 0x88, 0x84, 0x5c, 0x4a, 0xa6, 0x08, 0xa5, 0x64, 0x0f, 0x9b, - 0xf1, 0x5b, 0xbb, 0xfb, 0xda, 0xb4, 0xfd, 0xfe, 0xd0, 0x22, 0x1e, 0x23, 0xd1, 0x22, 0x1e, 0x23, - 0x22, 0x51, 0xfb, 0xa9, 0xc0, 0x74, 0x8b, 0x91, 0xad, 0x6e, 0xdb, 0x73, 0xf9, 0xf3, 0x90, 0x06, - 0x94, 0xd9, 0x7b, 0x68, 0x19, 0xc6, 0x3c, 0xcc, 0x98, 0x4d, 0x30, 0x53, 0x95, 0x6a, 0xbe, 0x3e, - 0xb1, 0x52, 0x36, 0x44, 0x71, 0x23, 0x29, 0x6e, 0xac, 0xfb, 0x7d, 0x2b, 0x55, 0xa1, 0xc7, 0x30, - 0xe5, 0xfa, 0x2e, 0x77, 0xed, 0xbd, 0x1d, 0x07, 0x07, 0x94, 0xb9, 0x5c, 0x1d, 0x89, 0x8d, 0x15, - 0x43, 0xf6, 0x18, 0xf1, 0x1b, 0x92, 0xdf, 0xd8, 0xa0, 0xae, 0xdf, 0x2c, 0x1c, 0x9e, 0xcc, 0xe7, - 0xac, 0x92, 0xf4, 0x3d, 0x14, 0x36, 0x74, 0x07, 0xc6, 0x82, 0xb8, 0x0f, 0x1c, 0xaa, 0xf9, 0xaa, - 0x52, 0x1f, 0x6f, 0xaa, 0x5f, 0x0f, 0x96, 0xca, 0xb2, 0xca, 0xba, 0xe3, 0x84, 0x98, 0xb1, 0x2d, - 0x1e, 0xba, 0x3e, 0xb1, 0x52, 0x25, 0xd2, 0xa2, 0x8e, 0xb9, 0xed, 0xd8, 0xdc, 0x56, 0x0b, 0x91, - 0xcb, 0x4a, 0xdf, 0x57, 0x27, 0xdf, 0x7d, 0xff, 0xf8, 0x5f, 0x2a, 0xad, 0xdd, 0x87, 0x4a, 0x86, - 0xd8, 0xc2, 0x2c, 0xa0, 0x3e, 0xc3, 0x68, 0x1e, 0x26, 0x02, 0x19, 0xdb, 0x71, 0x1d, 0x55, 0xa9, - 0x2a, 0xf5, 0x82, 0x05, 0x49, 0xe8, 0x89, 0x53, 0x7b, 0xab, 0x40, 0xb9, 0xc5, 0xc8, 0xe6, 0x3e, - 0xee, 0x3c, 0xc5, 0xc4, 0xee, 0xf4, 0x37, 0xa8, 0xcf, 0xb1, 0xcf, 0xd1, 0x1a, 0x14, 0x3b, 0xe2, - 0x31, 0x76, 0x5d, 0xf1, 0xc9, 0x9a, 0x13, 0x5f, 0x0e, 0x96, 0x8a, 0xd2, 0x63, 0x25, 0x0e, 0x34, - 0x07, 0xe3, 0x76, 0x97, 0xef, 0xd2, 0xd0, 0xe5, 0x7d, 0x75, 0x24, 0xee, 0x7f, 0x10, 0x58, 0x2d, - 0x45, 0x00, 0x83, 0xf7, 0x9a, 0x0e, 0x73, 0x97, 0xb5, 0x90, 0x40, 0xd4, 0x3e, 0x2b, 0x50, 0x6c, - 0x31, 0xb2, 0x4d, 0x39, 0x46, 0xcb, 0x97, 0x00, 0x35, 0xa7, 0x7e, 0x9c, 0xcc, 0x9f, 0x0f, 0x9f, - 0x27, 0x44, 0x06, 0xfc, 0xd5, 0xa3, 0x1c, 0x87, 0xa2, 0x8f, 0x6b, 0xbe, 0xbe, 0x90, 0xa1, 0x06, - 0x8c, 0xd2, 0x80, 0xbb, 0xd4, 0x8f, 0xb7, 0xab, 0x34, 0xd8, 0x71, 0x31, 0x00, 0x46, 0xd4, 0xc6, - 0xb3, 0x58, 0x60, 0x49, 0xe1, 0xb5, 0xbb, 0x05, 0x11, 0xac, 0x28, 0x5d, 0x9b, 0x86, 0x29, 0xc9, - 0x91, 0xb2, 0x1d, 0x2b, 0x69, 0xec, 0x05, 0x76, 0xc9, 0x2e, 0xc7, 0xce, 0x1f, 0x60, 0x5c, 0x83, - 0xa2, 0x68, 0x9d, 0xa9, 0xf9, 0xf8, 0x58, 0x2f, 0x0c, 0x41, 0x26, 0xbd, 0x9c, 0x83, 0x4d, 0x1c, - 0xb7, 0xa6, 0xad, 0xc0, 0xec, 0x10, 0x59, 0x4a, 0xfd, 0x49, 0x01, 0x68, 0x31, 0x92, 0xcc, 0xc8, - 0xef, 0x03, 0xdf, 0x85, 0x71, 0x39, 0x97, 0xf4, 0x66, 0xe8, 0x81, 0x14, 0xdd, 0x83, 0x51, 0xdb, - 0xa3, 0x5d, 0x9f, 0x4b, 0xee, 0x1b, 0xc7, 0x59, 0xca, 0xe5, 0x99, 0x4d, 0x0b, 0xd5, 0xca, 0x80, - 0x06, 0x00, 0x09, 0xd7, 0xca, 0x87, 0x3c, 0xe4, 0x5b, 0x8c, 0xa0, 0x57, 0x50, 0x1a, 0xfa, 0x0b, - 0xaa, 0x0e, 0x7d, 0xe0, 0xcc, 0xc8, 0x6a, 0xf5, 0x9b, 0x14, 0xe9, 0x50, 0x63, 0x98, 0xce, 0xce, - 0xeb, 0x3f, 0x59, 0x7b, 0x46, 0xa4, 0x2d, 0xde, 0x42, 0x94, 0x2e, 0xf3, 0x00, 0x0a, 0xf1, 0xc8, - 0xcd, 0x64, 0x4d, 0x51, 0x5c, 0xd3, 0x2f, 0x8f, 0xa7, 0xfe, 0x6d, 0xf8, 0xfb, 0xc2, 0xb1, 0xbe, - 0x42, 0x9f, 0xe4, 0xb5, 0x7f, 0xaf, 0xcf, 0xa7, 0x75, 0x1f, 0x41, 0x31, 0x39, 0x38, 0x95, 0xac, - 0x45, 0xa6, 0xb4, 0x85, 0x2b, 0x53, 0x49, 0xa1, 0xe6, 0xe6, 0xe1, 0xa9, 0xae, 0x1c, 0x9d, 0xea, - 0xca, 0xb7, 0x53, 0x5d, 0x79, 0x7f, 0xa6, 0xe7, 0x8e, 0xce, 0xf4, 0xdc, 0xf1, 0x99, 0x9e, 0x7b, - 0xb9, 0x48, 0x5c, 0xbe, 0xdb, 0x6d, 0x1b, 0x1d, 0xea, 0xc9, 0x3b, 0x49, 0xfe, 0x2c, 0x31, 0xe7, - 0x8d, 0xb9, 0x1f, 0x5f, 0x6e, 0xbc, 0x1f, 0x60, 0x16, 0xdd, 0x80, 0xa3, 0xf1, 0x1f, 0xe2, 0xff, - 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xb7, 0xdb, 0x52, 0x42, 0x41, 0x07, 0x00, 0x00, + // 797 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x41, 0x4f, 0xe3, 0x46, + 0x14, 0x8e, 0x49, 0x9a, 0xc0, 0x4b, 0x09, 0xc2, 0x4a, 0xc1, 0xb1, 0x90, 0x09, 0xa9, 0x54, 0x45, + 0x45, 0xd8, 0x04, 0xaa, 0x56, 0x82, 0xaa, 0x12, 0xa1, 0xa8, 0xad, 0xd4, 0xa8, 0xc8, 0xa8, 0x54, + 0xaa, 0x56, 0x42, 0x4e, 0x3c, 0x3b, 0x58, 0x8b, 0x3d, 0x96, 0x67, 0x12, 0x91, 0xe3, 0xee, 0xde, + 0x57, 0xfb, 0x53, 0xf6, 0xc0, 0x7d, 0x6f, 0x2b, 0xb4, 0x27, 0xb4, 0x27, 0x4e, 0x68, 0x05, 0x87, + 0x95, 0xf6, 0xb4, 0x3f, 0x61, 0x65, 0xcf, 0xd8, 0x09, 0x71, 0x20, 0xec, 0x65, 0x4f, 0xb1, 0xdf, + 0xfb, 0xbe, 0x37, 0xdf, 0xe7, 0x37, 0x6f, 0x26, 0xb0, 0xd0, 0x21, 0xd4, 0x25, 0xd4, 0xc0, 0xa4, + 0x67, 0xf4, 0x1a, 0x06, 0x3b, 0xd5, 0xfd, 0x80, 0x30, 0x22, 0xcf, 0xf2, 0xb8, 0x8e, 0x49, 0x4f, + 0xef, 0x35, 0x54, 0x4d, 0xc0, 0xda, 0x16, 0x45, 0x46, 0xaf, 0xd1, 0x46, 0xcc, 0x6a, 0x18, 0x1d, + 0xe2, 0x78, 0x1c, 0xae, 0x2e, 0xde, 0x2e, 0x13, 0xb2, 0x78, 0xa2, 0x8c, 0x09, 0x26, 0xd1, 0xa3, + 0x11, 0x3e, 0x89, 0x68, 0x85, 0xc3, 0x8f, 0x78, 0x42, 0x2c, 0x25, 0x52, 0x98, 0x10, 0x7c, 0x82, + 0x8c, 0xe8, 0xad, 0xdd, 0x7d, 0x6c, 0x58, 0x5e, 0x7f, 0x64, 0x11, 0x97, 0xe2, 0x70, 0x11, 0x97, + 0x62, 0x9e, 0xa8, 0x7d, 0x92, 0x60, 0xbe, 0x45, 0xf1, 0x41, 0xb7, 0xed, 0x3a, 0x6c, 0x3f, 0x20, + 0x3e, 0xa1, 0xd6, 0x89, 0xbc, 0x0e, 0xd3, 0x2e, 0xa2, 0xd4, 0xc2, 0x88, 0x2a, 0x52, 0x35, 0x5b, + 0x2f, 0x6e, 0x94, 0x75, 0x5e, 0x5c, 0x8f, 0x8b, 0xeb, 0x3b, 0x5e, 0xdf, 0x4c, 0x50, 0xf2, 0x9f, + 0x30, 0xe7, 0x78, 0x0e, 0x73, 0xac, 0x93, 0x23, 0x1b, 0xf9, 0x84, 0x3a, 0x4c, 0x99, 0x8a, 0x88, + 0x15, 0x5d, 0x68, 0x0c, 0xfd, 0xeb, 0xc2, 0xbf, 0xbe, 0x4b, 0x1c, 0xaf, 0x99, 0x3b, 0xbf, 0x5a, + 0xce, 0x98, 0x25, 0xc1, 0xfb, 0x9d, 0xd3, 0xe4, 0x9f, 0x60, 0xda, 0x8f, 0x74, 0xa0, 0x40, 0xc9, + 0x56, 0xa5, 0xfa, 0x4c, 0x53, 0x79, 0x77, 0xb6, 0x56, 0x16, 0x55, 0x76, 0x6c, 0x3b, 0x40, 0x94, + 0x1e, 0xb0, 0xc0, 0xf1, 0xb0, 0x99, 0x20, 0x65, 0x35, 0x54, 0xcc, 0x2c, 0xdb, 0x62, 0x96, 0x92, + 0x0b, 0x59, 0x66, 0xf2, 0xbe, 0x35, 0xfb, 0xec, 0xc3, 0xab, 0x1f, 0x13, 0x68, 0xed, 0x57, 0xa8, + 0xa4, 0x1c, 0x9b, 0x88, 0xfa, 0xc4, 0xa3, 0x48, 0x5e, 0x86, 0xa2, 0x2f, 0x62, 0x47, 0x8e, 0xad, + 0x48, 0x55, 0xa9, 0x9e, 0x33, 0x21, 0x0e, 0xfd, 0x65, 0xd7, 0x9e, 0x4a, 0x50, 0x6e, 0x51, 0xbc, + 0x77, 0x8a, 0x3a, 0x7f, 0x23, 0x6c, 0x75, 0xfa, 0xbb, 0xc4, 0x63, 0xc8, 0x63, 0xf2, 0x36, 0x14, + 0x3a, 0xfc, 0x31, 0x62, 0xdd, 0xf1, 0xc9, 0x9a, 0xc5, 0xb7, 0x67, 0x6b, 0x05, 0xc1, 0x31, 0x63, + 0x86, 0xbc, 0x04, 0x33, 0x56, 0x97, 0x1d, 0x93, 0xc0, 0x61, 0x7d, 0x65, 0x2a, 0xd2, 0x3f, 0x08, + 0x6c, 0x95, 0x42, 0x03, 0x83, 0xf7, 0x9a, 0x06, 0x4b, 0xe3, 0x24, 0xc4, 0x26, 0x6a, 0x6f, 0x24, + 0x28, 0xb4, 0x28, 0x3e, 0x24, 0x0c, 0xc9, 0xeb, 0x63, 0x0c, 0x35, 0xe7, 0x3e, 0x5e, 0x2d, 0x0f, + 0x87, 0x87, 0x1d, 0xca, 0x3a, 0x7c, 0xd3, 0x23, 0x0c, 0x05, 0x5c, 0xc7, 0x3d, 0x5f, 0x9f, 0xc3, + 0xe4, 0x06, 0xe4, 0x89, 0xcf, 0x1c, 0xe2, 0x45, 0xed, 0x2a, 0x0d, 0x3a, 0xce, 0x07, 0x40, 0x0f, + 0x65, 0xfc, 0x13, 0x01, 0x4c, 0x01, 0xbc, 0xb7, 0x5b, 0x10, 0x9a, 0xe5, 0xa5, 0x6b, 0xf3, 0x30, + 0x27, 0x7c, 0x24, 0xde, 0x2e, 0xa5, 0x24, 0xf6, 0x1f, 0x72, 0xf0, 0x31, 0x43, 0xf6, 0x57, 0xf0, + 0xb8, 0x0d, 0x05, 0x2e, 0x9d, 0x2a, 0xd9, 0x68, 0x5b, 0xaf, 0x8c, 0x98, 0x8c, 0xb5, 0x0c, 0x99, + 0x8d, 0x19, 0x0f, 0x76, 0x5b, 0x81, 0xc5, 0x11, 0x67, 0x89, 0xeb, 0xd7, 0x12, 0x40, 0x8b, 0xe2, + 0x78, 0x46, 0xbe, 0xdc, 0xf0, 0xcf, 0x30, 0x23, 0xe6, 0x92, 0x4c, 0x36, 0x3d, 0x80, 0xca, 0xbf, + 0x40, 0xde, 0x72, 0x49, 0xd7, 0x63, 0xc2, 0xf7, 0xc4, 0x71, 0x16, 0x70, 0xb1, 0x67, 0x93, 0x42, + 0xb5, 0x32, 0xc8, 0x03, 0x03, 0x89, 0xaf, 0x17, 0xbc, 0x9b, 0xff, 0xfa, 0xb6, 0xc5, 0xd0, 0xbe, + 0x15, 0x58, 0x2e, 0x0d, 0xa5, 0x0e, 0x66, 0x41, 0x9a, 0x24, 0x35, 0x81, 0xca, 0x9b, 0x90, 0xf7, + 0xa3, 0x0a, 0x91, 0xbf, 0xe2, 0xc6, 0x77, 0x23, 0x2d, 0xe2, 0xe5, 0x63, 0x99, 0x1c, 0x9a, 0x1a, + 0x2d, 0xde, 0x83, 0x61, 0x3d, 0xb1, 0xd6, 0x8d, 0xe7, 0x39, 0xc8, 0xb6, 0x28, 0x96, 0x1f, 0x41, + 0x69, 0xe4, 0xb8, 0xac, 0x8e, 0xac, 0x94, 0x3a, 0x5e, 0xd4, 0xfa, 0x24, 0x44, 0x72, 0x00, 0x21, + 0x98, 0x4f, 0x9f, 0x2d, 0xdf, 0xa7, 0xe9, 0x29, 0x90, 0xba, 0xfa, 0x00, 0x50, 0xb2, 0xcc, 0x6f, + 0x90, 0x8b, 0x8e, 0x87, 0x85, 0x34, 0x29, 0x8c, 0xab, 0xda, 0xf8, 0x78, 0xc2, 0x3f, 0x84, 0x6f, + 0x6f, 0x8d, 0xe0, 0x1d, 0xf8, 0x38, 0xaf, 0xfe, 0x70, 0x7f, 0x3e, 0xa9, 0xfb, 0x07, 0x14, 0xe2, + 0x4d, 0x5e, 0x49, 0x53, 0x44, 0x4a, 0x5d, 0xb9, 0x33, 0x35, 0x2c, 0xf0, 0xd6, 0xae, 0x1a, 0x23, + 0x70, 0x38, 0x3f, 0x4e, 0xe0, 0xb8, 0x5d, 0xd0, 0xdc, 0x3b, 0xbf, 0xd6, 0xa4, 0x8b, 0x6b, 0x4d, + 0x7a, 0x7f, 0xad, 0x49, 0x2f, 0x6f, 0xb4, 0xcc, 0xc5, 0x8d, 0x96, 0xb9, 0xbc, 0xd1, 0x32, 0xff, + 0xaf, 0x62, 0x87, 0x1d, 0x77, 0xdb, 0x7a, 0x87, 0xb8, 0xe2, 0x5e, 0x16, 0x3f, 0x6b, 0xd4, 0x7e, + 0x62, 0x9c, 0x46, 0x17, 0x3c, 0xeb, 0xfb, 0x88, 0x86, 0xff, 0x02, 0xf2, 0xd1, 0xa5, 0xb0, 0xf9, + 0x39, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x33, 0x01, 0xac, 0x45, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -639,6 +744,11 @@ type MsgClient interface { VoteWeighted(ctx context.Context, in *MsgVoteWeighted, opts ...grpc.CallOption) (*MsgVoteWeightedResponse, error) // Deposit defines a method to add deposit on a specific proposal. Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) + // UpdateParams defines a governance operation for updating the x/gov module + // parameters. The authority is defined in the keeper. + // + // Since: cosmos-sdk 0.47 + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } type msgClient struct { @@ -694,6 +804,15 @@ func (c *msgClient) Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.Ca return out, nil } +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/cosmos.gov.v1.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // SubmitProposal defines a method to create new proposal given a content. @@ -707,6 +826,11 @@ type MsgServer interface { VoteWeighted(context.Context, *MsgVoteWeighted) (*MsgVoteWeightedResponse, error) // Deposit defines a method to add deposit on a specific proposal. Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error) + // UpdateParams defines a governance operation for updating the x/gov module + // parameters. The authority is defined in the keeper. + // + // Since: cosmos-sdk 0.47 + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -728,6 +852,9 @@ func (*UnimplementedMsgServer) VoteWeighted(ctx context.Context, req *MsgVoteWei func (*UnimplementedMsgServer) Deposit(ctx context.Context, req *MsgDeposit) (*MsgDepositResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") } +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -823,6 +950,24 @@ func _Msg_Deposit_Handler(srv interface{}, ctx context.Context, dec func(interfa return interceptor(ctx, in, info, handler) } +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.gov.v1.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.gov.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -847,6 +992,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "Deposit", Handler: _Msg_Deposit_Handler, }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/gov/v1/tx.proto", @@ -1231,6 +1380,69 @@ func (m *MsgDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -1407,6 +1619,30 @@ func (m *MsgDepositResponse) Size() (n int) { return n } +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2436,6 +2672,171 @@ func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/group/client/cli/tx.go b/x/group/client/cli/tx.go index 5550241e755a..d5dfbadfe8ab 100644 --- a/x/group/client/cli/tx.go +++ b/x/group/client/cli/tx.go @@ -3,7 +3,6 @@ package cli import ( "fmt" "strconv" - "strings" "github.com/spf13/cobra" @@ -53,18 +52,12 @@ func TxCmd(name string) *cobra.Command { // MsgCreateGroupCmd creates a CLI command for Msg/CreateGroup. func MsgCreateGroupCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "create-group [admin] [metadata] [members-json-file]", - Short: "Create a group which is an aggregation " + - "of member accounts with associated weights and " + - "an administrator account. Note, the '--from' flag is " + - "ignored as it is implied from [admin].", - Long: strings.TrimSpace( - fmt.Sprintf(`Create a group which is an aggregation of member accounts with associated weights and -an administrator account. Note, the '--from' flag is ignored as it is implied from [admin]. -Members accounts can be given through a members JSON file that contains an array of members. - -Example: -$ %s tx group create-group [admin] [metadata] [members-json-file] + Use: "create-group [admin] [metadata] [members-json-file]", + Short: "Create a group which is an aggregation of member accounts with associated weights and an administrator account.", + Long: `Create a group which is an aggregation of member accounts with associated weights and an administrator account. +Note, the '--from' flag is ignored as it is implied from [admin]. Members accounts can be given through a members JSON file that contains an array of members.`, + Example: fmt.Sprintf(` +%s tx group create-group [admin] [metadata] [members-json-file] Where members.json contains: @@ -81,11 +74,7 @@ Where members.json contains: "metadata": "some metadata" } ] -} -`, - version.AppName, - ), - ), +}`, version.AppName), Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { err := cmd.Flags().Set(flags.FlagFrom, args[0]) @@ -126,11 +115,8 @@ func MsgUpdateGroupMembersCmd() *cobra.Command { cmd := &cobra.Command{ Use: "update-group-members [admin] [group-id] [members-json-file]", Short: "Update a group's members. Set a member's weight to \"0\" to delete it.", - Long: strings.TrimSpace( - fmt.Sprintf(`Update a group's members - -Example: -$ %s tx group update-group-members [admin] [group-id] [members-json-file] + Example: fmt.Sprintf(` +%s tx group update-group-members [admin] [group-id] [members-json-file] Where members.json contains: @@ -150,10 +136,7 @@ Where members.json contains: } Set a member's weight to "0" to delete it. -`, - version.AppName, - ), - ), +`, version.AppName), Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { err := cmd.Flags().Set(flags.FlagFrom, args[0]) @@ -277,21 +260,14 @@ func MsgUpdateGroupMetadataCmd() *cobra.Command { // MsgCreateGroupWithPolicyCmd creates a CLI command for Msg/CreateGroupWithPolicy. func MsgCreateGroupWithPolicyCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "create-group-with-policy [admin] [group-metadata] [group-policy-metadata] [members-json-file] [decision-policy]", - Short: "Create a group with policy which is an aggregation " + - "of member accounts with associated weights, " + - "an administrator account and a decision policy. Note, the '--from' flag is " + - "ignored as it is implied from [admin].", - Long: strings.TrimSpace( - fmt.Sprintf(`Create a group with policy which is an aggregation of member accounts with associated weights, + Use: "create-group-with-policy [admin] [group-metadata] [group-policy-metadata] [members-json-file] [decision-policy-json-file]", + Short: "Create a group with policy which is an aggregation of member accounts with associated weights, an administrator account and decision policy.", + Long: `Create a group with policy which is an aggregation of member accounts with associated weights, an administrator account and decision policy. Note, the '--from' flag is ignored as it is implied from [admin]. Members accounts can be given through a members JSON file that contains an array of members. -If group-policy-as-admin flag is set to true, the admin of the newly created group and group policy is set with the group policy address itself. - -Example: -$ %s tx group create-group-with-policy [admin] [group-metadata] [group-policy-metadata] [members-json-file] \ -'{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"1", \ -"windows": {"voting_period": "120h", "min_execution_period": "0s"}}' +If group-policy-as-admin flag is set to true, the admin of the newly created group and group policy is set with the group policy address itself.`, + Example: fmt.Sprintf(` +%s tx group create-group-with-policy [admin] [group-metadata] [group-policy-metadata] members.json policy.json where members.json contains: @@ -309,10 +285,18 @@ where members.json contains: } ] } -`, - version.AppName, - ), - ), + +and policy.json contains: + +{ + "@type": "/cosmos.group.v1.ThresholdDecisionPolicy", + "threshold": "1", + "windows": { + "voting_period": "120h", + "min_execution_period": "0s" + } +} +`, version.AppName), Args: cobra.MinimumNArgs(5), RunE: func(cmd *cobra.Command, args []string) error { err := cmd.Flags().Set(flags.FlagFrom, args[0]) @@ -335,8 +319,8 @@ where members.json contains: return err } - var policy group.DecisionPolicy - if err := clientCtx.Codec.UnmarshalInterfaceJSON([]byte(args[4]), &policy); err != nil { + policy, err := parseDecisionPolicy(clientCtx.Codec, args[4]) + if err != nil { return err } @@ -368,26 +352,32 @@ where members.json contains: // MsgCreateGroupPolicyCmd creates a CLI command for Msg/CreateGroupPolicy. func MsgCreateGroupPolicyCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "create-group-policy [admin] [group-id] [metadata] [decision-policy]", - Short: "Create a group policy which is an account " + - "associated with a group and a decision policy. " + - "Note, the '--from' flag is " + - "ignored as it is implied from [admin].", - Long: strings.TrimSpace( - fmt.Sprintf(`Create a group policy which is an account associated with a group and a decision policy. -Note, the '--from' flag is ignored as it is implied from [admin]. - -Example: -$ %s tx group create-group-policy [admin] [group-id] [metadata] \ -'{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"1", \ -"windows": {"voting_period": "120h", "min_execution_period": "0s"}}' - -Here, we can use percentage decision policy when needed, where 0 < percentage <= 1. -Ex: '{"@type":"/cosmos.group.v1.PercentageDecisionPolicy", "percentage":"0.5", "windows": {"voting_period": "120h", "min_execution_period": "0s"}} -`, - version.AppName, - ), - ), + Use: "create-group-policy [admin] [group-id] [metadata] [decision-policy-json-file]", + Short: `Create a group policy which is an account associated with a group and a decision policy. Note, the '--from' flag is ignored as it is implied from [admin].`, + Example: fmt.Sprintf(` +%s tx group create-group-policy [admin] [group-id] [metadata] policy.json + +where policy.json contains: + +{ + "@type": "/cosmos.group.v1.ThresholdDecisionPolicy", + "threshold": "1", + "windows": { + "voting_period": "120h", + "min_execution_period": "0s" + } +} + +Here, we can use percentage decision policy when needed, where 0 < percentage <= 1: + +{ + "@type": "/cosmos.group.v1.PercentageDecisionPolicy", + "percentage": "0.5", + "windows": { + "voting_period": "120h", + "min_execution_period": "0s" + } +}`, version.AppName), Args: cobra.ExactArgs(4), RunE: func(cmd *cobra.Command, args []string) error { err := cmd.Flags().Set(flags.FlagFrom, args[0]) @@ -405,8 +395,8 @@ Ex: '{"@type":"/cosmos.group.v1.PercentageDecisionPolicy", "percentage":"0.5", " return err } - var policy group.DecisionPolicy - if err := clientCtx.Codec.UnmarshalInterfaceJSON([]byte(args[3]), &policy); err != nil { + policy, err := parseDecisionPolicy(clientCtx.Codec, args[3]) + if err != nil { return err } @@ -470,7 +460,7 @@ func MsgUpdateGroupPolicyAdminCmd() *cobra.Command { // MsgUpdateGroupPolicyDecisionPolicyCmd creates a CLI command for Msg/UpdateGroupPolicyDecisionPolicy. func MsgUpdateGroupPolicyDecisionPolicyCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "update-group-policy-decision-policy [admin] [group-policy-account] [decision-policy]", + Use: "update-group-policy-decision-policy [admin] [group-policy-account] [decision-policy-json-file]", Short: "Update a group policy's decision policy", Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { @@ -484,8 +474,8 @@ func MsgUpdateGroupPolicyDecisionPolicyCmd() *cobra.Command { return err } - var policy group.DecisionPolicy - if err := clientCtx.Codec.UnmarshalInterfaceJSON([]byte(args[2]), &policy); err != nil { + policy, err := parseDecisionPolicy(clientCtx.Codec, args[2]) + if err != nil { return err } @@ -556,13 +546,11 @@ func MsgSubmitProposalCmd() *cobra.Command { cmd := &cobra.Command{ Use: "submit-proposal [proposal_json_file]", Short: "Submit a new proposal", - Long: fmt.Sprintf(`Submit a new proposal. - + Long: `Submit a new proposal. Parameters: - msg_tx_json_file: path to json file with messages that will be executed if the proposal is accepted. - -Example: - $ %s tx group submit-proposal path/to/proposal.json + msg_tx_json_file: path to json file with messages that will be executed if the proposal is accepted.`, + Example: fmt.Sprintf(` +%s tx group submit-proposal path/to/proposal.json Where proposal.json contains: @@ -577,7 +565,7 @@ Example: "amount":[{"denom": "stake","amount": "10"}] } ], - "metadata: "4pIMOgIGx1vZGU=", // base64-encoded metadata + "metadata": "4pIMOgIGx1vZGU=", // base64-encoded metadata "proposers": ["cosmos1...", "cosmos1..."], }`, version.AppName), Args: cobra.ExactArgs(1), @@ -638,7 +626,7 @@ func MsgWithdrawProposalCmd() *cobra.Command { Parameters: proposal-id: unique ID of the proposal. group-policy-admin-or-proposer: either admin of the group policy or one the proposer of the proposal. - (note: --from flag will be ignored here) + Note: --from flag will be ignored here. `, Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { @@ -788,14 +776,13 @@ func MsgExecCmd() *cobra.Command { func MsgLeaveGroupCmd() *cobra.Command { cmd := &cobra.Command{ Use: "leave-group [member-address] [group-id]", - Short: "remove member from the group", - Long: ` remove member from the group + Short: "Remove member from the group", + Long: `Remove member from the group Parameters: group-id: unique id of the group member-address: account address of the group member - Note, the '--from' flag is - ignored as it is implied from [member-address] + Note, the '--from' flag is ignored as it is implied from [member-address] `, Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/x/group/client/cli/util.go b/x/group/client/cli/util.go index 377c26d9c7c7..fccf7626a2df 100644 --- a/x/group/client/cli/util.go +++ b/x/group/client/cli/util.go @@ -2,6 +2,7 @@ package cli import ( "encoding/json" + "fmt" "io/ioutil" "os" @@ -10,6 +11,24 @@ import ( "github.com/cosmos/cosmos-sdk/x/group" ) +func parseDecisionPolicy(cdc codec.Codec, decisionPolicyFile string) (group.DecisionPolicy, error) { + if decisionPolicyFile == "" { + return nil, fmt.Errorf("decision policy is required") + } + + contents, err := ioutil.ReadFile(decisionPolicyFile) + if err != nil { + return nil, err + } + + var policy group.DecisionPolicy + if err := cdc.UnmarshalInterfaceJSON(contents, &policy); err != nil { + return nil, fmt.Errorf("failed to parse decision policy: %w", err) + } + + return policy, nil +} + func parseMembers(membersFile string) ([]group.MemberRequest, error) { members := group.MemberRequests{} diff --git a/x/group/client/testutil/tx.go b/x/group/client/testutil/tx.go index b30830cf5b4e..3e0954e1fcea 100644 --- a/x/group/client/testutil/tx.go +++ b/x/group/client/testutil/tx.go @@ -134,7 +134,7 @@ func (s *IntegrationTestSuite) SetupSuite() { val.Address.String(), "1", validMetadata, - fmt.Sprintf("{\"@type\":\"/cosmos.group.v1.PercentageDecisionPolicy\", \"percentage\":\"%f\", \"windows\":{\"voting_period\":\"30000s\"}}", percentage), + testutil.WriteToNewTempFile(s.T(), fmt.Sprintf(`{"@type":"/cosmos.group.v1.PercentageDecisionPolicy", "percentage":"%f", "windows":{"voting_period":"30000s"}}`, percentage)).Name(), }, s.commonFlags..., ), @@ -713,6 +713,8 @@ func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() { }]}`, val.Address.String(), tooLongMetadata) invalidMembersMetadataFile := testutil.WriteToNewTempFile(s.T(), invalidMembersMetadata) + thresholdDecisionPolicyFile := testutil.WriteToNewTempFile(s.T(), `{"@type": "/cosmos.group.v1.ThresholdDecisionPolicy","threshold": "1","windows": {"voting_period":"1s"}}`) + testCases := []struct { name string args []string @@ -729,7 +731,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() { validMetadata, validMetadata, validMembersFile.Name(), - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, false), }, s.commonFlags..., @@ -747,7 +749,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() { validMetadata, validMetadata, validMembersFile.Name(), - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, true), }, s.commonFlags..., @@ -765,7 +767,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() { validMetadata, validMetadata, validMembersFile.Name(), - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, false), fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, @@ -784,7 +786,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() { strings.Repeat("a", 256), validMetadata, validMembersFile.Name(), - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, false), }, s.commonFlags..., @@ -802,7 +804,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() { validMetadata, strings.Repeat("a", 256), validMembersFile.Name(), - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, false), }, s.commonFlags..., @@ -820,7 +822,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() { validMetadata, validMetadata, invalidMembersAddressFile.Name(), - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, false), }, s.commonFlags..., @@ -838,7 +840,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() { validMetadata, validMetadata, invalidMembersWeightFile.Name(), - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, false), }, s.commonFlags..., @@ -856,7 +858,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroupWithPolicy() { validMetadata, validMetadata, invalidMembersMetadataFile.Name(), - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), fmt.Sprintf("--%s=%v", client.FlagGroupPolicyAsAdmin, false), }, s.commonFlags..., @@ -894,6 +896,8 @@ func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() { groupID := s.group.Id + thresholdDecisionPolicyFile := testutil.WriteToNewTempFile(s.T(), `{"@type": "/cosmos.group.v1.ThresholdDecisionPolicy","threshold": "1","windows": {"voting_period":"1s"}}`) + testCases := []struct { name string args []string @@ -909,7 +913,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() { val.Address.String(), fmt.Sprintf("%v", groupID), validMetadata, - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), }, s.commonFlags..., ), @@ -925,7 +929,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() { val.Address.String(), fmt.Sprintf("%v", groupID), validMetadata, - "{\"@type\":\"/cosmos.group.v1.PercentageDecisionPolicy\", \"percentage\":\"0.5\", \"windows\":{\"voting_period\":\"1s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.PercentageDecisionPolicy", "percentage":"0.5", "windows":{"voting_period":"1s"}}`).Name(), }, s.commonFlags..., ), @@ -941,7 +945,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() { val.Address.String(), fmt.Sprintf("%v", groupID), validMetadata, - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, s.commonFlags..., @@ -958,7 +962,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() { wrongAdmin.String(), fmt.Sprintf("%v", groupID), validMetadata, - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), }, s.commonFlags..., ), @@ -974,7 +978,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() { val.Address.String(), fmt.Sprintf("%v", groupID), strings.Repeat("a", 500), - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), }, s.commonFlags..., ), @@ -990,7 +994,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() { val.Address.String(), "10", validMetadata, - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + thresholdDecisionPolicyFile.Name(), }, s.commonFlags..., ), @@ -1006,7 +1010,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() { val.Address.String(), fmt.Sprintf("%v", groupID), validMetadata, - "{\"@type\":\"/cosmos.group.v1.PercentageDecisionPolicy\", \"percentage\":\"-0.5\", \"windows\":{\"voting_period\":\"1s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.PercentageDecisionPolicy", "percentage":"-0.5", "windows":{"voting_period":"1s"}}`).Name(), }, s.commonFlags..., ), @@ -1022,7 +1026,7 @@ func (s *IntegrationTestSuite) TestTxCreateGroupPolicy() { val.Address.String(), fmt.Sprintf("%v", groupID), validMetadata, - "{\"@type\":\"/cosmos.group.v1.PercentageDecisionPolicy\", \"percentage\":\"2\", \"windows\":{\"voting_period\":\"1s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.PercentageDecisionPolicy", "percentage":"2", "windows":{"voting_period":"1s"}}`).Name(), }, s.commonFlags..., ), @@ -1176,7 +1180,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyDecisionPolicy() { []string{ groupPolicy.Admin, groupPolicy.Address, - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"40000s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"1", "windows":{"voting_period":"40000s"}}`).Name(), }, commonFlags..., ), @@ -1191,7 +1195,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyDecisionPolicy() { []string{ groupPolicy.Admin, groupPolicy.Address, - "{\"@type\":\"/cosmos.group.v1.PercentageDecisionPolicy\", \"percentage\":\"0.5\", \"windows\":{\"voting_period\":\"40000s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.PercentageDecisionPolicy", "percentage":"0.5", "windows":{"voting_period":"40000s"}}`).Name(), }, commonFlags..., ), @@ -1206,7 +1210,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyDecisionPolicy() { []string{ groupPolicy.Admin, groupPolicy.Address, - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"50000s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"1", "windows":{"voting_period":"50000s"}}`).Name(), fmt.Sprintf("--%s=%s", flags.FlagSignMode, flags.SignModeLegacyAminoJSON), }, commonFlags..., @@ -1222,7 +1226,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyDecisionPolicy() { []string{ newAdmin.String(), groupPolicy.Address, - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"1", "windows":{"voting_period":"1s"}}`).Name(), }, commonFlags..., ), @@ -1237,7 +1241,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyDecisionPolicy() { []string{ groupPolicy.Admin, newAdmin.String(), - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"1\", \"windows\":{\"voting_period\":\"1s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"1", "windows":{"voting_period":"1s"}}`).Name(), }, commonFlags..., ), @@ -1252,7 +1256,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyDecisionPolicy() { []string{ groupPolicy.Admin, groupPolicy.Address, - "{\"@type\":\"/cosmos.group.v1.PercentageDecisionPolicy\", \"percentage\":\"-0.5\", \"windows\":{\"voting_period\":\"1s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.PercentageDecisionPolicy", "percentage":"-0.5", "windows":{"voting_period":"1s"}}`).Name(), }, commonFlags..., ), @@ -1267,7 +1271,7 @@ func (s *IntegrationTestSuite) TestTxUpdateGroupPolicyDecisionPolicy() { []string{ groupPolicy.Admin, groupPolicy.Address, - "{\"@type\":\"/cosmos.group.v1.PercentageDecisionPolicy\", \"percentage\":\"2\", \"windows\":{\"voting_period\":\"40000s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.PercentageDecisionPolicy", "percentage":"2", "windows":{"voting_period":"40000s"}}`).Name(), }, commonFlags..., ), @@ -2109,7 +2113,7 @@ func (s *IntegrationTestSuite) TestTxLeaveGroup() { val.Address.String(), groupID, "AQ==", - "{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"3\", \"windows\":{\"voting_period\":\"1s\"}}", + testutil.WriteToNewTempFile(s.T(), `{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"3", "windows":{"voting_period":"1s"}}`).Name(), }, s.commonFlags..., ), @@ -2529,7 +2533,7 @@ func (s *IntegrationTestSuite) createGroupThresholdPolicyWithBalance(adminAddres adminAddress, groupID, validMetadata, - fmt.Sprintf("{\"@type\":\"/cosmos.group.v1.ThresholdDecisionPolicy\", \"threshold\":\"%d\", \"windows\":{\"voting_period\":\"30000s\"}}", threshold), + testutil.WriteToNewTempFile(s.T(), fmt.Sprintf(`{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"%d", "windows":{"voting_period":"30000s"}}`, threshold)).Name(), }, s.commonFlags..., ), diff --git a/x/group/spec/05_client.md b/x/group/spec/05_client.md index d46672fd3ef6..c39e503fd7e8 100644 --- a/x/group/spec/05_client.md +++ b/x/group/spec/05_client.md @@ -60,7 +60,7 @@ Example Output: address: cosmos1.. admin: cosmos1.. decision_policy: - '@type': /cosmos.group.v1beta1.ThresholdDecisionPolicy + '@type': /cosmos.group.v1.ThresholdDecisionPolicy threshold: "1" windows: min_execution_period: 0s @@ -157,7 +157,7 @@ group_policies: - address: cosmos1.. admin: cosmos1.. decision_policy: - '@type': /cosmos.group.v1beta1.ThresholdDecisionPolicy + '@type': /cosmos.group.v1.ThresholdDecisionPolicy threshold: "1" windows: min_execution_period: 0s @@ -168,7 +168,7 @@ group_policies: - address: cosmos1.. admin: cosmos1.. decision_policy: - '@type': /cosmos.group.v1beta1.ThresholdDecisionPolicy + '@type': /cosmos.group.v1.ThresholdDecisionPolicy threshold: "1" windows: min_execution_period: 0s @@ -202,7 +202,7 @@ group_policies: - address: cosmos1.. admin: cosmos1.. decision_policy: - '@type': /cosmos.group.v1beta1.ThresholdDecisionPolicy + '@type': /cosmos.group.v1.ThresholdDecisionPolicy threshold: "1" windows: min_execution_period: 0s @@ -213,7 +213,7 @@ group_policies: - address: cosmos1.. admin: cosmos1.. decision_policy: - '@type': /cosmos.group.v1beta1.ThresholdDecisionPolicy + '@type': /cosmos.group.v1.ThresholdDecisionPolicy threshold: "1" windows: min_execution_period: 0s @@ -478,7 +478,7 @@ simd tx group create-group-policy [admin] [group-id] [metadata] [decision-policy Example: ```bash -simd tx group create-group-policy cosmos1.. 1 "AQ==" '{"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy", "threshold":"1", "windows": {"voting_period": "120h", "min_execution_period": "0s"}}' +simd tx group create-group-policy cosmos1.. 1 "AQ==" '{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"1", "windows": {"voting_period": "120h", "min_execution_period": "0s"}}' ``` #### create-group-with-policy @@ -492,7 +492,7 @@ simd tx group create-group-with-policy [admin] [group-metadata] [group-policy-me Example: ```bash -simd tx group create-group-with-policy cosmos1.. "AQ==" "AQ==" members.json '{"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy", "threshold":"1", "windows": {"voting_period": "120h", "min_execution_period": "0s"}}' +simd tx group create-group-with-policy cosmos1.. "AQ==" "AQ==" members.json '{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"1", "windows": {"voting_period": "120h", "min_execution_period": "0s"}}' ``` #### update-group-policy-admin @@ -534,7 +534,7 @@ simd tx group update-group-policy-decision-policy [admin] [group-policy-account Example: ```bash -simd tx group update-group-policy-decision-policy cosmos1.. cosmos1.. '{"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy", "threshold":"2", "windows": {"voting_period": "120h", "min_execution_period": "0s"}}' +simd tx group update-group-policy-decision-policy cosmos1.. cosmos1.. '{"@type":"/cosmos.group.v1.ThresholdDecisionPolicy", "threshold":"2", "windows": {"voting_period": "120h", "min_execution_period": "0s"}}' ``` #### create-proposal @@ -616,14 +616,14 @@ A user can query the `group` module using gRPC endpoints. The `GroupInfo` endpoint allows users to query for group info by given group id. ```bash -cosmos.group.v1beta1.Query/GroupInfo +cosmos.group.v1.Query/GroupInfo ``` Example: ```bash grpcurl -plaintext \ - -d '{"group_id":1}' localhost:9090 cosmos.group.v1beta1.Query/GroupInfo + -d '{"group_id":1}' localhost:9090 cosmos.group.v1.Query/GroupInfo ``` Example Output: @@ -645,14 +645,14 @@ Example Output: The `GroupPolicyInfo` endpoint allows users to query for group policy info by account address of group policy. ```bash -cosmos.group.v1beta1.Query/GroupPolicyInfo +cosmos.group.v1.Query/GroupPolicyInfo ``` Example: ```bash grpcurl -plaintext \ - -d '{"address":"cosmos1.."}' localhost:9090 cosmos.group.v1beta1.Query/GroupPolicyInfo + -d '{"address":"cosmos1.."}' localhost:9090 cosmos.group.v1.Query/GroupPolicyInfo ``` Example Output: @@ -664,7 +664,7 @@ Example Output: "groupId": "1", "admin": "cosmos1..", "version": "1", - "decisionPolicy": {"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy","threshold":"1","windows": {"voting_period": "120h", "min_execution_period": "0s"}}, + "decisionPolicy": {"@type":"/cosmos.group.v1.ThresholdDecisionPolicy","threshold":"1","windows": {"voting_period": "120h", "min_execution_period": "0s"}}, } } ``` @@ -674,14 +674,14 @@ Example Output: The `GroupMembers` endpoint allows users to query for group members by group id with pagination flags. ```bash -cosmos.group.v1beta1.Query/GroupMembers +cosmos.group.v1.Query/GroupMembers ``` Example: ```bash grpcurl -plaintext \ - -d '{"group_id":"1"}' localhost:9090 cosmos.group.v1beta1.Query/GroupMembers + -d '{"group_id":"1"}' localhost:9090 cosmos.group.v1.Query/GroupMembers ``` Example Output: @@ -715,14 +715,14 @@ Example Output: The `GroupsByAdmin` endpoint allows users to query for groups by admin account address with pagination flags. ```bash -cosmos.group.v1beta1.Query/GroupsByAdmin +cosmos.group.v1.Query/GroupsByAdmin ``` Example: ```bash grpcurl -plaintext \ - -d '{"admin":"cosmos1.."}' localhost:9090 cosmos.group.v1beta1.Query/GroupsByAdmin + -d '{"admin":"cosmos1.."}' localhost:9090 cosmos.group.v1.Query/GroupsByAdmin ``` Example Output: @@ -756,14 +756,14 @@ Example Output: The `GroupPoliciesByGroup` endpoint allows users to query for group policies by group id with pagination flags. ```bash -cosmos.group.v1beta1.Query/GroupPoliciesByGroup +cosmos.group.v1.Query/GroupPoliciesByGroup ``` Example: ```bash grpcurl -plaintext \ - -d '{"group_id":"1"}' localhost:9090 cosmos.group.v1beta1.Query/GroupPoliciesByGroup + -d '{"group_id":"1"}' localhost:9090 cosmos.group.v1.Query/GroupPoliciesByGroup ``` Example Output: @@ -776,14 +776,14 @@ Example Output: "groupId": "1", "admin": "cosmos1..", "version": "1", - "decisionPolicy": {"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy","threshold":"1","windows":{"voting_period": "120h", "min_execution_period": "0s"}}, + "decisionPolicy": {"@type":"/cosmos.group.v1.ThresholdDecisionPolicy","threshold":"1","windows":{"voting_period": "120h", "min_execution_period": "0s"}}, }, { "address": "cosmos1..", "groupId": "1", "admin": "cosmos1..", "version": "1", - "decisionPolicy": {"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy","threshold":"1","windows":{"voting_period": "120h", "min_execution_period": "0s"}}, + "decisionPolicy": {"@type":"/cosmos.group.v1.ThresholdDecisionPolicy","threshold":"1","windows":{"voting_period": "120h", "min_execution_period": "0s"}}, } ], "pagination": { @@ -797,14 +797,14 @@ Example Output: The `GroupPoliciesByAdmin` endpoint allows users to query for group policies by admin account address with pagination flags. ```bash -cosmos.group.v1beta1.Query/GroupPoliciesByAdmin +cosmos.group.v1.Query/GroupPoliciesByAdmin ``` Example: ```bash grpcurl -plaintext \ - -d '{"admin":"cosmos1.."}' localhost:9090 cosmos.group.v1beta1.Query/GroupPoliciesByAdmin + -d '{"admin":"cosmos1.."}' localhost:9090 cosmos.group.v1.Query/GroupPoliciesByAdmin ``` Example Output: @@ -817,14 +817,14 @@ Example Output: "groupId": "1", "admin": "cosmos1..", "version": "1", - "decisionPolicy": {"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy","threshold":"1","windows":{"voting_period": "120h", "min_execution_period": "0s"}}, + "decisionPolicy": {"@type":"/cosmos.group.v1.ThresholdDecisionPolicy","threshold":"1","windows":{"voting_period": "120h", "min_execution_period": "0s"}}, }, { "address": "cosmos1..", "groupId": "1", "admin": "cosmos1..", "version": "1", - "decisionPolicy": {"@type":"/cosmos.group.v1beta1.ThresholdDecisionPolicy","threshold":"1","windows":{"voting_period": "120h", "min_execution_period": "0s"}}, + "decisionPolicy": {"@type":"/cosmos.group.v1.ThresholdDecisionPolicy","threshold":"1","windows":{"voting_period": "120h", "min_execution_period": "0s"}}, } ], "pagination": { @@ -838,14 +838,14 @@ Example Output: The `Proposal` endpoint allows users to query for proposal by id. ```bash -cosmos.group.v1beta1.Query/Proposal +cosmos.group.v1.Query/Proposal ``` Example: ```bash grpcurl -plaintext \ - -d '{"proposal_id":"1"}' localhost:9090 cosmos.group.v1beta1.Query/Proposal + -d '{"proposal_id":"1"}' localhost:9090 cosmos.group.v1.Query/Proposal ``` Example Output: @@ -886,14 +886,14 @@ Example Output: The `ProposalsByGroupPolicy` endpoint allows users to query for proposals by account address of group policy with pagination flags. ```bash -cosmos.group.v1beta1.Query/ProposalsByGroupPolicy +cosmos.group.v1.Query/ProposalsByGroupPolicy ``` Example: ```bash grpcurl -plaintext \ - -d '{"address":"cosmos1.."}' localhost:9090 cosmos.group.v1beta1.Query/ProposalsByGroupPolicy + -d '{"address":"cosmos1.."}' localhost:9090 cosmos.group.v1.Query/ProposalsByGroupPolicy ``` Example Output: @@ -939,14 +939,14 @@ Example Output: The `VoteByProposalVoter` endpoint allows users to query for vote by proposal id and voter account address. ```bash -cosmos.group.v1beta1.Query/VoteByProposalVoter +cosmos.group.v1.Query/VoteByProposalVoter ``` Example: ```bash grpcurl -plaintext \ - -d '{"proposal_id":"1","voter":"cosmos1.."}' localhost:9090 cosmos.group.v1beta1.Query/VoteByProposalVoter + -d '{"proposal_id":"1","voter":"cosmos1.."}' localhost:9090 cosmos.group.v1.Query/VoteByProposalVoter ``` Example Output: @@ -967,14 +967,14 @@ Example Output: The `VotesByProposal` endpoint allows users to query for votes by proposal id with pagination flags. ```bash -cosmos.group.v1beta1.Query/VotesByProposal +cosmos.group.v1.Query/VotesByProposal ``` Example: ```bash grpcurl -plaintext \ - -d '{"proposal_id":"1"}' localhost:9090 cosmos.group.v1beta1.Query/VotesByProposal + -d '{"proposal_id":"1"}' localhost:9090 cosmos.group.v1.Query/VotesByProposal ``` Example Output: @@ -1000,14 +1000,14 @@ Example Output: The `VotesByVoter` endpoint allows users to query for votes by voter account address with pagination flags. ```bash -cosmos.group.v1beta1.Query/VotesByVoter +cosmos.group.v1.Query/VotesByVoter ``` Example: ```bash grpcurl -plaintext \ - -d '{"voter":"cosmos1.."}' localhost:9090 cosmos.group.v1beta1.Query/VotesByVoter + -d '{"voter":"cosmos1.."}' localhost:9090 cosmos.group.v1.Query/VotesByVoter ``` Example Output: @@ -1085,7 +1085,7 @@ Example Output: "metadata": "AQ==", "version": "1", "decision_policy": { - "@type": "/cosmos.group.v1beta1.ThresholdDecisionPolicy", + "@type": "/cosmos.group.v1.ThresholdDecisionPolicy", "threshold": "1", "windows": { "voting_period": "120h", @@ -1205,7 +1205,7 @@ Example Output: "metadata": "AQ==", "version": "1", "decision_policy": { - "@type": "/cosmos.group.v1beta1.ThresholdDecisionPolicy", + "@type": "/cosmos.group.v1.ThresholdDecisionPolicy", "threshold": "1", "windows": { "voting_period": "120h", @@ -1220,7 +1220,7 @@ Example Output: "metadata": "AQ==", "version": "1", "decision_policy": { - "@type": "/cosmos.group.v1beta1.ThresholdDecisionPolicy", + "@type": "/cosmos.group.v1.ThresholdDecisionPolicy", "threshold": "1", "windows": { "voting_period": "120h", @@ -1262,7 +1262,7 @@ Example Output: "metadata": "AQ==", "version": "1", "decision_policy": { - "@type": "/cosmos.group.v1beta1.ThresholdDecisionPolicy", + "@type": "/cosmos.group.v1.ThresholdDecisionPolicy", "threshold": "1", "windows": { "voting_period": "120h", @@ -1277,7 +1277,7 @@ Example Output: "metadata": "AQ==", "version": "1", "decision_policy": { - "@type": "/cosmos.group.v1beta1.ThresholdDecisionPolicy", + "@type": "/cosmos.group.v1.ThresholdDecisionPolicy", "threshold": "1", "windows": { "voting_period": "120h", diff --git a/x/mint/migrations/v2/migrate.go b/x/mint/migrations/v2/migrate.go index 2589eb3fd5c3..22f814ffc6d5 100644 --- a/x/mint/migrations/v2/migrate.go +++ b/x/mint/migrations/v2/migrate.go @@ -11,9 +11,7 @@ const ( ModuleName = "mint" ) -var ( - ParamsKey = []byte{0x01} -) +var ParamsKey = []byte{0x01} // Migrate migrates the x/mint module state from the consensus version 1 to // version 2. Specifically, it takes the parameters that are currently stored diff --git a/x/params/module.go b/x/params/module.go index 535920c6a25e..bcff2504f2cc 100644 --- a/x/params/module.go +++ b/x/params/module.go @@ -213,7 +213,7 @@ type subspaceInputs struct { func provideSubspace(in subspaceInputs) types.Subspace { moduleName := in.Key.Name() - var kt, exists = in.KeyTables[moduleName] + kt, exists := in.KeyTables[moduleName] if !exists { return in.Keeper.Subspace(moduleName) } else { diff --git a/x/slashing/keeper/keeper.go b/x/slashing/keeper/keeper.go index 89b97367507f..8fe32f9edb32 100644 --- a/x/slashing/keeper/keeper.go +++ b/x/slashing/keeper/keeper.go @@ -26,7 +26,6 @@ type Keeper struct { // NewKeeper creates a slashing keeper func NewKeeper(cdc codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key storetypes.StoreKey, sk types.StakingKeeper, authority string) Keeper { - return Keeper{ storeKey: key, cdc: cdc, diff --git a/x/slashing/keeper/migrations.go b/x/slashing/keeper/migrations.go index d06a372262ad..07ded76095d5 100644 --- a/x/slashing/keeper/migrations.go +++ b/x/slashing/keeper/migrations.go @@ -4,7 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/slashing/exported" v043 "github.com/cosmos/cosmos-sdk/x/slashing/migrations/v043" - v2 "github.com/cosmos/cosmos-sdk/x/slashing/migrations/v2" + v3 "github.com/cosmos/cosmos-sdk/x/slashing/migrations/v3" ) // Migrator is a struct for handling in-place store migrations. @@ -28,5 +28,5 @@ func (m Migrator) Migrate1to2(ctx sdk.Context) error { // and managed by the x/params modules and stores them directly into the x/slashing // module state. func (m Migrator) Migrate2to3(ctx sdk.Context) error { - return v2.Migrate(ctx, ctx.KVStore(m.keeper.storeKey), m.legacySubspace, m.keeper.cdc) + return v3.Migrate(ctx, ctx.KVStore(m.keeper.storeKey), m.legacySubspace, m.keeper.cdc) } diff --git a/x/slashing/keeper/querier.go b/x/slashing/keeper/querier.go deleted file mode 100644 index 036f3a16dde3..000000000000 --- a/x/slashing/keeper/querier.go +++ /dev/null @@ -1,92 +0,0 @@ -package keeper - -import ( - abci "github.com/tendermint/tendermint/abci/types" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/x/slashing/types" -) - -// NewQuerier creates a new querier for slashing clients. -func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error) { - switch path[0] { - case types.QueryParameters: - return queryParams(ctx, k, legacyQuerierCdc) - - case types.QuerySigningInfo: - return querySigningInfo(ctx, req, k, legacyQuerierCdc) - - case types.QuerySigningInfos: - return querySigningInfos(ctx, req, k, legacyQuerierCdc) - - default: - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown %s query endpoint: %s", types.ModuleName, path[0]) - } - } -} - -func queryParams(ctx sdk.Context, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { - params := k.GetParams(ctx) - - res, err := codec.MarshalJSONIndent(legacyQuerierCdc, params) - if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) - } - - return res, nil -} - -func querySigningInfo(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { - var params types.QuerySigningInfoRequest - - err := legacyQuerierCdc.UnmarshalJSON(req.Data, ¶ms) - if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) - } - - signingInfo, found := k.GetValidatorSigningInfo(ctx, sdk.ConsAddress(params.ConsAddress)) - if !found { - return nil, sdkerrors.Wrap(types.ErrNoSigningInfoFound, params.ConsAddress) - } - - res, err := codec.MarshalJSONIndent(legacyQuerierCdc, signingInfo) - if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) - } - - return res, nil -} - -func querySigningInfos(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { - var params types.QuerySigningInfosParams - - err := legacyQuerierCdc.UnmarshalJSON(req.Data, ¶ms) - if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) - } - - var signingInfos []types.ValidatorSigningInfo - - k.IterateValidatorSigningInfos(ctx, func(consAddr sdk.ConsAddress, info types.ValidatorSigningInfo) (stop bool) { - signingInfos = append(signingInfos, info) - return false - }) - - start, end := client.Paginate(len(signingInfos), params.Page, params.Limit, int(k.sk.MaxValidators(ctx))) - if start < 0 || end < 0 { - signingInfos = []types.ValidatorSigningInfo{} - } else { - signingInfos = signingInfos[start:end] - } - - res, err := codec.MarshalJSONIndent(legacyQuerierCdc, signingInfos) - if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) - } - - return res, nil -} diff --git a/x/slashing/keeper/querier_test.go b/x/slashing/keeper/querier_test.go deleted file mode 100644 index c34965f62f21..000000000000 --- a/x/slashing/keeper/querier_test.go +++ /dev/null @@ -1,72 +0,0 @@ -package keeper_test - -import ( - "testing" - - "github.com/stretchr/testify/require" - - abci "github.com/tendermint/tendermint/abci/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - - "github.com/cosmos/cosmos-sdk/codec" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - "github.com/cosmos/cosmos-sdk/x/slashing/keeper" - slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" - "github.com/cosmos/cosmos-sdk/x/slashing/testslashing" - "github.com/cosmos/cosmos-sdk/x/slashing/testutil" - "github.com/cosmos/cosmos-sdk/x/slashing/types" -) - -func TestNewQuerier(t *testing.T) { - var slashingKeeper slashingkeeper.Keeper - var legacyAmino *codec.LegacyAmino - app, err := simtestutil.Setup( - testutil.AppConfig, - &legacyAmino, - &slashingKeeper, - ) - require.NoError(t, err) - - ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - slashingKeeper.SetParams(ctx, testslashing.TestParams()) - legacyQuerierCdc := codec.NewAminoCodec(legacyAmino) - querier := keeper.NewQuerier(slashingKeeper, legacyQuerierCdc.LegacyAmino) - - query := abci.RequestQuery{ - Path: "", - Data: []byte{}, - } - - _, err = querier(ctx, []string{types.QueryParameters}, query) - require.NoError(t, err) -} - -func TestQueryParams(t *testing.T) { - var slashingKeeper slashingkeeper.Keeper - app, err := simtestutil.Setup( - testutil.AppConfig, - &slashingKeeper, - ) - require.NoError(t, err) - - cdc := codec.NewLegacyAmino() - legacyQuerierCdc := codec.NewAminoCodec(cdc) - ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - slashingKeeper.SetParams(ctx, testslashing.TestParams()) - - querier := keeper.NewQuerier(slashingKeeper, legacyQuerierCdc.LegacyAmino) - - query := abci.RequestQuery{ - Path: "", - Data: []byte{}, - } - - var params types.Params - - res, err := querier(ctx, []string{types.QueryParameters}, query) - require.NoError(t, err) - - err = cdc.UnmarshalJSON(res, ¶ms) - require.NoError(t, err) - require.Equal(t, slashingKeeper.GetParams(ctx), params) -} diff --git a/x/slashing/migrations/v2/migrate.go b/x/slashing/migrations/v3/migrate.go similarity index 94% rename from x/slashing/migrations/v2/migrate.go rename to x/slashing/migrations/v3/migrate.go index cd411b4c0929..f7db99e31826 100644 --- a/x/slashing/migrations/v2/migrate.go +++ b/x/slashing/migrations/v3/migrate.go @@ -1,4 +1,4 @@ -package v2 +package v3 import ( "github.com/cosmos/cosmos-sdk/codec" @@ -11,9 +11,7 @@ const ( ModuleName = "slashing" ) -var ( - ParamsKey = []byte{0x00} -) +var ParamsKey = []byte{0x00} // Migrate migrates the x/slashing module state from the consensus version 2 to // version 3. Specifically, it takes the parameters that are currently stored diff --git a/x/slashing/migrations/v2/migrator_test.go b/x/slashing/migrations/v3/migrator_test.go similarity index 82% rename from x/slashing/migrations/v2/migrator_test.go rename to x/slashing/migrations/v3/migrator_test.go index de0979b4036d..4030a2360df0 100644 --- a/x/slashing/migrations/v2/migrator_test.go +++ b/x/slashing/migrations/v3/migrator_test.go @@ -1,4 +1,4 @@ -package v2_test +package v3_test import ( "testing" @@ -7,11 +7,10 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" - moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/slashing" "github.com/cosmos/cosmos-sdk/x/slashing/exported" - v2 "github.com/cosmos/cosmos-sdk/x/slashing/migrations/v2" + v3 "github.com/cosmos/cosmos-sdk/x/slashing/migrations/v3" "github.com/cosmos/cosmos-sdk/x/slashing/types" ) @@ -31,16 +30,16 @@ func TestMigrate(t *testing.T) { encCfg := moduletestutil.MakeTestEncodingConfig(slashing.AppModuleBasic{}) cdc := encCfg.Codec - storeKey := sdk.NewKVStoreKey(v2.ModuleName) + storeKey := sdk.NewKVStoreKey(v3.ModuleName) tKey := sdk.NewTransientStoreKey("transient_test") ctx := testutil.DefaultContext(storeKey, tKey) store := ctx.KVStore(storeKey) legacySubspace := newMockSubspace(types.DefaultParams()) - require.NoError(t, v2.Migrate(ctx, store, legacySubspace, cdc)) + require.NoError(t, v3.Migrate(ctx, store, legacySubspace, cdc)) var res types.Params - bz := store.Get(v2.ParamsKey) + bz := store.Get(v3.ParamsKey) require.NoError(t, cdc.Unmarshal(bz, &res)) require.Equal(t, legacySubspace.ps, res) } diff --git a/x/slashing/module.go b/x/slashing/module.go index a9d30d85afab..239465983b1b 100644 --- a/x/slashing/module.go +++ b/x/slashing/module.go @@ -8,29 +8,27 @@ import ( modulev1 "cosmossdk.io/api/cosmos/slashing/module/v1" "cosmossdk.io/core/appmodule" - staking "github.com/cosmos/cosmos-sdk/x/staking/types" - + "cosmossdk.io/depinject" gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - "cosmossdk.io/depinject" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" store "github.com/cosmos/cosmos-sdk/store/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/cosmos-sdk/x/slashing/client/cli" "github.com/cosmos/cosmos-sdk/x/slashing/exported" "github.com/cosmos/cosmos-sdk/x/slashing/keeper" "github.com/cosmos/cosmos-sdk/x/slashing/simulation" "github.com/cosmos/cosmos-sdk/x/slashing/types" + staking "github.com/cosmos/cosmos-sdk/x/staking/types" ) // ConsensusVersion defines the current x/slashing module consensus version. @@ -142,7 +140,9 @@ func (AppModule) QuerierRoute() string { // LegacyQuerierHandler returns the slashing module sdk.Querier. func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return keeper.NewQuerier(am.keeper, legacyQuerierCdc) + return func(sdk.Context, []string, abci.RequestQuery) ([]byte, error) { + return nil, fmt.Errorf("legacy querier not supported for the x/%s module", types.ModuleName) + } } // RegisterServices registers module services. diff --git a/x/staking/keeper/val_state_change.go b/x/staking/keeper/val_state_change.go index 22f699366119..867ca04a7099 100644 --- a/x/staking/keeper/val_state_change.go +++ b/x/staking/keeper/val_state_change.go @@ -250,7 +250,7 @@ func (k Keeper) unbondedToBonded(ctx sdk.Context, validator types.Validator) (ty // UnbondingToUnbonded switches a validator from unbonding state to unbonded state func (k Keeper) UnbondingToUnbonded(ctx sdk.Context, validator types.Validator) types.Validator { if !validator.IsUnbonding() { - panic(fmt.Sprintf("bad state transition unbondingToBonded, validator: %v\n", validator)) + panic(fmt.Sprintf("bad state transition unbondingToUnbonded, validator: %v\n", validator)) } return k.completeUnbondingValidator(ctx, validator) From 8dc97c59e77297f495337638005a2d714c614a3a Mon Sep 17 00:00:00 2001 From: atheesh Date: Tue, 19 Jul 2022 12:57:29 +0530 Subject: [PATCH 02/33] add migrations --- x/gov/keeper/migrations.go | 2 +- x/gov/migrations/v046/store.go | 16 +++++----- x/gov/migrations/v046/store_test.go | 48 ++++++++++++++++++++++++++++- x/gov/types/v1/codec.go | 4 +-- 4 files changed, 58 insertions(+), 12 deletions(-) diff --git a/x/gov/keeper/migrations.go b/x/gov/keeper/migrations.go index 65a1918fff8a..7bbde01a8d82 100644 --- a/x/gov/keeper/migrations.go +++ b/x/gov/keeper/migrations.go @@ -28,5 +28,5 @@ func (m Migrator) Migrate1to2(ctx sdk.Context) error { // Migrate2to3 migrates from version 2 to 3. func (m Migrator) Migrate2to3(ctx sdk.Context) error { - return v046.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc) + return v046.MigrateStore(ctx, m.keeper.storeKey, m.legacySubspace, m.keeper.cdc) } diff --git a/x/gov/migrations/v046/store.go b/x/gov/migrations/v046/store.go index e9a34f269aed..6d7f502fb27a 100644 --- a/x/gov/migrations/v046/store.go +++ b/x/gov/migrations/v046/store.go @@ -45,20 +45,20 @@ func migrateProposals(store sdk.KVStore, cdc codec.BinaryCodec) error { func migrateParams(ctx sdk.Context, storeKey storetypes.StoreKey, legacySubspace exported.ParamSubspace, cdc codec.BinaryCodec) error { store := ctx.KVStore(storeKey) - dp := v1beta1.DepositParams{} - vp := v1beta1.VotingParams{} - tp := v1beta1.TallyParams{} + dp := v1.DepositParams{} + vp := v1.VotingParams{} + tp := v1.TallyParams{} legacySubspace.Get(ctx, v1.ParamStoreKeyDepositParams, &dp) legacySubspace.Get(ctx, v1.ParamStoreKeyVotingParams, &vp) legacySubspace.Get(ctx, v1.ParamStoreKeyTallyParams, &tp) params := v1.NewParams( dp.MinDeposit, - dp.MaxDepositPeriod, - vp.VotingPeriod, - tp.Quorum.String(), - tp.Threshold.String(), - tp.VetoThreshold.String(), + *dp.MaxDepositPeriod, + *vp.VotingPeriod, + tp.Quorum, + tp.Threshold, + tp.VetoThreshold, ) bz, err := cdc.Marshal(¶ms) diff --git a/x/gov/migrations/v046/store_test.go b/x/gov/migrations/v046/store_test.go index a9318f9390a9..ee77e4b59c91 100644 --- a/x/gov/migrations/v046/store_test.go +++ b/x/gov/migrations/v046/store_test.go @@ -16,6 +16,40 @@ import ( upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) +type mockSubspace struct { + dp v1.DepositParams + vp v1.VotingParams + tp v1.TallyParams +} + +func newMockSubspace(p v1.Params) mockSubspace { + return mockSubspace{ + dp: v1.DepositParams{ + MinDeposit: p.MinDeposit, + MaxDepositPeriod: p.MaxDepositPeriod, + }, + vp: v1.VotingParams{ + VotingPeriod: p.VotingPeriod, + }, + tp: v1.TallyParams{ + Quorum: p.Quorum, + Threshold: p.Threshold, + VetoThreshold: p.VetoThreshold, + }, + } +} + +func (ms mockSubspace) Get(ctx sdk.Context, key []byte, ptr interface{}) { + switch string(key) { + case string(v1.ParamStoreKeyDepositParams): + *ptr.(*v1.DepositParams) = ms.dp + case string(v1.ParamStoreKeyVotingParams): + *ptr.(*v1.VotingParams) = ms.vp + case string(v1.ParamStoreKeyTallyParams): + *ptr.(*v1.TallyParams) = ms.tp + } +} + func TestMigrateStore(t *testing.T) { cdc := simapp.MakeTestEncodingConfig().Codec govKey := sdk.NewKVStoreKey("gov") @@ -39,8 +73,9 @@ func TestMigrateStore(t *testing.T) { store.Set(v042gov.ProposalKey(prop1.ProposalId), prop1Bz) store.Set(v042gov.ProposalKey(prop2.ProposalId), prop2Bz) + legacySubspace := newMockSubspace(v1.DefaultParams()) // Run migrations. - err = v046gov.MigrateStore(ctx, govKey, cdc) + err = v046gov.MigrateStore(ctx, govKey, legacySubspace, cdc) require.NoError(t, err) var newProp1 v1.Proposal @@ -52,6 +87,17 @@ func TestMigrateStore(t *testing.T) { err = cdc.Unmarshal(store.Get(v042gov.ProposalKey(prop2.ProposalId)), &newProp2) require.NoError(t, err) compareProps(t, prop2, newProp2) + + var params v1.Params + bz := store.Get(v046gov.ParamsKey) + require.NoError(t, cdc.Unmarshal(bz, ¶ms)) + require.NotNil(t, params) + require.Equal(t, legacySubspace.dp.MinDeposit, params.MinDeposit) + require.Equal(t, legacySubspace.dp.MaxDepositPeriod, params.MaxDepositPeriod) + require.Equal(t, legacySubspace.vp.VotingPeriod, params.VotingPeriod) + require.Equal(t, legacySubspace.tp.Quorum, params.Quorum) + require.Equal(t, legacySubspace.tp.Threshold, params.Threshold) + require.Equal(t, legacySubspace.tp.VetoThreshold, params.VetoThreshold) } func compareProps(t *testing.T, oldProp v1beta1.Proposal, newProp v1.Proposal) { diff --git a/x/gov/types/v1/codec.go b/x/gov/types/v1/codec.go index 6574ca57cbe2..51bc036a194d 100644 --- a/x/gov/types/v1/codec.go +++ b/x/gov/types/v1/codec.go @@ -19,7 +19,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { legacy.RegisterAminoMsg(cdc, &MsgVote{}, "cosmos-sdk/v1/MsgVote") legacy.RegisterAminoMsg(cdc, &MsgVoteWeighted{}, "cosmos-sdk/v1/MsgVoteWeighted") legacy.RegisterAminoMsg(cdc, &MsgExecLegacyContent{}, "cosmos-sdk/v1/MsgExecLegacyContent") - legacy.RegisterAminoMsg(cdc, &MsgSubmitProposal{}, "cosmos-sdk/v1/MsgSubmitProposal") + legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "cosmos-sdk/v1/MsgUpdateParams") } func RegisterInterfaces(registry codectypes.InterfaceRegistry) { @@ -29,7 +29,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &MsgVoteWeighted{}, &MsgDeposit{}, &MsgExecLegacyContent{}, - &MsgSubmitProposal{}, + &MsgUpdateParams{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) From 782a7a9aaaba3fe99841ca4d61fd25a7caf093c4 Mon Sep 17 00:00:00 2001 From: atheesh Date: Tue, 19 Jul 2022 15:22:29 +0530 Subject: [PATCH 03/33] add tests --- .../base/tendermint/v1beta1/query_grpc.pb.go | 343 ++++++++++++++++++ x/gov/abci.go | 2 +- x/gov/keeper/deposit.go | 2 +- x/gov/keeper/grpc_query_test.go | 303 +++++++--------- x/gov/keeper/hooks_test.go | 6 +- x/gov/keeper/params.go | 2 +- x/gov/keeper/proposal.go | 4 +- x/gov/keeper/querier.go | 43 +-- x/gov/keeper/tally.go | 2 +- 9 files changed, 496 insertions(+), 211 deletions(-) create mode 100644 api/cosmos/base/tendermint/v1beta1/query_grpc.pb.go diff --git a/api/cosmos/base/tendermint/v1beta1/query_grpc.pb.go b/api/cosmos/base/tendermint/v1beta1/query_grpc.pb.go new file mode 100644 index 000000000000..b21c4f7f8459 --- /dev/null +++ b/api/cosmos/base/tendermint/v1beta1/query_grpc.pb.go @@ -0,0 +1,343 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: cosmos/base/tendermint/v1beta1/query.proto + +package tendermintv1beta1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// ServiceClient is the client API for Service service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ServiceClient interface { + // GetNodeInfo queries the current node info. + GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoResponse, error) + // GetSyncing queries node syncing. + GetSyncing(ctx context.Context, in *GetSyncingRequest, opts ...grpc.CallOption) (*GetSyncingResponse, error) + // GetLatestBlock returns the latest block. + GetLatestBlock(ctx context.Context, in *GetLatestBlockRequest, opts ...grpc.CallOption) (*GetLatestBlockResponse, error) + // GetBlockByHeight queries block for given height. + GetBlockByHeight(ctx context.Context, in *GetBlockByHeightRequest, opts ...grpc.CallOption) (*GetBlockByHeightResponse, error) + // GetLatestValidatorSet queries latest validator-set. + GetLatestValidatorSet(ctx context.Context, in *GetLatestValidatorSetRequest, opts ...grpc.CallOption) (*GetLatestValidatorSetResponse, error) + // GetValidatorSetByHeight queries validator-set at a given height. + GetValidatorSetByHeight(ctx context.Context, in *GetValidatorSetByHeightRequest, opts ...grpc.CallOption) (*GetValidatorSetByHeightResponse, error) + // ABCIQuery defines a query handler that supports ABCI queries directly to the + // application, bypassing Tendermint completely. The ABCI query must contain + // a valid and supported path, including app, custom, p2p, and store. + // + // Since: cosmos-sdk 0.46 + ABCIQuery(ctx context.Context, in *ABCIQueryRequest, opts ...grpc.CallOption) (*ABCIQueryResponse, error) +} + +type serviceClient struct { + cc grpc.ClientConnInterface +} + +func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient { + return &serviceClient{cc} +} + +func (c *serviceClient) GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoResponse, error) { + out := new(GetNodeInfoResponse) + err := c.cc.Invoke(ctx, "/cosmos.base.tendermint.v1beta1.Service/GetNodeInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) GetSyncing(ctx context.Context, in *GetSyncingRequest, opts ...grpc.CallOption) (*GetSyncingResponse, error) { + out := new(GetSyncingResponse) + err := c.cc.Invoke(ctx, "/cosmos.base.tendermint.v1beta1.Service/GetSyncing", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) GetLatestBlock(ctx context.Context, in *GetLatestBlockRequest, opts ...grpc.CallOption) (*GetLatestBlockResponse, error) { + out := new(GetLatestBlockResponse) + err := c.cc.Invoke(ctx, "/cosmos.base.tendermint.v1beta1.Service/GetLatestBlock", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) GetBlockByHeight(ctx context.Context, in *GetBlockByHeightRequest, opts ...grpc.CallOption) (*GetBlockByHeightResponse, error) { + out := new(GetBlockByHeightResponse) + err := c.cc.Invoke(ctx, "/cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) GetLatestValidatorSet(ctx context.Context, in *GetLatestValidatorSetRequest, opts ...grpc.CallOption) (*GetLatestValidatorSetResponse, error) { + out := new(GetLatestValidatorSetResponse) + err := c.cc.Invoke(ctx, "/cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) GetValidatorSetByHeight(ctx context.Context, in *GetValidatorSetByHeightRequest, opts ...grpc.CallOption) (*GetValidatorSetByHeightResponse, error) { + out := new(GetValidatorSetByHeightResponse) + err := c.cc.Invoke(ctx, "/cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) ABCIQuery(ctx context.Context, in *ABCIQueryRequest, opts ...grpc.CallOption) (*ABCIQueryResponse, error) { + out := new(ABCIQueryResponse) + err := c.cc.Invoke(ctx, "/cosmos.base.tendermint.v1beta1.Service/ABCIQuery", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ServiceServer is the server API for Service service. +// All implementations must embed UnimplementedServiceServer +// for forward compatibility +type ServiceServer interface { + // GetNodeInfo queries the current node info. + GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error) + // GetSyncing queries node syncing. + GetSyncing(context.Context, *GetSyncingRequest) (*GetSyncingResponse, error) + // GetLatestBlock returns the latest block. + GetLatestBlock(context.Context, *GetLatestBlockRequest) (*GetLatestBlockResponse, error) + // GetBlockByHeight queries block for given height. + GetBlockByHeight(context.Context, *GetBlockByHeightRequest) (*GetBlockByHeightResponse, error) + // GetLatestValidatorSet queries latest validator-set. + GetLatestValidatorSet(context.Context, *GetLatestValidatorSetRequest) (*GetLatestValidatorSetResponse, error) + // GetValidatorSetByHeight queries validator-set at a given height. + GetValidatorSetByHeight(context.Context, *GetValidatorSetByHeightRequest) (*GetValidatorSetByHeightResponse, error) + // ABCIQuery defines a query handler that supports ABCI queries directly to the + // application, bypassing Tendermint completely. The ABCI query must contain + // a valid and supported path, including app, custom, p2p, and store. + // + // Since: cosmos-sdk 0.46 + ABCIQuery(context.Context, *ABCIQueryRequest) (*ABCIQueryResponse, error) + mustEmbedUnimplementedServiceServer() +} + +// UnimplementedServiceServer must be embedded to have forward compatible implementations. +type UnimplementedServiceServer struct { +} + +func (UnimplementedServiceServer) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNodeInfo not implemented") +} +func (UnimplementedServiceServer) GetSyncing(context.Context, *GetSyncingRequest) (*GetSyncingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSyncing not implemented") +} +func (UnimplementedServiceServer) GetLatestBlock(context.Context, *GetLatestBlockRequest) (*GetLatestBlockResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLatestBlock not implemented") +} +func (UnimplementedServiceServer) GetBlockByHeight(context.Context, *GetBlockByHeightRequest) (*GetBlockByHeightResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlockByHeight not implemented") +} +func (UnimplementedServiceServer) GetLatestValidatorSet(context.Context, *GetLatestValidatorSetRequest) (*GetLatestValidatorSetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLatestValidatorSet not implemented") +} +func (UnimplementedServiceServer) GetValidatorSetByHeight(context.Context, *GetValidatorSetByHeightRequest) (*GetValidatorSetByHeightResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetValidatorSetByHeight not implemented") +} +func (UnimplementedServiceServer) ABCIQuery(context.Context, *ABCIQueryRequest) (*ABCIQueryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ABCIQuery not implemented") +} +func (UnimplementedServiceServer) mustEmbedUnimplementedServiceServer() {} + +// UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ServiceServer will +// result in compilation errors. +type UnsafeServiceServer interface { + mustEmbedUnimplementedServiceServer() +} + +func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer) { + s.RegisterService(&Service_ServiceDesc, srv) +} + +func _Service_GetNodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNodeInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).GetNodeInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.base.tendermint.v1beta1.Service/GetNodeInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).GetNodeInfo(ctx, req.(*GetNodeInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Service_GetSyncing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSyncingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).GetSyncing(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.base.tendermint.v1beta1.Service/GetSyncing", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).GetSyncing(ctx, req.(*GetSyncingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Service_GetLatestBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLatestBlockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).GetLatestBlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.base.tendermint.v1beta1.Service/GetLatestBlock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).GetLatestBlock(ctx, req.(*GetLatestBlockRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Service_GetBlockByHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBlockByHeightRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).GetBlockByHeight(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).GetBlockByHeight(ctx, req.(*GetBlockByHeightRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Service_GetLatestValidatorSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLatestValidatorSetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).GetLatestValidatorSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).GetLatestValidatorSet(ctx, req.(*GetLatestValidatorSetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Service_GetValidatorSetByHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetValidatorSetByHeightRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).GetValidatorSetByHeight(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).GetValidatorSetByHeight(ctx, req.(*GetValidatorSetByHeightRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Service_ABCIQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ABCIQueryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).ABCIQuery(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.base.tendermint.v1beta1.Service/ABCIQuery", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).ABCIQuery(ctx, req.(*ABCIQueryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Service_ServiceDesc is the grpc.ServiceDesc for Service service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Service_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.base.tendermint.v1beta1.Service", + HandlerType: (*ServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetNodeInfo", + Handler: _Service_GetNodeInfo_Handler, + }, + { + MethodName: "GetSyncing", + Handler: _Service_GetSyncing_Handler, + }, + { + MethodName: "GetLatestBlock", + Handler: _Service_GetLatestBlock_Handler, + }, + { + MethodName: "GetBlockByHeight", + Handler: _Service_GetBlockByHeight_Handler, + }, + { + MethodName: "GetLatestValidatorSet", + Handler: _Service_GetLatestValidatorSet_Handler, + }, + { + MethodName: "GetValidatorSetByHeight", + Handler: _Service_GetValidatorSetByHeight_Handler, + }, + { + MethodName: "ABCIQuery", + Handler: _Service_ABCIQuery_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/base/tendermint/v1beta1/query.proto", +} diff --git a/x/gov/abci.go b/x/gov/abci.go index 3019404c7520..a4edadc6888e 100644 --- a/x/gov/abci.go +++ b/x/gov/abci.go @@ -37,7 +37,7 @@ func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) { logger.Info( "proposal did not meet minimum deposit; deleted", "proposal", proposal.Id, - "min_deposit", sdk.NewCoins(keeper.GetDepositParams(ctx).MinDeposit...).String(), + "min_deposit", sdk.NewCoins(keeper.GetParams(ctx).MinDeposit...).String(), "total_deposit", sdk.NewCoins(proposal.TotalDeposit...).String(), ) diff --git a/x/gov/keeper/deposit.go b/x/gov/keeper/deposit.go index ee57d91bf257..8ae94ead674a 100644 --- a/x/gov/keeper/deposit.go +++ b/x/gov/keeper/deposit.go @@ -131,7 +131,7 @@ func (keeper Keeper) AddDeposit(ctx sdk.Context, proposalID uint64, depositorAdd // Check if deposit has provided sufficient total funds to transition the proposal into the voting period activatedVotingPeriod := false - if proposal.Status == v1.StatusDepositPeriod && sdk.NewCoins(proposal.TotalDeposit...).IsAllGTE(keeper.GetDepositParams(ctx).MinDeposit) { + if proposal.Status == v1.StatusDepositPeriod && sdk.NewCoins(proposal.TotalDeposit...).IsAllGTE(keeper.GetParams(ctx).MinDeposit) { keeper.ActivateVotingPeriod(ctx, proposal) activatedVotingPeriod = true diff --git a/x/gov/keeper/grpc_query_test.go b/x/gov/keeper/grpc_query_test.go index 32219bf8daa0..162a1abea99b 100644 --- a/x/gov/keeper/grpc_query_test.go +++ b/x/gov/keeper/grpc_query_test.go @@ -785,177 +785,138 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryVotes() { } } -// func (suite *KeeperTestSuite) TestGRPCQueryParams() { -// queryClient := suite.queryClient - -// var ( -// req *v1.QueryParamsRequest -// expRes *v1.QueryParamsResponse -// ) - -// testCases := []struct { -// msg string -// malleate func() -// expPass bool -// }{ -// { -// "empty request", -// func() { -// req = &v1.QueryParamsRequest{} -// }, -// false, -// }, -// { -// "deposit params request", -// func() { -// req = &v1.QueryParamsRequest{ParamsType: v1.ParamDeposit} -// depositParams := v1.DefaultDepositParams() -// expRes = &v1.QueryParamsResponse{ -// DepositParams: &depositParams, -// } -// }, -// true, -// }, -// { -// "voting params request", -// func() { -// req = &v1.QueryParamsRequest{ParamsType: v1.ParamVoting} -// votingParams := v1.DefaultVotingParams() -// expRes = &v1.QueryParamsResponse{ -// VotingParams: &votingParams, -// } -// }, -// true, -// }, -// { -// "tally params request", -// func() { -// req = &v1.QueryParamsRequest{ParamsType: v1.ParamTallying} -// tallyParams := v1.DefaultTallyParams() -// expRes = &v1.QueryParamsResponse{ -// TallyParams: &tallyParams, -// } -// }, -// true, -// }, -// { -// "invalid request", -// func() { -// req = &v1.QueryParamsRequest{ParamsType: "wrongPath"} -// expRes = &v1.QueryParamsResponse{} -// }, -// false, -// }, -// } - -// for _, testCase := range testCases { -// suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { -// testCase.malleate() - -// params, err := queryClient.Params(gocontext.Background(), req) - -// if testCase.expPass { -// suite.Require().NoError(err) -// suite.Require().Equal(expRes.GetDepositParams(), params.GetDepositParams()) -// suite.Require().Equal(expRes.GetVotingParams(), params.GetVotingParams()) -// suite.Require().Equal(expRes.GetTallyParams(), params.GetTallyParams()) -// } else { -// suite.Require().Error(err) -// suite.Require().Nil(params) -// } -// }) -// } -// } - -// func (suite *KeeperTestSuite) TestLegacyGRPCQueryParams() { -// queryClient := suite.legacyQueryClient - -// var ( -// req *v1beta1.QueryParamsRequest -// expRes *v1beta1.QueryParamsResponse -// ) - -// defaultTallyParams := v1beta1.TallyParams{ -// Quorum: sdk.NewDec(0), -// Threshold: sdk.NewDec(0), -// VetoThreshold: sdk.NewDec(0), -// } - -// testCases := []struct { -// msg string -// malleate func() -// expPass bool -// }{ -// { -// "empty request", -// func() { -// req = &v1beta1.QueryParamsRequest{} -// }, -// false, -// }, -// { -// "deposit params request", -// func() { -// req = &v1beta1.QueryParamsRequest{ParamsType: v1beta1.ParamDeposit} -// depositParams := v1beta1.DefaultDepositParams() -// expRes = &v1beta1.QueryParamsResponse{ -// DepositParams: depositParams, -// TallyParams: defaultTallyParams, -// } -// }, -// true, -// }, -// { -// "voting params request", -// func() { -// req = &v1beta1.QueryParamsRequest{ParamsType: v1beta1.ParamVoting} -// votingParams := v1beta1.DefaultVotingParams() -// expRes = &v1beta1.QueryParamsResponse{ -// VotingParams: votingParams, -// TallyParams: defaultTallyParams, -// } -// }, -// true, -// }, -// { -// "tally params request", -// func() { -// req = &v1beta1.QueryParamsRequest{ParamsType: v1beta1.ParamTallying} -// tallyParams := v1beta1.DefaultTallyParams() -// expRes = &v1beta1.QueryParamsResponse{ -// TallyParams: tallyParams, -// } -// }, -// true, -// }, -// { -// "invalid request", -// func() { -// req = &v1beta1.QueryParamsRequest{ParamsType: "wrongPath"} -// expRes = &v1beta1.QueryParamsResponse{} -// }, -// false, -// }, -// } - -// for _, testCase := range testCases { -// suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { -// testCase.malleate() - -// params, err := queryClient.Params(gocontext.Background(), req) - -// if testCase.expPass { -// suite.Require().NoError(err) -// suite.Require().Equal(expRes.GetDepositParams(), params.GetDepositParams()) -// suite.Require().Equal(expRes.GetVotingParams(), params.GetVotingParams()) -// suite.Require().Equal(expRes.GetTallyParams(), params.GetTallyParams()) -// } else { -// suite.Require().Error(err) -// suite.Require().Nil(params) -// } -// }) -// } -// } +func (suite *KeeperTestSuite) TestGRPCQueryParams() { + queryClient := suite.queryClient + + var ( + req *v1.QueryParamsRequest + expRes *v1.QueryParamsResponse + ) + + testCases := []struct { + msg string + malleate func() + expPass bool + }{ + { + "empty request", + func() { + req = &v1.QueryParamsRequest{} + params := v1.DefaultParams() + expRes = &v1.QueryParamsResponse{ + Params: ¶ms, + } + }, + true, + }, + } + + for _, testCase := range testCases { + suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { + testCase.malleate() + + params, err := queryClient.Params(gocontext.Background(), req) + + if testCase.expPass { + suite.Require().NoError(err) + suite.Require().Equal(expRes, params) + } else { + suite.Require().Error(err) + suite.Require().Nil(params) + } + }) + } +} + +func (suite *KeeperTestSuite) TestLegacyGRPCQueryParams() { + queryClient := suite.legacyQueryClient + + var ( + req *v1beta1.QueryParamsRequest + expRes *v1beta1.QueryParamsResponse + ) + + defaultTallyParams := v1beta1.TallyParams{ + Quorum: sdk.NewDec(0), + Threshold: sdk.NewDec(0), + VetoThreshold: sdk.NewDec(0), + } + + testCases := []struct { + msg string + malleate func() + expPass bool + }{ + { + "empty request", + func() { + req = &v1beta1.QueryParamsRequest{} + }, + false, + }, + { + "deposit params request", + func() { + req = &v1beta1.QueryParamsRequest{ParamsType: v1beta1.ParamDeposit} + depositParams := v1beta1.DefaultDepositParams() + expRes = &v1beta1.QueryParamsResponse{ + DepositParams: depositParams, + TallyParams: defaultTallyParams, + } + }, + true, + }, + { + "voting params request", + func() { + req = &v1beta1.QueryParamsRequest{ParamsType: v1beta1.ParamVoting} + votingParams := v1beta1.DefaultVotingParams() + expRes = &v1beta1.QueryParamsResponse{ + VotingParams: votingParams, + TallyParams: defaultTallyParams, + } + }, + true, + }, + { + "tally params request", + func() { + req = &v1beta1.QueryParamsRequest{ParamsType: v1beta1.ParamTallying} + tallyParams := v1beta1.DefaultTallyParams() + expRes = &v1beta1.QueryParamsResponse{ + TallyParams: tallyParams, + } + }, + true, + }, + { + "invalid request", + func() { + req = &v1beta1.QueryParamsRequest{ParamsType: "wrongPath"} + expRes = &v1beta1.QueryParamsResponse{} + }, + false, + }, + } + + for _, testCase := range testCases { + suite.Run(fmt.Sprintf("Case %s", testCase.msg), func() { + testCase.malleate() + + params, err := queryClient.Params(gocontext.Background(), req) + + if testCase.expPass { + suite.Require().NoError(err) + suite.Require().Equal(expRes.GetDepositParams(), params.GetDepositParams()) + suite.Require().Equal(expRes.GetVotingParams(), params.GetVotingParams()) + suite.Require().Equal(expRes.GetTallyParams(), params.GetTallyParams()) + } else { + suite.Require().Error(err) + suite.Require().Nil(params) + } + }) + } +} func (suite *KeeperTestSuite) TestGRPCQueryDeposit() { app, ctx, queryClient, addrs := suite.app, suite.ctx, suite.queryClient, suite.addrs diff --git a/x/gov/keeper/hooks_test.go b/x/gov/keeper/hooks_test.go index 81ac2bbaf6e1..7773337cdbc6 100644 --- a/x/gov/keeper/hooks_test.go +++ b/x/gov/keeper/hooks_test.go @@ -50,7 +50,7 @@ func TestHooks(t *testing.T) { app := simapp.Setup(t, false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - minDeposit := app.GovKeeper.GetDepositParams(ctx).MinDeposit + minDeposit := app.GovKeeper.GetParams(ctx).MinDeposit addrs := simapp.AddTestAddrs(app, ctx, 1, minDeposit[0].Amount) govHooksReceiver := MockGovHooksReceiver{} @@ -71,7 +71,7 @@ func TestHooks(t *testing.T) { require.True(t, govHooksReceiver.AfterProposalSubmissionValid) newHeader := ctx.BlockHeader() - newHeader.Time = ctx.BlockHeader().Time.Add(*app.GovKeeper.GetDepositParams(ctx).MaxDepositPeriod).Add(time.Duration(1) * time.Second) + newHeader.Time = ctx.BlockHeader().Time.Add(*app.GovKeeper.GetParams(ctx).MaxDepositPeriod).Add(time.Duration(1) * time.Second) ctx = ctx.WithBlockHeader(newHeader) gov.EndBlocker(ctx, app.GovKeeper) @@ -90,7 +90,7 @@ func TestHooks(t *testing.T) { require.True(t, govHooksReceiver.AfterProposalVoteValid) newHeader = ctx.BlockHeader() - newHeader.Time = ctx.BlockHeader().Time.Add(*app.GovKeeper.GetVotingParams(ctx).VotingPeriod).Add(time.Duration(1) * time.Second) + newHeader.Time = ctx.BlockHeader().Time.Add(*app.GovKeeper.GetParams(ctx).VotingPeriod).Add(time.Duration(1) * time.Second) ctx = ctx.WithBlockHeader(newHeader) gov.EndBlocker(ctx, app.GovKeeper) require.True(t, govHooksReceiver.AfterProposalVotingPeriodEndedValid) diff --git a/x/gov/keeper/params.go b/x/gov/keeper/params.go index cc3ddb825343..8b1d097b8f9b 100644 --- a/x/gov/keeper/params.go +++ b/x/gov/keeper/params.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/cosmos/cosmos-sdk/x/gov/types" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" ) diff --git a/x/gov/keeper/proposal.go b/x/gov/keeper/proposal.go index 64088859c684..59d7bd65392a 100644 --- a/x/gov/keeper/proposal.go +++ b/x/gov/keeper/proposal.go @@ -66,7 +66,7 @@ func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadat } submitTime := ctx.BlockHeader().Time - depositPeriod := keeper.GetDepositParams(ctx).MaxDepositPeriod + depositPeriod := keeper.GetParams(ctx).MaxDepositPeriod proposal, err := v1.NewProposal(messages, proposalID, metadata, submitTime, submitTime.Add(*depositPeriod)) if err != nil { @@ -237,7 +237,7 @@ func (keeper Keeper) SetProposalID(ctx sdk.Context, proposalID uint64) { func (keeper Keeper) ActivateVotingPeriod(ctx sdk.Context, proposal v1.Proposal) { startTime := ctx.BlockHeader().Time proposal.VotingStartTime = &startTime - votingPeriod := keeper.GetVotingParams(ctx).VotingPeriod + votingPeriod := keeper.GetParams(ctx).VotingPeriod endTime := proposal.VotingStartTime.Add(*votingPeriod) proposal.VotingEndTime = &endTime proposal.Status = v1.StatusVotingPeriod diff --git a/x/gov/keeper/querier.go b/x/gov/keeper/querier.go index e5aacbfb4464..57fb6bbbb821 100644 --- a/x/gov/keeper/querier.go +++ b/x/gov/keeper/querier.go @@ -47,35 +47,16 @@ func NewQuerier(keeper *Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier } } -func queryParams(ctx sdk.Context, path []string, req abci.RequestQuery, keeper *Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { - switch path[0] { - case v1.ParamDeposit: - bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, keeper.GetDepositParams(ctx)) - if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) - } - return bz, nil - - case v1.ParamVoting: - bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, keeper.GetVotingParams(ctx)) - if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) - } - return bz, nil - - case v1.ParamTallying: - bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, keeper.GetTallyParams(ctx)) - if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) - } - return bz, nil - - default: - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "%s is not a valid query request path", req.Path) +func queryParams(ctx sdk.Context, _ []string, _ abci.RequestQuery, keeper *Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { + bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, keeper.GetParams(ctx)) + if err != nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) } + return bz, nil + } -func queryProposal(ctx sdk.Context, path []string, req abci.RequestQuery, keeper *Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { +func queryProposal(ctx sdk.Context, _ []string, req abci.RequestQuery, keeper *Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { var params v1.QueryProposalParams err := legacyQuerierCdc.UnmarshalJSON(req.Data, ¶ms) if err != nil { @@ -95,7 +76,7 @@ func queryProposal(ctx sdk.Context, path []string, req abci.RequestQuery, keeper return bz, nil } -func queryDeposit(ctx sdk.Context, path []string, req abci.RequestQuery, keeper *Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { +func queryDeposit(ctx sdk.Context, _ []string, req abci.RequestQuery, keeper *Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { var params v1.QueryDepositParams err := legacyQuerierCdc.UnmarshalJSON(req.Data, ¶ms) if err != nil { @@ -111,7 +92,7 @@ func queryDeposit(ctx sdk.Context, path []string, req abci.RequestQuery, keeper return bz, nil } -func queryVote(ctx sdk.Context, path []string, req abci.RequestQuery, keeper *Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { +func queryVote(ctx sdk.Context, _ []string, req abci.RequestQuery, keeper *Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { var params v1.QueryVoteParams err := legacyQuerierCdc.UnmarshalJSON(req.Data, ¶ms) if err != nil { @@ -127,7 +108,7 @@ func queryVote(ctx sdk.Context, path []string, req abci.RequestQuery, keeper *Ke return bz, nil } -func queryDeposits(ctx sdk.Context, path []string, req abci.RequestQuery, keeper *Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { +func queryDeposits(ctx sdk.Context, _ []string, req abci.RequestQuery, keeper *Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { var params v1.QueryProposalParams err := legacyQuerierCdc.UnmarshalJSON(req.Data, ¶ms) if err != nil { @@ -147,7 +128,7 @@ func queryDeposits(ctx sdk.Context, path []string, req abci.RequestQuery, keeper return bz, nil } -func queryTally(ctx sdk.Context, path []string, req abci.RequestQuery, keeper *Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { +func queryTally(ctx sdk.Context, _ []string, req abci.RequestQuery, keeper *Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { var params v1.QueryProposalParams err := legacyQuerierCdc.UnmarshalJSON(req.Data, ¶ms) if err != nil { @@ -183,7 +164,7 @@ func queryTally(ctx sdk.Context, path []string, req abci.RequestQuery, keeper *K return bz, nil } -func queryVotes(ctx sdk.Context, path []string, req abci.RequestQuery, keeper *Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { +func queryVotes(ctx sdk.Context, _ []string, req abci.RequestQuery, keeper *Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { var params v1.QueryProposalVotesParams err := legacyQuerierCdc.UnmarshalJSON(req.Data, ¶ms) if err != nil { diff --git a/x/gov/keeper/tally.go b/x/gov/keeper/tally.go index 5959989b2490..2da6cc484429 100644 --- a/x/gov/keeper/tally.go +++ b/x/gov/keeper/tally.go @@ -88,7 +88,7 @@ func (keeper Keeper) Tally(ctx sdk.Context, proposal v1.Proposal) (passes bool, totalVotingPower = totalVotingPower.Add(votingPower) } - tallyParams := keeper.GetTallyParams(ctx) + tallyParams := keeper.GetParams(ctx) tallyResults = v1.NewTallyResultFromMap(results) // TODO: Upgrade the spec to cover all of these cases & remove pseudocode. From 23285829f48de7a4f572e583befaecc4aa239bfc Mon Sep 17 00:00:00 2001 From: atheesh Date: Tue, 19 Jul 2022 16:21:19 +0530 Subject: [PATCH 04/33] fix tests --- x/gov/client/cli/query.go | 55 ------------------------------ x/gov/client/testutil/query.go | 58 +++---------------------------- x/gov/keeper/grpc_query.go | 62 +++++++++++++++++----------------- 3 files changed, 35 insertions(+), 140 deletions(-) diff --git a/x/gov/client/cli/query.go b/x/gov/client/cli/query.go index 2c9cff73506a..e042ae665c97 100644 --- a/x/gov/client/cli/query.go +++ b/x/gov/client/cli/query.go @@ -32,7 +32,6 @@ func GetQueryCmd() *cobra.Command { GetCmdQueryProposals(), GetCmdQueryVote(), GetCmdQueryVotes(), - // GetCmdQueryParam(), GetCmdQueryParams(), GetCmdQueryProposer(), GetCmdQueryDeposit(), @@ -549,60 +548,6 @@ $ %s query gov params return cmd } -// // GetCmdQueryParam implements the query param command. -// func GetCmdQueryParam() *cobra.Command { -// cmd := &cobra.Command{ -// Use: "param [param-type]", -// Args: cobra.ExactArgs(1), -// Short: "Query the parameters (voting|tallying|deposit) of the governance process", -// Long: strings.TrimSpace( -// fmt.Sprintf(`Query the all the parameters for the governance process. - -// Example: -// $ %s query gov param voting -// $ %s query gov param tallying -// $ %s query gov param deposit -// `, -// version.AppName, version.AppName, version.AppName, -// ), -// ), -// RunE: func(cmd *cobra.Command, args []string) error { -// clientCtx, err := client.GetClientQueryContext(cmd) -// if err != nil { -// return err -// } -// queryClient := v1.NewQueryClient(clientCtx) - -// // Query store -// res, err := queryClient.Params( -// cmd.Context(), -// &v1.QueryParamsRequest{ParamsType: args[0]}, -// ) -// if err != nil { -// return err -// } - -// var out fmt.Stringer -// switch args[0] { -// case "voting": -// out = res.GetVotingParams() -// case "tallying": -// out = res.GetTallyParams() -// case "deposit": -// out = res.GetDepositParams() -// default: -// return fmt.Errorf("argument must be one of (voting|tallying|deposit), was %s", args[0]) -// } - -// return clientCtx.PrintObjectLegacy(out) -// }, -// } - -// flags.AddQueryFlagsToCmd(cmd) - -// return cmd -// } - // GetCmdQueryProposer implements the query proposer command. func GetCmdQueryProposer() *cobra.Command { cmd := &cobra.Command{ diff --git a/x/gov/client/testutil/query.go b/x/gov/client/testutil/query.go index 7060083649bd..ed65bc9c53e9 100644 --- a/x/gov/client/testutil/query.go +++ b/x/gov/client/testutil/query.go @@ -24,23 +24,21 @@ func (s *IntegrationTestSuite) TestCmdParams() { { "json output", []string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - `{"voting_params":{"voting_period":"172800000000000"},"tally_params":{"quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"},"deposit_params":{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800000000000"}}`, + `{"params":{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800s","voting_period":"172800s","quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"}}`, }, { "text output", []string{}, ` -deposit_params: - max_deposit_period: "172800000000000" +params: + max_deposit_period: 172800s min_deposit: - amount: "10000000" denom: stake -tally_params: quorum: "0.334000000000000000" threshold: "0.500000000000000000" veto_threshold: "0.334000000000000000" -voting_params: - voting_period: "172800000000000" + voting_period: 172800s `, }, } @@ -59,54 +57,6 @@ voting_params: } } -// func (s *IntegrationTestSuite) TestCmdParam() { -// val := s.network.Validators[0] - -// testCases := []struct { -// name string -// args []string -// expectedOutput string -// }{ -// { -// "voting params", -// []string{ -// "voting", -// fmt.Sprintf("--%s=json", tmcli.OutputFlag), -// }, -// `{"voting_period":"172800000000000"}`, -// }, -// { -// "tally params", -// []string{ -// "tallying", -// fmt.Sprintf("--%s=json", tmcli.OutputFlag), -// }, -// `{"quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"}`, -// }, -// { -// "deposit params", -// []string{ -// "deposit", -// fmt.Sprintf("--%s=json", tmcli.OutputFlag), -// }, -// `{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800000000000"}`, -// }, -// } - -// for _, tc := range testCases { -// tc := tc - -// s.Run(tc.name, func() { -// cmd := cli.GetCmdQueryParam() -// clientCtx := val.ClientCtx - -// out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) -// s.Require().NoError(err) -// s.Require().Equal(strings.TrimSpace(tc.expectedOutput), strings.TrimSpace(out.String())) -// }) -// } -// } - func (s *IntegrationTestSuite) TestCmdProposer() { val := s.network.Validators[0] diff --git a/x/gov/keeper/grpc_query.go b/x/gov/keeper/grpc_query.go index d58083ac4700..c7b62cd05c40 100644 --- a/x/gov/keeper/grpc_query.go +++ b/x/gov/keeper/grpc_query.go @@ -159,9 +159,7 @@ func (q Keeper) Params(c context.Context, req *v1.QueryParamsRequest) (*v1.Query ctx := sdk.UnwrapSDKContext(c) params := q.GetParams(ctx) - // if err != nil { - // return nil, err - // } + return &v1.QueryParamsResponse{Params: ¶ms}, nil } @@ -352,40 +350,42 @@ func (q legacyQueryServer) Votes(c context.Context, req *v1beta1.QueryVotesReque } func (q legacyQueryServer) Params(c context.Context, req *v1beta1.QueryParamsRequest) (*v1beta1.QueryParamsResponse, error) { - _, err := q.keeper.Params(c, &v1.QueryParamsRequest{ - // ParamsType: req.ParamsType, - }) + p, err := q.keeper.Params(c, &v1.QueryParamsRequest{}) if err != nil { return nil, err } response := &v1beta1.QueryParamsResponse{} - // if resp.DepositParams != nil { - // minDeposit := sdk.NewCoins(resp.DepositParams.MinDeposit...) - // response.DepositParams = v1beta1.NewDepositParams(minDeposit, *resp.DepositParams.MaxDepositPeriod) - // } - - // if resp.VotingParams != nil { - // response.VotingParams = v1beta1.NewVotingParams(*resp.VotingParams.VotingPeriod) - // } - - // if resp.TallyParams != nil { - // quorum, err := sdk.NewDecFromStr(resp.TallyParams.Quorum) - // if err != nil { - // return nil, err - // } - // threshold, err := sdk.NewDecFromStr(resp.TallyParams.Threshold) - // if err != nil { - // return nil, err - // } - // vetoThreshold, err := sdk.NewDecFromStr(resp.TallyParams.VetoThreshold) - // if err != nil { - // return nil, err - // } - - // response.TallyParams = v1beta1.NewTallyParams(quorum, threshold, vetoThreshold) - // } + switch req.ParamsType { + case v1.ParamDeposit: + response.DepositParams = v1beta1.NewDepositParams(p.Params.MinDeposit, *p.Params.MaxDepositPeriod) + + case v1.ParamVoting: + response.VotingParams = v1beta1.NewVotingParams(*p.Params.VotingPeriod) + + case v1.ParamTallying: + quorum, err := sdk.NewDecFromStr(p.Params.Quorum) + if err != nil { + return nil, err + } + + threshold, err := sdk.NewDecFromStr(p.Params.Threshold) + if err != nil { + return nil, err + } + + vetoThreshold, err := sdk.NewDecFromStr(p.Params.VetoThreshold) + if err != nil { + return nil, err + } + + response.TallyParams = v1beta1.NewTallyParams(quorum, threshold, vetoThreshold) + default: + return nil, status.Errorf(codes.InvalidArgument, + "%s is not a valid parameter type", req.ParamsType) + + } return response, nil } From 66d304b04706bb0e4ab6ae7d488f561b97e06c0c Mon Sep 17 00:00:00 2001 From: atheesh Date: Tue, 19 Jul 2022 17:59:27 +0530 Subject: [PATCH 05/33] update tests --- x/gov/abci_test.go | 10 ++--- x/gov/genesis_test.go | 6 +-- x/gov/keeper/msg_server_test.go | 16 ++++---- x/gov/keeper/params.go | 60 ++++++++++++++--------------- x/gov/migrations/v046/json_test.go | 20 ++++------ x/gov/simulation/operations.go | 4 +- x/gov/simulation/operations_test.go | 6 +-- 7 files changed, 59 insertions(+), 63 deletions(-) diff --git a/x/gov/abci_test.go b/x/gov/abci_test.go index f0e002f12395..ba62052c17dc 100644 --- a/x/gov/abci_test.go +++ b/x/gov/abci_test.go @@ -58,7 +58,7 @@ func TestTickExpiredDepositPeriod(t *testing.T) { inactiveQueue.Close() newHeader = ctx.BlockHeader() - newHeader.Time = ctx.BlockHeader().Time.Add(*app.GovKeeper.GetDepositParams(ctx).MaxDepositPeriod) + newHeader.Time = ctx.BlockHeader().Time.Add(*app.GovKeeper.GetParams(ctx).MaxDepositPeriod) ctx = ctx.WithBlockHeader(newHeader) inactiveQueue = app.GovKeeper.InactiveProposalQueueIterator(ctx, ctx.BlockHeader().Time) @@ -123,7 +123,7 @@ func TestTickMultipleExpiredDepositPeriod(t *testing.T) { require.NotNil(t, res) newHeader = ctx.BlockHeader() - newHeader.Time = ctx.BlockHeader().Time.Add(*app.GovKeeper.GetDepositParams(ctx).MaxDepositPeriod).Add(time.Duration(-1) * time.Second) + newHeader.Time = ctx.BlockHeader().Time.Add(*app.GovKeeper.GetParams(ctx).MaxDepositPeriod).Add(time.Duration(-1) * time.Second) ctx = ctx.WithBlockHeader(newHeader) inactiveQueue = app.GovKeeper.InactiveProposalQueueIterator(ctx, ctx.BlockHeader().Time) @@ -247,7 +247,7 @@ func TestTickPassedVotingPeriod(t *testing.T) { require.NotNil(t, res1) newHeader = ctx.BlockHeader() - newHeader.Time = ctx.BlockHeader().Time.Add(*app.GovKeeper.GetDepositParams(ctx).MaxDepositPeriod).Add(*app.GovKeeper.GetVotingParams(ctx).VotingPeriod) + newHeader.Time = ctx.BlockHeader().Time.Add(*app.GovKeeper.GetParams(ctx).MaxDepositPeriod).Add(*app.GovKeeper.GetParams(ctx).VotingPeriod) ctx = ctx.WithBlockHeader(newHeader) inactiveQueue = app.GovKeeper.InactiveProposalQueueIterator(ctx, ctx.BlockHeader().Time) @@ -314,7 +314,7 @@ func TestProposalPassedEndblocker(t *testing.T) { require.NoError(t, err) newHeader := ctx.BlockHeader() - newHeader.Time = ctx.BlockHeader().Time.Add(*app.GovKeeper.GetDepositParams(ctx).MaxDepositPeriod).Add(*app.GovKeeper.GetVotingParams(ctx).VotingPeriod) + newHeader.Time = ctx.BlockHeader().Time.Add(*app.GovKeeper.GetParams(ctx).MaxDepositPeriod).Add(*app.GovKeeper.GetParams(ctx).VotingPeriod) ctx = ctx.WithBlockHeader(newHeader) gov.EndBlocker(ctx, app.GovKeeper) @@ -358,7 +358,7 @@ func TestEndBlockerProposalHandlerFailed(t *testing.T) { require.NoError(t, err) newHeader := ctx.BlockHeader() - newHeader.Time = ctx.BlockHeader().Time.Add(*app.GovKeeper.GetDepositParams(ctx).MaxDepositPeriod).Add(*app.GovKeeper.GetVotingParams(ctx).VotingPeriod) + newHeader.Time = ctx.BlockHeader().Time.Add(*app.GovKeeper.GetParams(ctx).MaxDepositPeriod).Add(*app.GovKeeper.GetParams(ctx).VotingPeriod) ctx = ctx.WithBlockHeader(newHeader) // Set the contextKeyBadProposal value to false so that the handler will fail diff --git a/x/gov/genesis_test.go b/x/gov/genesis_test.go index 518ad8d8a9f0..55f734934513 100644 --- a/x/gov/genesis_test.go +++ b/x/gov/genesis_test.go @@ -42,7 +42,7 @@ func TestImportExportQueues(t *testing.T) { require.NoError(t, err) proposalID2 := proposal2.Id - votingStarted, err := app.GovKeeper.AddDeposit(ctx, proposalID2, addrs[0], app.GovKeeper.GetDepositParams(ctx).MinDeposit) + votingStarted, err := app.GovKeeper.AddDeposit(ctx, proposalID2, addrs[0], app.GovKeeper.GetParams(ctx).MinDeposit) require.NoError(t, err) require.True(t, votingStarted) @@ -93,7 +93,7 @@ func TestImportExportQueues(t *testing.T) { ctx2 := app2.BaseApp.NewContext(false, tmproto.Header{}) // Jump the time forward past the DepositPeriod and VotingPeriod - ctx2 = ctx2.WithBlockTime(ctx2.BlockHeader().Time.Add(*app2.GovKeeper.GetDepositParams(ctx2).MaxDepositPeriod).Add(*app2.GovKeeper.GetVotingParams(ctx2).VotingPeriod)) + ctx2 = ctx2.WithBlockTime(ctx2.BlockHeader().Time.Add(*app2.GovKeeper.GetParams(ctx2).MaxDepositPeriod).Add(*app2.GovKeeper.GetParams(ctx2).VotingPeriod)) // Make sure that they are still in the DepositPeriod and VotingPeriod respectively proposal1, ok = app2.GovKeeper.GetProposal(ctx2, proposalID1) @@ -104,7 +104,7 @@ func TestImportExportQueues(t *testing.T) { require.True(t, proposal2.Status == v1.StatusVotingPeriod) macc := app2.GovKeeper.GetGovernanceAccount(ctx2) - require.Equal(t, sdk.Coins(app2.GovKeeper.GetDepositParams(ctx2).MinDeposit), app2.BankKeeper.GetAllBalances(ctx2, macc.GetAddress())) + require.Equal(t, sdk.Coins(app2.GovKeeper.GetParams(ctx2).MinDeposit), app2.BankKeeper.GetAllBalances(ctx2, macc.GetAddress())) // Run the endblocker. Check to make sure that proposal1 is removed from state, and proposal2 is finished VotingPeriod. gov.EndBlocker(ctx2, app2.GovKeeper) diff --git a/x/gov/keeper/msg_server_test.go b/x/gov/keeper/msg_server_test.go index 5bdd9951089e..a355aecc188c 100644 --- a/x/gov/keeper/msg_server_test.go +++ b/x/gov/keeper/msg_server_test.go @@ -17,7 +17,7 @@ func (suite *KeeperTestSuite) TestSubmitProposalReq() { coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) initialDeposit := coins - minDeposit := suite.app.GovKeeper.GetDepositParams(suite.ctx).MinDeposit + minDeposit := suite.app.GovKeeper.GetParams(suite.ctx).MinDeposit bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), ToAddress: proposer.String(), @@ -123,7 +123,7 @@ func (suite *KeeperTestSuite) TestVoteReq() { proposer := addrs[0] coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) - minDeposit := suite.app.GovKeeper.GetDepositParams(suite.ctx).MinDeposit + minDeposit := suite.app.GovKeeper.GetParams(suite.ctx).MinDeposit bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), ToAddress: proposer.String(), @@ -235,7 +235,7 @@ func (suite *KeeperTestSuite) TestVoteWeightedReq() { proposer := addrs[0] coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) - minDeposit := suite.app.GovKeeper.GetDepositParams(suite.ctx).MinDeposit + minDeposit := suite.app.GovKeeper.GetParams(suite.ctx).MinDeposit bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), ToAddress: proposer.String(), @@ -348,7 +348,7 @@ func (suite *KeeperTestSuite) TestDepositReq() { proposer := addrs[0] coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) - minDeposit := suite.app.GovKeeper.GetDepositParams(suite.ctx).MinDeposit + minDeposit := suite.app.GovKeeper.GetParams(suite.ctx).MinDeposit bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), ToAddress: proposer.String(), @@ -417,7 +417,7 @@ func (suite *KeeperTestSuite) TestLegacyMsgSubmitProposal() { coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) initialDeposit := coins - minDeposit := suite.app.GovKeeper.GetDepositParams(suite.ctx).MinDeposit + minDeposit := suite.app.GovKeeper.GetParams(suite.ctx).MinDeposit cases := map[string]struct { preRun func() (*v1beta1.MsgSubmitProposal, error) @@ -466,7 +466,7 @@ func (suite *KeeperTestSuite) TestLegacyMsgVote() { proposer := addrs[0] coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) - minDeposit := suite.app.GovKeeper.GetDepositParams(suite.ctx).MinDeposit + minDeposit := suite.app.GovKeeper.GetParams(suite.ctx).MinDeposit bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), ToAddress: proposer.String(), @@ -568,7 +568,7 @@ func (suite *KeeperTestSuite) TestLegacyVoteWeighted() { proposer := addrs[0] coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) - minDeposit := suite.app.GovKeeper.GetDepositParams(suite.ctx).MinDeposit + minDeposit := suite.app.GovKeeper.GetParams(suite.ctx).MinDeposit bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), ToAddress: proposer.String(), @@ -671,7 +671,7 @@ func (suite *KeeperTestSuite) TestLegacyMsgDeposit() { proposer := addrs[0] coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) - minDeposit := suite.app.GovKeeper.GetDepositParams(suite.ctx).MinDeposit + minDeposit := suite.app.GovKeeper.GetParams(suite.ctx).MinDeposit bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), ToAddress: proposer.String(), diff --git a/x/gov/keeper/params.go b/x/gov/keeper/params.go index 8b1d097b8f9b..3417034b124e 100644 --- a/x/gov/keeper/params.go +++ b/x/gov/keeper/params.go @@ -6,41 +6,41 @@ import ( v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" ) -// GetDepositParams returns the current DepositParams from the global param store -func (keeper Keeper) GetDepositParams(ctx sdk.Context) v1.DepositParams { - var depositParams v1.DepositParams - keeper.paramSpace.Get(ctx, v1.ParamStoreKeyDepositParams, &depositParams) - return depositParams -} +// // GetDepositParams returns the current DepositParams from the global param store +// func (keeper Keeper) GetDepositParams(ctx sdk.Context) v1.DepositParams { +// var depositParams v1.DepositParams +// keeper.paramSpace.Get(ctx, v1.ParamStoreKeyDepositParams, &depositParams) +// return depositParams +// } -// GetVotingParams returns the current VotingParams from the global param store -func (keeper Keeper) GetVotingParams(ctx sdk.Context) v1.VotingParams { - var votingParams v1.VotingParams - keeper.paramSpace.Get(ctx, v1.ParamStoreKeyVotingParams, &votingParams) - return votingParams -} +// // GetVotingParams returns the current VotingParams from the global param store +// func (keeper Keeper) GetVotingParams(ctx sdk.Context) v1.VotingParams { +// var votingParams v1.VotingParams +// keeper.paramSpace.Get(ctx, v1.ParamStoreKeyVotingParams, &votingParams) +// return votingParams +// } -// GetTallyParams returns the current TallyParam from the global param store -func (keeper Keeper) GetTallyParams(ctx sdk.Context) v1.TallyParams { - var tallyParams v1.TallyParams - keeper.paramSpace.Get(ctx, v1.ParamStoreKeyTallyParams, &tallyParams) - return tallyParams -} +// // GetTallyParams returns the current TallyParam from the global param store +// func (keeper Keeper) GetTallyParams(ctx sdk.Context) v1.TallyParams { +// var tallyParams v1.TallyParams +// keeper.paramSpace.Get(ctx, v1.ParamStoreKeyTallyParams, &tallyParams) +// return tallyParams +// } -// SetDepositParams sets DepositParams to the global param store -func (keeper Keeper) SetDepositParams(ctx sdk.Context, depositParams v1.DepositParams) { - keeper.paramSpace.Set(ctx, v1.ParamStoreKeyDepositParams, &depositParams) -} +// // SetDepositParams sets DepositParams to the global param store +// func (keeper Keeper) SetDepositParams(ctx sdk.Context, depositParams v1.DepositParams) { +// keeper.paramSpace.Set(ctx, v1.ParamStoreKeyDepositParams, &depositParams) +// } -// SetVotingParams sets VotingParams to the global param store -func (keeper Keeper) SetVotingParams(ctx sdk.Context, votingParams v1.VotingParams) { - keeper.paramSpace.Set(ctx, v1.ParamStoreKeyVotingParams, &votingParams) -} +// // SetVotingParams sets VotingParams to the global param store +// func (keeper Keeper) SetVotingParams(ctx sdk.Context, votingParams v1.VotingParams) { +// keeper.paramSpace.Set(ctx, v1.ParamStoreKeyVotingParams, &votingParams) +// } -// SetTallyParams sets TallyParams to the global param store -func (keeper Keeper) SetTallyParams(ctx sdk.Context, tallyParams v1.TallyParams) { - keeper.paramSpace.Set(ctx, v1.ParamStoreKeyTallyParams, &tallyParams) -} +// // SetTallyParams sets TallyParams to the global param store +// func (keeper Keeper) SetTallyParams(ctx sdk.Context, tallyParams v1.TallyParams) { +// keeper.paramSpace.Set(ctx, v1.ParamStoreKeyTallyParams, &tallyParams) +// } func (k Keeper) SetParams(ctx sdk.Context, params v1.Params) error { store := ctx.KVStore(k.storeKey) diff --git a/x/gov/migrations/v046/json_test.go b/x/gov/migrations/v046/json_test.go index 518161b9e8b5..af7ec5812046 100644 --- a/x/gov/migrations/v046/json_test.go +++ b/x/gov/migrations/v046/json_test.go @@ -73,16 +73,20 @@ func TestMigrateJSON(t *testing.T) { // Make sure about: // - Proposals use MsgExecLegacyContent expected := `{ - "deposit_params": { + "deposits": [], + "params": { "max_deposit_period": "172800s", "min_deposit": [ { "amount": "10000000", "denom": "stake" } - ] + ], + "quorum": "0.334000000000000000", + "threshold": "0.500000000000000000", + "veto_threshold": "0.334000000000000000", + "voting_period": "172800s" }, - "deposits": [], "proposals": [ { "deposit_end_time": "2001-09-09T01:46:40Z", @@ -118,11 +122,6 @@ func TestMigrateJSON(t *testing.T) { } ], "starting_proposal_id": "1", - "tally_params": { - "quorum": "0.334000000000000000", - "threshold": "0.500000000000000000", - "veto_threshold": "0.334000000000000000" - }, "votes": [ { "metadata": "", @@ -146,10 +145,7 @@ func TestMigrateJSON(t *testing.T) { "proposal_id": "2", "voter": "cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh" } - ], - "voting_params": { - "voting_period": "172800s" - } + ] }` require.Equal(t, expected, string(indentedBz)) diff --git a/x/gov/simulation/operations.go b/x/gov/simulation/operations.go index edcc4a35d745..7f6b913645fc 100644 --- a/x/gov/simulation/operations.go +++ b/x/gov/simulation/operations.go @@ -203,7 +203,7 @@ func SimulateMsgSubmitProposal(ak types.AccountKeeper, bk types.BankKeeper, k *k // didntVote := whoVotes[numVotes:] whoVotes = whoVotes[:numVotes] - votingPeriod := k.GetVotingParams(ctx).VotingPeriod + votingPeriod := k.GetParams(ctx).VotingPeriod fops := make([]simtypes.FutureOperation, numVotes+1) for i := 0; i < numVotes; i++ { @@ -385,7 +385,7 @@ func randomDeposit(r *rand.Rand, ctx sdk.Context, ak types.AccountKeeper, bk typ return nil, true, nil // skip } - minDeposit := k.GetDepositParams(ctx).MinDeposit + minDeposit := k.GetParams(ctx).MinDeposit denomIndex := r.Intn(len(minDeposit)) denom := minDeposit[denomIndex].Denom diff --git a/x/gov/simulation/operations_test.go b/x/gov/simulation/operations_test.go index 685c5596d9b9..4f1a6e331f11 100644 --- a/x/gov/simulation/operations_test.go +++ b/x/gov/simulation/operations_test.go @@ -147,7 +147,7 @@ func TestSimulateMsgDeposit(t *testing.T) { require.NoError(t, err) submitTime := ctx.BlockHeader().Time - depositPeriod := app.GovKeeper.GetDepositParams(ctx).MaxDepositPeriod + depositPeriod := app.GovKeeper.GetParams(ctx).MaxDepositPeriod proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, "", submitTime, submitTime.Add(*depositPeriod)) require.NoError(t, err) @@ -193,7 +193,7 @@ func TestSimulateMsgVote(t *testing.T) { require.NoError(t, err) submitTime := ctx.BlockHeader().Time - depositPeriod := app.GovKeeper.GetDepositParams(ctx).MaxDepositPeriod + depositPeriod := app.GovKeeper.GetParams(ctx).MaxDepositPeriod proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, "", submitTime, submitTime.Add(*depositPeriod)) require.NoError(t, err) @@ -236,7 +236,7 @@ func TestSimulateMsgVoteWeighted(t *testing.T) { contentMsg, err := v1.NewLegacyContent(v1beta1.NewTextProposal("Test", "description"), govAcc) require.NoError(t, err) submitTime := ctx.BlockHeader().Time - depositPeriod := app.GovKeeper.GetDepositParams(ctx).MaxDepositPeriod + depositPeriod := app.GovKeeper.GetParams(ctx).MaxDepositPeriod proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, "", submitTime, submitTime.Add(*depositPeriod)) require.NoError(t, err) From 3497236fe76847b0be2231bc870a27bc2bd36e1c Mon Sep 17 00:00:00 2001 From: atheesh Date: Tue, 19 Jul 2022 18:02:14 +0530 Subject: [PATCH 06/33] remove comments --- x/gov/keeper/params.go | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/x/gov/keeper/params.go b/x/gov/keeper/params.go index 3417034b124e..64d98a92ef45 100644 --- a/x/gov/keeper/params.go +++ b/x/gov/keeper/params.go @@ -6,42 +6,6 @@ import ( v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" ) -// // GetDepositParams returns the current DepositParams from the global param store -// func (keeper Keeper) GetDepositParams(ctx sdk.Context) v1.DepositParams { -// var depositParams v1.DepositParams -// keeper.paramSpace.Get(ctx, v1.ParamStoreKeyDepositParams, &depositParams) -// return depositParams -// } - -// // GetVotingParams returns the current VotingParams from the global param store -// func (keeper Keeper) GetVotingParams(ctx sdk.Context) v1.VotingParams { -// var votingParams v1.VotingParams -// keeper.paramSpace.Get(ctx, v1.ParamStoreKeyVotingParams, &votingParams) -// return votingParams -// } - -// // GetTallyParams returns the current TallyParam from the global param store -// func (keeper Keeper) GetTallyParams(ctx sdk.Context) v1.TallyParams { -// var tallyParams v1.TallyParams -// keeper.paramSpace.Get(ctx, v1.ParamStoreKeyTallyParams, &tallyParams) -// return tallyParams -// } - -// // SetDepositParams sets DepositParams to the global param store -// func (keeper Keeper) SetDepositParams(ctx sdk.Context, depositParams v1.DepositParams) { -// keeper.paramSpace.Set(ctx, v1.ParamStoreKeyDepositParams, &depositParams) -// } - -// // SetVotingParams sets VotingParams to the global param store -// func (keeper Keeper) SetVotingParams(ctx sdk.Context, votingParams v1.VotingParams) { -// keeper.paramSpace.Set(ctx, v1.ParamStoreKeyVotingParams, &votingParams) -// } - -// // SetTallyParams sets TallyParams to the global param store -// func (keeper Keeper) SetTallyParams(ctx sdk.Context, tallyParams v1.TallyParams) { -// keeper.paramSpace.Set(ctx, v1.ParamStoreKeyTallyParams, &tallyParams) -// } - func (k Keeper) SetParams(ctx sdk.Context, params v1.Params) error { store := ctx.KVStore(k.storeKey) bz, err := k.cdc.Marshal(¶ms) From de9e07ec5983cd565e7c8bb9953d9020f9b2e0fa Mon Sep 17 00:00:00 2001 From: atheesh Date: Wed, 20 Jul 2022 16:03:06 +0530 Subject: [PATCH 07/33] add genesis tests --- x/gov/client/testutil/cli_test.go | 2 - x/gov/client/testutil/grpc.go | 98 ++++++--------- x/gov/genesis.go | 6 - x/gov/keeper/msg_server.go | 8 -- x/gov/types/v1/genesis.go | 8 +- x/gov/types/v1/genesis_test.go | 193 ++++++++++++++++++------------ x/gov/types/v1/msgs.go | 36 +----- x/gov/types/v1/params.go | 53 ++++++++ 8 files changed, 210 insertions(+), 194 deletions(-) diff --git a/x/gov/client/testutil/cli_test.go b/x/gov/client/testutil/cli_test.go index 090444d54241..5968c26e662d 100644 --- a/x/gov/client/testutil/cli_test.go +++ b/x/gov/client/testutil/cli_test.go @@ -16,8 +16,6 @@ func TestIntegrationTestSuite(t *testing.T) { cfg.NumValidators = 1 suite.Run(t, NewIntegrationTestSuite(cfg)) - // dp := v1.NewDepositParams(sdk.NewCoins(sdk.NewCoin(cfg.BondDenom, v1.DefaultMinDepositTokens)), time.Duration(15)*time.Second) - // vp := v1.NewVotingParams(time.Duration(5) * time.Second) genesisState := v1.DefaultGenesisState() maxDepPeriod := time.Duration(15) * time.Second votingPeriod := time.Duration(5) * time.Second diff --git a/x/gov/client/testutil/grpc.go b/x/gov/client/testutil/grpc.go index 35c4d4eb85c4..a3b962f8b058 100644 --- a/x/gov/client/testutil/grpc.go +++ b/x/gov/client/testutil/grpc.go @@ -8,6 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + "github.com/gogo/protobuf/proto" ) func (s *IntegrationTestSuite) TestGetProposalGRPC() { @@ -352,62 +353,41 @@ func (s *IntegrationTestSuite) TestGetTallyGRPC() { } } -// func (s *IntegrationTestSuite) TestGetParamsGRPC() { -// val := s.network.Validators[0] - -// dp := v1.DefaultDepositParams() -// vp := v1.DefaultVotingParams() -// tp := v1.DefaultTallyParams() - -// testCases := []struct { -// name string -// url string -// expErr bool -// respType proto.Message -// expectResp proto.Message -// }{ -// { -// "request params with empty params type", -// fmt.Sprintf("%s/cosmos/gov/v1/params/%s", val.APIAddress, ""), -// true, nil, nil, -// }, -// { -// "get deposit params", -// fmt.Sprintf("%s/cosmos/gov/v1/params/%s", val.APIAddress, v1.ParamDeposit), -// false, -// &v1.QueryParamsResponse{}, -// &v1.QueryParamsResponse{DepositParams: &dp}, -// }, -// { -// "get vote params", -// fmt.Sprintf("%s/cosmos/gov/v1/params/%s", val.APIAddress, v1.ParamVoting), -// false, -// &v1.QueryParamsResponse{}, -// &v1.QueryParamsResponse{VotingParams: &vp}, -// }, -// { -// "get tally params", -// fmt.Sprintf("%s/cosmos/gov/v1/params/%s", val.APIAddress, v1.ParamTallying), -// false, -// &v1.QueryParamsResponse{}, -// &v1.QueryParamsResponse{TallyParams: &tp}, -// }, -// } - -// for _, tc := range testCases { -// tc := tc -// s.Run(tc.name, func() { -// resp, err := rest.GetRequest(tc.url) -// s.Require().NoError(err) - -// err = val.ClientCtx.Codec.UnmarshalJSON(resp, tc.respType) - -// if tc.expErr { -// s.Require().Error(err) -// } else { -// s.Require().NoError(err) -// s.Require().Equal(tc.expectResp.String(), tc.respType.String()) -// } -// }) -// } -// } +func (s *IntegrationTestSuite) TestGetParamsGRPC() { + val := s.network.Validators[0] + + params := v1.DefaultParams() + + testCases := []struct { + name string + url string + expErr bool + respType proto.Message + expectResp proto.Message + }{ + { + "get deposit params", + fmt.Sprintf("%s/cosmos/gov/v1/params", val.APIAddress), + false, + &v1.QueryParamsResponse{}, + &v1.QueryParamsResponse{Params: ¶ms}, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + resp, err := rest.GetRequest(tc.url) + s.Require().NoError(err) + + err = val.ClientCtx.Codec.UnmarshalJSON(resp, tc.respType) + + if tc.expErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + s.Require().Equal(tc.expectResp.String(), tc.respType.String()) + } + }) + } +} diff --git a/x/gov/genesis.go b/x/gov/genesis.go index 1153015e7b45..ebae2d8b12bf 100644 --- a/x/gov/genesis.go +++ b/x/gov/genesis.go @@ -12,9 +12,6 @@ import ( // InitGenesis - store genesis parameters func InitGenesis(ctx sdk.Context, ak types.AccountKeeper, bk types.BankKeeper, k *keeper.Keeper, data *v1.GenesisState) { k.SetProposalID(ctx, data.StartingProposalId) - // k.SetDepositParams(ctx, *data.DepositParams) - // k.SetVotingParams(ctx, *data.VotingParams) - // k.SetTallyParams(ctx, *data.TallyParams) k.SetParams(ctx, *data.Params) // check if the deposits pool account exists @@ -58,9 +55,6 @@ func InitGenesis(ctx sdk.Context, ak types.AccountKeeper, bk types.BankKeeper, k // ExportGenesis - output genesis parameters func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *v1.GenesisState { startingProposalID, _ := k.GetProposalID(ctx) - // depositParams := k.GetDepositParams(ctx) - // votingParams := k.GetVotingParams(ctx) - // tallyParams := k.GetTallyParams(ctx) proposals := k.GetProposals(ctx) params := k.GetParams(ctx) diff --git a/x/gov/keeper/msg_server.go b/x/gov/keeper/msg_server.go index 0a26d9615fe3..54773ff7bda1 100644 --- a/x/gov/keeper/msg_server.go +++ b/x/gov/keeper/msg_server.go @@ -218,14 +218,6 @@ func (k msgServer) UpdateParams(goCtx context.Context, msg *v1.MsgUpdateParams) return nil, err } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, msg.Authority), - ), - ) - return &v1.MsgUpdateParamsResponse{}, nil } diff --git a/x/gov/types/v1/genesis.go b/x/gov/types/v1/genesis.go index c8fefaa841db..f65efbe89fec 100644 --- a/x/gov/types/v1/genesis.go +++ b/x/gov/types/v1/genesis.go @@ -11,9 +11,6 @@ func NewGenesisState(startingProposalID uint64, params Params) *GenesisState { return &GenesisState{ StartingProposalId: startingProposalID, Params: ¶ms, - // DepositParams: &dp, - // VotingParams: &vp, - // TallyParams: &tp, } } @@ -27,10 +24,7 @@ func DefaultGenesisState() *GenesisState { // Empty returns true if a GenesisState is empty func (data GenesisState) Empty() bool { - return data.StartingProposalId == 0 || - data.Params == nil - // data.VotingParams == nil || - // data.TallyParams == nil + return data.StartingProposalId == 0 || data.Params == nil } // ValidateGenesis checks if parameters are within valid ranges diff --git a/x/gov/types/v1/genesis_test.go b/x/gov/types/v1/genesis_test.go index 27ee1380d332..20421ddc93b2 100644 --- a/x/gov/types/v1/genesis_test.go +++ b/x/gov/types/v1/genesis_test.go @@ -1,85 +1,124 @@ package v1_test -// import ( -// "testing" +import ( + "testing" -// v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" -// "github.com/stretchr/testify/require" -// ) + sdk "github.com/cosmos/cosmos-sdk/types" + v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + "github.com/stretchr/testify/require" +) -// func TestEmptyGenesis(t *testing.T) { -// state1 := v1.GenesisState{} -// require.True(t, state1.Empty()) +func TestEmptyGenesis(t *testing.T) { + state1 := v1.GenesisState{} + require.True(t, state1.Empty()) -// state2 := v1.DefaultGenesisState() -// require.False(t, state2.Empty()) -// } + state2 := v1.DefaultGenesisState() + require.False(t, state2.Empty()) +} -// func TestValidateGenesis(t *testing.T) { -// depositParams := v1.DefaultDepositParams() -// votingParams := v1.DefaultVotingParams() -// tallyParams := v1.DefaultTallyParams() +func TestValidateGenesis(t *testing.T) { + params := v1.DefaultParams() -// testCases := []struct { -// name string -// genesisState *v1.GenesisState -// expErr bool -// }{ -// { -// name: "valid", -// genesisState: v1.DefaultGenesisState(), -// }, -// { -// name: "invalid StartingProposalId", -// genesisState: &v1.GenesisState{ -// StartingProposalId: 0, -// DepositParams: &depositParams, -// VotingParams: &votingParams, -// TallyParams: &tallyParams, -// }, -// expErr: true, -// }, -// { -// name: "invalid TallyParams", -// genesisState: &v1.GenesisState{ -// StartingProposalId: v1.DefaultStartingProposalID, -// DepositParams: &depositParams, -// VotingParams: &votingParams, -// TallyParams: &v1.TallyParams{}, -// }, -// expErr: true, -// }, -// { -// name: "invalid VotingParams", -// genesisState: &v1.GenesisState{ -// StartingProposalId: v1.DefaultStartingProposalID, -// DepositParams: &depositParams, -// VotingParams: &v1.VotingParams{}, -// TallyParams: &tallyParams, -// }, -// expErr: true, -// }, -// { -// name: "invalid DepositParams", -// genesisState: &v1.GenesisState{ -// StartingProposalId: v1.DefaultStartingProposalID, -// DepositParams: &v1.DepositParams{}, -// VotingParams: &votingParams, -// TallyParams: &tallyParams, -// }, -// expErr: true, -// }, -// } + testCases := []struct { + name string + genesisState func() *v1.GenesisState + expErr bool + }{ + { + name: "valid", + genesisState: func() *v1.GenesisState { + return &v1.GenesisState{ + StartingProposalId: v1.DefaultStartingProposalID, + Params: ¶ms, + } + }, + }, + { + name: "invalid StartingProposalId", + genesisState: func() *v1.GenesisState { + return &v1.GenesisState{ + StartingProposalId: 0, + Params: ¶ms, + } + }, + expErr: true, + }, + { + name: "invalid min deposit", + genesisState: func() *v1.GenesisState { + params1 := params + params1.MinDeposit = sdk.Coins{ + { + Denom: sdk.DefaultBondDenom, + Amount: sdk.NewInt(-100), + }, + } + return &v1.GenesisState{ + StartingProposalId: 0, + Params: ¶ms1, + } + }, + expErr: true, + }, + { + name: "invalid max deposit period", + genesisState: func() *v1.GenesisState { + params1 := params + params1.MaxDepositPeriod = nil + return &v1.GenesisState{ + StartingProposalId: 0, + Params: ¶ms1, + } + }, + expErr: true, + }, + { + name: "invalid quorum", + genesisState: func() *v1.GenesisState { + params1 := params + params1.Quorum = "2" + return &v1.GenesisState{ + StartingProposalId: 0, + Params: ¶ms1, + } + }, + expErr: true, + }, + { + name: "invalid threshold", + genesisState: func() *v1.GenesisState { + params1 := params + params1.Threshold = "2" + return &v1.GenesisState{ + StartingProposalId: 0, + Params: ¶ms1, + } + }, + expErr: true, + }, + { + name: "invalid veto threshold", + genesisState: func() *v1.GenesisState { + params1 := params + params1.VetoThreshold = "2" + return &v1.GenesisState{ + StartingProposalId: 0, + Params: ¶ms1, + } + }, + expErr: true, + }, + } -// for _, tc := range testCases { -// tc := tc -// t.Run(tc.name, func(t *testing.T) { -// err := v1.ValidateGenesis(tc.genesisState) -// if tc.expErr { -// require.Error(t, err) -// } else { -// require.NoError(t, err) -// } -// }) -// } -// } + for _, tc := range testCases { + tc := tc + t.Run(tc.name, func(t *testing.T) { + err := v1.ValidateGenesis(tc.genesisState()) + if tc.expErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} diff --git a/x/gov/types/v1/msgs.go b/x/gov/types/v1/msgs.go index 74959b859202..f75e457c2a59 100644 --- a/x/gov/types/v1/msgs.go +++ b/x/gov/types/v1/msgs.go @@ -269,43 +269,9 @@ func (msg MsgUpdateParams) Type() string { return sdk.MsgTypeURL(&msg) } // ValidateBasic implements Msg func (msg MsgUpdateParams) ValidateBasic() error { - // if _, err := sdk.AccAddressFromBech32(msg.Voter); err != nil { - // return sdkerrors.ErrInvalidAddress.Wrapf("invalid voter address: %s", err) - // } - // if len(msg.Options) == 0 { - // return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, WeightedVoteOptions(msg.Options).String()) - // } - - // totalWeight := sdk.NewDec(0) - // usedOptions := make(map[VoteOption]bool) - // for _, option := range msg.Options { - // if !ValidWeightedVoteOption(option) { - // return sdkerrors.Wrap(types.ErrInvalidVote, option.String()) - // } - // totalWeight = totalWeight.Add(option.Weight) - // if usedOptions[option.Option] { - // return sdkerrors.Wrap(types.ErrInvalidVote, "Duplicated vote option") - // } - // usedOptions[option.Option] = true - // } - - // if totalWeight.GT(sdk.NewDec(1)) { - // return sdkerrors.Wrap(types.ErrInvalidVote, "Total weight overflow 1.00") - // } - - // if totalWeight.LT(sdk.NewDec(1)) { - // return sdkerrors.Wrap(types.ErrInvalidVote, "Total weight lower than 1.00") - // } - - return nil + return msg.Params.ValidateBasic() } -// // String implements the Stringer interface -// func (msg MsgUpdateParams) String() string { -// out, _ := yaml.Marshal(msg) -// return string(out) -// } - // GetSignBytes implements Msg func (msg MsgUpdateParams) GetSignBytes() []byte { bz := ModuleCdc.MustMarshalJSON(&msg) diff --git a/x/gov/types/v1/params.go b/x/gov/types/v1/params.go index 52302cb65e27..7ef13c5d9d01 100644 --- a/x/gov/types/v1/params.go +++ b/x/gov/types/v1/params.go @@ -199,3 +199,56 @@ func DefaultParams() Params { DefaultVetoThreshold.String(), ) } + +func (p Params) ValidateBasic() error { + + if !sdk.Coins(p.MinDeposit).IsValid() { + return fmt.Errorf("invalid minimum deposit: %s", p.MinDeposit) + } + if p.MaxDepositPeriod == nil || p.MaxDepositPeriod.Seconds() <= 0 { + return fmt.Errorf("maximum deposit period must be positive: %d", p.MaxDepositPeriod) + } + + quorum, err := sdk.NewDecFromStr(p.Quorum) + if err != nil { + return fmt.Errorf("invalid quorum string: %w", err) + } + if quorum.IsNegative() { + return fmt.Errorf("quorom cannot be negative: %s", quorum) + } + if quorum.GT(sdk.OneDec()) { + return fmt.Errorf("quorom too large: %s", p.Quorum) + } + + threshold, err := sdk.NewDecFromStr(p.Threshold) + if err != nil { + return fmt.Errorf("invalid threshold string: %w", err) + } + if !threshold.IsPositive() { + return fmt.Errorf("vote threshold must be positive: %s", threshold) + } + if threshold.GT(sdk.OneDec()) { + return fmt.Errorf("vote threshold too large: %s", threshold) + } + + vetoThreshold, err := sdk.NewDecFromStr(p.VetoThreshold) + if err != nil { + return fmt.Errorf("invalid vetoThreshold string: %w", err) + } + if !vetoThreshold.IsPositive() { + return fmt.Errorf("veto threshold must be positive: %s", vetoThreshold) + } + if vetoThreshold.GT(sdk.OneDec()) { + return fmt.Errorf("veto threshold too large: %s", vetoThreshold) + } + + if p.VotingPeriod == nil { + return errors.New("voting period must not be nil") + } + + if p.VotingPeriod.Seconds() <= 0 { + return fmt.Errorf("voting period must be positive: %s", p.VotingPeriod) + } + + return nil +} From f8e8e29c317d4fbea74d384084e674d5b1bcfa30 Mon Sep 17 00:00:00 2001 From: atheesh Date: Wed, 20 Jul 2022 17:23:36 +0530 Subject: [PATCH 08/33] changes --- x/gov/types/v1/genesis.go | 14 +-------- x/gov/types/v1/params.go | 63 --------------------------------------- 2 files changed, 1 insertion(+), 76 deletions(-) diff --git a/x/gov/types/v1/genesis.go b/x/gov/types/v1/genesis.go index f65efbe89fec..ef44bd481627 100644 --- a/x/gov/types/v1/genesis.go +++ b/x/gov/types/v1/genesis.go @@ -33,19 +33,7 @@ func ValidateGenesis(data *GenesisState) error { return errors.New("starting proposal id must be greater than 0") } - // if err := validateTallyParams(*data.TallyParams); err != nil { - // return fmt.Errorf("invalid tally params: %w", err) - // } - - // if err := validateVotingParams(*data.VotingParams); err != nil { - // return fmt.Errorf("invalid voting params: %w", err) - // } - - // if err := validateDepositParams(*data.DepositParams); err != nil { - // return fmt.Errorf("invalid deposit params: %w", err) - // } - - return nil + return data.Params.ValidateBasic() } var _ types.UnpackInterfacesMessage = GenesisState{} diff --git a/x/gov/types/v1/params.go b/x/gov/types/v1/params.go index 7ef13c5d9d01..29dd2bdcc33f 100644 --- a/x/gov/types/v1/params.go +++ b/x/gov/types/v1/params.go @@ -21,22 +21,6 @@ var ( DefaultVetoThreshold = sdk.NewDecWithPrec(334, 3) ) -// // NewDepositParams creates a new DepositParams object -// func NewDepositParams(minDeposit sdk.Coins, maxDepositPeriod time.Duration) DepositParams { -// return DepositParams{ -// MinDeposit: minDeposit, -// MaxDepositPeriod: &maxDepositPeriod, -// } -// } - -// // DefaultDepositParams default parameters for deposits -// func DefaultDepositParams() DepositParams { -// return NewDepositParams( -// sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, DefaultMinDepositTokens)), -// DefaultPeriod, -// ) -// } - // // Equal checks equality of DepositParams // func (dp DepositParams) Equal(dp2 DepositParams) bool { // return sdk.Coins(dp.MinDeposit).IsEqual(dp2.MinDeposit) && dp.MaxDepositPeriod == dp2.MaxDepositPeriod @@ -58,20 +42,6 @@ func validateDepositParams(i interface{}) error { return nil } -// // NewTallyParams creates a new TallyParams object -// func NewTallyParams(quorum, threshold, vetoThreshold sdk.Dec) TallyParams { -// return TallyParams{ -// Quorum: quorum.String(), -// Threshold: threshold.String(), -// VetoThreshold: vetoThreshold.String(), -// } -// } - -// // DefaultTallyParams default parameters for tallying -// func DefaultTallyParams() TallyParams { -// return NewTallyParams(DefaultQuorum, DefaultThreshold, DefaultVetoThreshold) -// } - // // Equal checks equality of TallyParams // func (tp TallyParams) Equal(other TallyParams) bool { // return tp.Quorum == other.Quorum && tp.Threshold == other.Threshold && tp.VetoThreshold == other.VetoThreshold @@ -119,18 +89,6 @@ func validateTallyParams(i interface{}) error { return nil } -// // NewVotingParams creates a new VotingParams object -// func NewVotingParams(votingPeriod time.Duration) VotingParams { -// return VotingParams{ -// VotingPeriod: &votingPeriod, -// } -// } - -// // DefaultVotingParams default parameters for voting -// func DefaultVotingParams() VotingParams { -// return NewVotingParams(DefaultPeriod) -// } - // // Equal checks equality of TallyParams // func (vp VotingParams) Equal(other VotingParams) bool { // return vp.VotingPeriod == other.VotingPeriod @@ -153,27 +111,6 @@ func validateVotingParams(i interface{}) error { return nil } -// // Params returns all of the governance params -// type Params struct { -// VotingParams VotingParams `json:"voting_params" yaml:"voting_params"` -// TallyParams TallyParams `json:"tally_params" yaml:"tally_params"` -// DepositParams DepositParams `json:"deposit_params" yaml:"deposit_params"` -// } - -// func (gp Params) String() string { -// return gp.VotingParams.String() + "\n" + -// gp.TallyParams.String() + "\n" + gp.DepositParams.String() -// } - -// // NewParams creates a new gov Params instance -// func NewParams(vp VotingParams, tp TallyParams, dp DepositParams) Params { -// return Params{ -// VotingParams: vp, -// DepositParams: dp, -// TallyParams: tp, -// } -// } - func NewParams( minDeposit sdk.Coins, maxDepositPeriod time.Duration, votingPeriod time.Duration, quorum string, threshold string, vetoThreshold string, From dd334f5aa0d46a9c135fc06ae7a8731f32833c90 Mon Sep 17 00:00:00 2001 From: atheesh Date: Wed, 20 Jul 2022 18:07:23 +0530 Subject: [PATCH 09/33] fix tests --- simapp/app_legacy.go | 8 +-- x/gov/types/v1/params.go | 92 ++------------------------------- x/gov/types/v1/params_legacy.go | 79 ++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 92 deletions(-) diff --git a/simapp/app_legacy.go b/simapp/app_legacy.go index 0bc5655c805e..3553f7995c0d 100644 --- a/simapp/app_legacy.go +++ b/simapp/app_legacy.go @@ -307,8 +307,8 @@ func NewSimApp( govConfig.MaxMetadataLen = 10000 */ govKeeper := govkeeper.NewKeeper( - appCodec, keys[govtypes.StoreKey], app.GetSubspace(govtypes.ModuleName), app.AccountKeeper, app.BankKeeper, - app.StakingKeeper, app.MsgServiceRouter(), govConfig, + appCodec, keys[govtypes.StoreKey], app.AccountKeeper, app.BankKeeper, + app.StakingKeeper, app.MsgServiceRouter(), govConfig, authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.GovKeeper = *govKeeper.SetHooks( @@ -357,7 +357,7 @@ func NewSimApp( capability.NewAppModule(appCodec, *app.CapabilityKeeper, false), crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)), feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), - gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper), + gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)), mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil, app.GetSubspace(minttypes.ModuleName)), slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName)), distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(distrtypes.ModuleName)), @@ -425,7 +425,7 @@ func NewSimApp( bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), capability.NewAppModule(appCodec, *app.CapabilityKeeper, false), feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), - gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper), + gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)), mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil, app.GetSubspace(minttypes.ModuleName)), staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(distrtypes.ModuleName)), diff --git a/x/gov/types/v1/params.go b/x/gov/types/v1/params.go index 29dd2bdcc33f..6e314af935d2 100644 --- a/x/gov/types/v1/params.go +++ b/x/gov/types/v1/params.go @@ -21,94 +21,10 @@ var ( DefaultVetoThreshold = sdk.NewDecWithPrec(334, 3) ) -// // Equal checks equality of DepositParams -// func (dp DepositParams) Equal(dp2 DepositParams) bool { -// return sdk.Coins(dp.MinDeposit).IsEqual(dp2.MinDeposit) && dp.MaxDepositPeriod == dp2.MaxDepositPeriod -// } - -func validateDepositParams(i interface{}) error { - v, ok := i.(DepositParams) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - - if !sdk.Coins(v.MinDeposit).IsValid() { - return fmt.Errorf("invalid minimum deposit: %s", v.MinDeposit) - } - if v.MaxDepositPeriod == nil || v.MaxDepositPeriod.Seconds() <= 0 { - return fmt.Errorf("maximum deposit period must be positive: %d", v.MaxDepositPeriod) - } - - return nil -} - -// // Equal checks equality of TallyParams -// func (tp TallyParams) Equal(other TallyParams) bool { -// return tp.Quorum == other.Quorum && tp.Threshold == other.Threshold && tp.VetoThreshold == other.VetoThreshold -// } - -func validateTallyParams(i interface{}) error { - v, ok := i.(TallyParams) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - - quorum, err := sdk.NewDecFromStr(v.Quorum) - if err != nil { - return fmt.Errorf("invalid quorum string: %w", err) - } - if quorum.IsNegative() { - return fmt.Errorf("quorom cannot be negative: %s", quorum) - } - if quorum.GT(sdk.OneDec()) { - return fmt.Errorf("quorom too large: %s", v) - } - - threshold, err := sdk.NewDecFromStr(v.Threshold) - if err != nil { - return fmt.Errorf("invalid threshold string: %w", err) - } - if !threshold.IsPositive() { - return fmt.Errorf("vote threshold must be positive: %s", threshold) - } - if threshold.GT(sdk.OneDec()) { - return fmt.Errorf("vote threshold too large: %s", v) - } - - vetoThreshold, err := sdk.NewDecFromStr(v.VetoThreshold) - if err != nil { - return fmt.Errorf("invalid vetoThreshold string: %w", err) - } - if !vetoThreshold.IsPositive() { - return fmt.Errorf("veto threshold must be positive: %s", vetoThreshold) - } - if vetoThreshold.GT(sdk.OneDec()) { - return fmt.Errorf("veto threshold too large: %s", v) - } - - return nil -} - -// // Equal checks equality of TallyParams -// func (vp VotingParams) Equal(other VotingParams) bool { -// return vp.VotingPeriod == other.VotingPeriod -// } - -func validateVotingParams(i interface{}) error { - v, ok := i.(VotingParams) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - - if v.VotingPeriod == nil { - return errors.New("voting period must not be nil") - } - - if v.VotingPeriod.Seconds() <= 0 { - return fmt.Errorf("voting period must be positive: %s", v.VotingPeriod) - } - - return nil +func (p Params) Equal(p2 Params) bool { + return sdk.Coins(p.MinDeposit).IsEqual(p2.MinDeposit) && p.MaxDepositPeriod == p2.MaxDepositPeriod && + p.Quorum == p2.Quorum && p.Threshold == p2.Threshold && p.VetoThreshold == p2.VetoThreshold && + p.VotingPeriod == p2.VotingPeriod } func NewParams( diff --git a/x/gov/types/v1/params_legacy.go b/x/gov/types/v1/params_legacy.go index d9749e2ca30c..04069128409b 100644 --- a/x/gov/types/v1/params_legacy.go +++ b/x/gov/types/v1/params_legacy.go @@ -1,6 +1,10 @@ package v1 import ( + "errors" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) @@ -19,3 +23,78 @@ func ParamKeyTable() paramtypes.KeyTable { paramtypes.NewParamSetPair(ParamStoreKeyTallyParams, TallyParams{}, validateTallyParams), ) } + +func validateDepositParams(i interface{}) error { + v, ok := i.(DepositParams) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if !sdk.Coins(v.MinDeposit).IsValid() { + return fmt.Errorf("invalid minimum deposit: %s", v.MinDeposit) + } + if v.MaxDepositPeriod == nil || v.MaxDepositPeriod.Seconds() <= 0 { + return fmt.Errorf("maximum deposit period must be positive: %d", v.MaxDepositPeriod) + } + + return nil +} + +func validateTallyParams(i interface{}) error { + v, ok := i.(TallyParams) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + quorum, err := sdk.NewDecFromStr(v.Quorum) + if err != nil { + return fmt.Errorf("invalid quorum string: %w", err) + } + if quorum.IsNegative() { + return fmt.Errorf("quorom cannot be negative: %s", quorum) + } + if quorum.GT(sdk.OneDec()) { + return fmt.Errorf("quorom too large: %s", v) + } + + threshold, err := sdk.NewDecFromStr(v.Threshold) + if err != nil { + return fmt.Errorf("invalid threshold string: %w", err) + } + if !threshold.IsPositive() { + return fmt.Errorf("vote threshold must be positive: %s", threshold) + } + if threshold.GT(sdk.OneDec()) { + return fmt.Errorf("vote threshold too large: %s", v) + } + + vetoThreshold, err := sdk.NewDecFromStr(v.VetoThreshold) + if err != nil { + return fmt.Errorf("invalid vetoThreshold string: %w", err) + } + if !vetoThreshold.IsPositive() { + return fmt.Errorf("veto threshold must be positive: %s", vetoThreshold) + } + if vetoThreshold.GT(sdk.OneDec()) { + return fmt.Errorf("veto threshold too large: %s", v) + } + + return nil +} + +func validateVotingParams(i interface{}) error { + v, ok := i.(VotingParams) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if v.VotingPeriod == nil { + return errors.New("voting period must not be nil") + } + + if v.VotingPeriod.Seconds() <= 0 { + return fmt.Errorf("voting period must be positive: %s", v.VotingPeriod) + } + + return nil +} From b2420cfa03c07cfb9c280a9bf9bfb04b07a7e7a5 Mon Sep 17 00:00:00 2001 From: atheesh Date: Wed, 20 Jul 2022 19:03:07 +0530 Subject: [PATCH 10/33] add tests --- x/distribution/types/msg.go | 4 + x/gov/keeper/keeper.go | 5 + x/gov/keeper/msg_server_test.go | 275 ++++++++++++++++++++++++++++++++ x/gov/types/v1/genesis_test.go | 11 +- x/gov/types/v1/msgs.go | 4 + x/gov/types/v1/params.go | 15 +- 6 files changed, 303 insertions(+), 11 deletions(-) diff --git a/x/distribution/types/msg.go b/x/distribution/types/msg.go index 36dc021e0486..7efd47e72d3b 100644 --- a/x/distribution/types/msg.go +++ b/x/distribution/types/msg.go @@ -175,5 +175,9 @@ func (msg MsgUpdateParams) GetSignBytes() []byte { // ValidateBasic performs basic MsgUpdateParams message validation. func (msg MsgUpdateParams) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", err) + } + return msg.Params.ValidateBasic() } diff --git a/x/gov/keeper/keeper.go b/x/gov/keeper/keeper.go index c03609ac34a0..14ea32bd5616 100644 --- a/x/gov/keeper/keeper.go +++ b/x/gov/keeper/keeper.go @@ -49,6 +49,11 @@ type Keeper struct { authority string } +// GetAuthority returns the x/distribution module's authority. +func (k Keeper) GetAuthority() string { + return k.authority +} + // NewKeeper returns a governance keeper. It handles: // - submitting governance proposals // - depositing funds into proposals, and activating upon sufficient funds being deposited diff --git a/x/gov/keeper/msg_server_test.go b/x/gov/keeper/msg_server_test.go index a355aecc188c..894e8f05e9ff 100644 --- a/x/gov/keeper/msg_server_test.go +++ b/x/gov/keeper/msg_server_test.go @@ -2,6 +2,7 @@ package keeper_test import ( "strings" + "time" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" @@ -732,3 +733,277 @@ func (suite *KeeperTestSuite) TestLegacyMsgDeposit() { }) } } + +func (suite *KeeperTestSuite) TestMsgUpdateParams() { + + authority := suite.app.GovKeeper.GetAuthority() + params := v1.DefaultParams() + testCases := []struct { + name string + input func() *v1.MsgUpdateParams + expErr bool + expErrMsg string + }{ + { + name: "valid", + input: func() *v1.MsgUpdateParams { + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params, + } + }, + expErr: false, + }, + { + name: "invalid authority", + input: func() *v1.MsgUpdateParams { + return &v1.MsgUpdateParams{ + Authority: "authority", + Params: params, + } + }, + expErr: true, + expErrMsg: "invalid authority address", + }, + { + name: "invalid min deposit", + input: func() *v1.MsgUpdateParams { + params1 := params + params1.MinDeposit = nil + + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params1, + } + }, + expErr: true, + expErrMsg: "invalid minimum deposit", + }, + { + name: "negative deposit", + input: func() *v1.MsgUpdateParams { + params1 := params + params1.MinDeposit = sdk.Coins{{ + Denom: sdk.DefaultBondDenom, + Amount: sdk.NewInt(-100), + }} + + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params1, + } + }, + expErr: true, + expErrMsg: "invalid minimum deposit", + }, + { + name: "invalid max deposit period", + input: func() *v1.MsgUpdateParams { + params1 := params + params1.MaxDepositPeriod = nil + + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params1, + } + }, + expErr: true, + expErrMsg: "maximum deposit period must not be nil", + }, + { + name: "zero max deposit period", + input: func() *v1.MsgUpdateParams { + params1 := params + duration := time.Duration(0) + params1.MaxDepositPeriod = &duration + + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params1, + } + }, + expErr: true, + expErrMsg: "maximum deposit period must be positive", + }, + { + name: "invalid quorum", + input: func() *v1.MsgUpdateParams { + params1 := params + params1.Quorum = "abc" + + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params1, + } + }, + expErr: true, + expErrMsg: "invalid quorum string", + }, + { + name: "negative quorum", + input: func() *v1.MsgUpdateParams { + params1 := params + params1.Quorum = "-0.1" + + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params1, + } + }, + expErr: true, + expErrMsg: "quorom cannot be negative", + }, + { + name: "quorum > 1", + input: func() *v1.MsgUpdateParams { + params1 := params + params1.Quorum = "2" + + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params1, + } + }, + expErr: true, + expErrMsg: "quorom too large", + }, + { + name: "invalid threshold", + input: func() *v1.MsgUpdateParams { + params1 := params + params1.Threshold = "abc" + + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params1, + } + }, + expErr: true, + expErrMsg: "invalid threshold string", + }, + { + name: "negative threshold", + input: func() *v1.MsgUpdateParams { + params1 := params + params1.Threshold = "-0.1" + + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params1, + } + }, + expErr: true, + expErrMsg: "vote threshold must be positive", + }, + { + name: "threshold > 1", + input: func() *v1.MsgUpdateParams { + params1 := params + params1.Threshold = "2" + + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params1, + } + }, + expErr: true, + expErrMsg: "vote threshold too large", + }, + { + name: "invalid veto threshold", + input: func() *v1.MsgUpdateParams { + params1 := params + params1.VetoThreshold = "abc" + + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params1, + } + }, + expErr: true, + expErrMsg: "invalid vetoThreshold string", + }, + { + name: "negative veto threshold", + input: func() *v1.MsgUpdateParams { + params1 := params + params1.VetoThreshold = "-0.1" + + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params1, + } + }, + expErr: true, + expErrMsg: "veto threshold must be positive", + }, + { + name: "veto threshold > 1", + input: func() *v1.MsgUpdateParams { + params1 := params + params1.VetoThreshold = "2" + + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params1, + } + }, + expErr: true, + expErrMsg: "veto threshold too large", + }, + { + name: "invalid voting period", + input: func() *v1.MsgUpdateParams { + params1 := params + params1.VotingPeriod = nil + + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params1, + } + }, + expErr: true, + expErrMsg: "voting period must not be nil", + }, + { + name: "zero voting period", + input: func() *v1.MsgUpdateParams { + params1 := params + duration := time.Duration(0) + params1.VotingPeriod = &duration + + return &v1.MsgUpdateParams{ + Authority: authority, + Params: params1, + } + }, + expErr: true, + expErrMsg: "voting period must be positive", + }, + } + + for _, tc := range testCases { + tc := tc + suite.Run(tc.name, func() { + msg := tc.input() + exec := func(updateParams *v1.MsgUpdateParams) error { + if err := msg.ValidateBasic(); err != nil { + return err + } + + if _, err := suite.msgSrvr.UpdateParams(suite.ctx, updateParams); err != nil { + return err + } + return nil + } + + err := exec(msg) + if tc.expErr { + suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.expErrMsg) + } else { + suite.Require().NoError(err) + } + }) + } +} diff --git a/x/gov/types/v1/genesis_test.go b/x/gov/types/v1/genesis_test.go index 20421ddc93b2..8109d5845ada 100644 --- a/x/gov/types/v1/genesis_test.go +++ b/x/gov/types/v1/genesis_test.go @@ -47,12 +47,11 @@ func TestValidateGenesis(t *testing.T) { name: "invalid min deposit", genesisState: func() *v1.GenesisState { params1 := params - params1.MinDeposit = sdk.Coins{ - { - Denom: sdk.DefaultBondDenom, - Amount: sdk.NewInt(-100), - }, - } + params1.MinDeposit = sdk.Coins{{ + Denom: sdk.DefaultBondDenom, + Amount: sdk.NewInt(-100), + }} + return &v1.GenesisState{ StartingProposalId: 0, Params: ¶ms1, diff --git a/x/gov/types/v1/msgs.go b/x/gov/types/v1/msgs.go index f75e457c2a59..1c46906293ef 100644 --- a/x/gov/types/v1/msgs.go +++ b/x/gov/types/v1/msgs.go @@ -269,6 +269,10 @@ func (msg MsgUpdateParams) Type() string { return sdk.MsgTypeURL(&msg) } // ValidateBasic implements Msg func (msg MsgUpdateParams) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid authority address: %s", err) + } + return msg.Params.ValidateBasic() } diff --git a/x/gov/types/v1/params.go b/x/gov/types/v1/params.go index 6e314af935d2..f9f09090a8db 100644 --- a/x/gov/types/v1/params.go +++ b/x/gov/types/v1/params.go @@ -1,7 +1,6 @@ package v1 import ( - "errors" "fmt" "time" @@ -55,10 +54,16 @@ func DefaultParams() Params { func (p Params) ValidateBasic() error { - if !sdk.Coins(p.MinDeposit).IsValid() { - return fmt.Errorf("invalid minimum deposit: %s", p.MinDeposit) + sdk.Coins(p.MinDeposit).Empty() + if minDeposit := sdk.Coins(p.MinDeposit); minDeposit.Empty() || !minDeposit.IsValid() { + return fmt.Errorf("invalid minimum deposit: %s", minDeposit) } - if p.MaxDepositPeriod == nil || p.MaxDepositPeriod.Seconds() <= 0 { + + if p.MaxDepositPeriod == nil { + return fmt.Errorf("maximum deposit period must not be nil: %d", p.MaxDepositPeriod) + } + + if p.MaxDepositPeriod.Seconds() <= 0 { return fmt.Errorf("maximum deposit period must be positive: %d", p.MaxDepositPeriod) } @@ -96,7 +101,7 @@ func (p Params) ValidateBasic() error { } if p.VotingPeriod == nil { - return errors.New("voting period must not be nil") + return fmt.Errorf("voting period must not be nil: %d", p.VotingPeriod) } if p.VotingPeriod.Seconds() <= 0 { From 292a08eaf193ad78611e6daabfb3792776fda670 Mon Sep 17 00:00:00 2001 From: atheesh Date: Wed, 20 Jul 2022 19:07:10 +0530 Subject: [PATCH 11/33] review --- api/cosmos/gov/v1/tx.pulsar.go | 2 +- proto/cosmos/gov/v1/tx.proto | 2 +- x/gov/types/v1/tx.pb.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/cosmos/gov/v1/tx.pulsar.go b/api/cosmos/gov/v1/tx.pulsar.go index b4e8f2d76fb1..b8593ef271c3 100644 --- a/api/cosmos/gov/v1/tx.pulsar.go +++ b/api/cosmos/gov/v1/tx.pulsar.go @@ -6265,7 +6265,7 @@ type MsgUpdateParams struct { // authority is the address of the governance account. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // params defines the x/distribution parameters to update. + // params defines the x/gov parameters to update. // // NOTE: All parameters must be supplied. Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` diff --git a/proto/cosmos/gov/v1/tx.proto b/proto/cosmos/gov/v1/tx.proto index b7eedf40122d..df6b15f17632 100644 --- a/proto/cosmos/gov/v1/tx.proto +++ b/proto/cosmos/gov/v1/tx.proto @@ -114,7 +114,7 @@ message MsgUpdateParams { // authority is the address of the governance account. string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // params defines the x/distribution parameters to update. + // params defines the x/gov parameters to update. // // NOTE: All parameters must be supplied. Params params = 2 [(gogoproto.nullable) = false]; diff --git a/x/gov/types/v1/tx.pb.go b/x/gov/types/v1/tx.pb.go index a36a467728e0..42864efee94b 100644 --- a/x/gov/types/v1/tx.pb.go +++ b/x/gov/types/v1/tx.pb.go @@ -557,7 +557,7 @@ var xxx_messageInfo_MsgDepositResponse proto.InternalMessageInfo type MsgUpdateParams struct { // authority is the address of the governance account. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // params defines the x/distribution parameters to update. + // params defines the x/gov parameters to update. // // NOTE: All parameters must be supplied. Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` From d656a9f5dbeafe31f54e5e2012b0479e121a430e Mon Sep 17 00:00:00 2001 From: atheesh Date: Wed, 20 Jul 2022 19:26:40 +0530 Subject: [PATCH 12/33] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bc8bf64beae..edeb2a15677d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/mint) [#12363](https://github.com/cosmos/cosmos-sdk/pull/12363) Migrate `x/mint` to self-managed parameters and deprecate it's usage of `x/params`. * (x/distribution) [#12434](https://github.com/cosmos/cosmos-sdk/pull/12434) Migrate `x/distribution` to self-managed parameters and deprecate it's usage of `x/params`. * (x/crisis) [#12445](https://github.com/cosmos/cosmos-sdk/pull/12445) Migrate `x/crisis` to self-managed parameters and deprecate it's usage of `x/params`. +* (x/gov) [#12631](https://github.com/cosmos/cosmos-sdk/pull/12631) Migrate `x/gov` to self-managed parameters and deprecate it's usage of `x/params`. ### API Breaking Changes @@ -82,6 +83,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (linting) [#12141](https://github.com/cosmos/cosmos-sdk/pull/12141) Fix usability related linting for database. This means removing the infix Prefix from `prefix.NewPrefixWriter` and such so that it is `prefix.NewWriter` and making `db.DBConnection` and such into `db.Connection` * (x/distribution) [#12434](https://github.com/cosmos/cosmos-sdk/pull/12434) `x/distribution` module `SetParams` keeper method definition is now updated to return `error`. * (x/crisis) [#12445](https://github.com/cosmos/cosmos-sdk/pull/12445) `x/crisis` module `SetConstantFee` keeper method definition is now updated to return `error`. +* (x/gov) [#12631](https://github.com/cosmos/cosmos-sdk/pull/12631) `x/gov` module refactored to use `Params` as single struct instead of `DepositParams`, `TallyParams` & `VotingParams`. ### CLI Breaking Changes From 90e5ae4f4ce369b7910d55ee386b3b6b0f543f3b Mon Sep 17 00:00:00 2001 From: atheesh Date: Thu, 21 Jul 2022 10:15:02 +0530 Subject: [PATCH 13/33] remove unnecessary code --- x/gov/types/v1/params.go | 1 - 1 file changed, 1 deletion(-) diff --git a/x/gov/types/v1/params.go b/x/gov/types/v1/params.go index f9f09090a8db..eac6f3721126 100644 --- a/x/gov/types/v1/params.go +++ b/x/gov/types/v1/params.go @@ -54,7 +54,6 @@ func DefaultParams() Params { func (p Params) ValidateBasic() error { - sdk.Coins(p.MinDeposit).Empty() if minDeposit := sdk.Coins(p.MinDeposit); minDeposit.Empty() || !minDeposit.IsValid() { return fmt.Errorf("invalid minimum deposit: %s", minDeposit) } From 4cd8271d13d17560e0d02a9f74b8fbc44c5680ca Mon Sep 17 00:00:00 2001 From: atheesh Date: Thu, 21 Jul 2022 15:46:09 +0530 Subject: [PATCH 14/33] proto changes --- api/cosmos/gov/v1/genesis.pulsar.go | 341 ++++++++++++-- api/cosmos/gov/v1/query.pulsar.go | 668 +++++++++++++++++++++------- proto/cosmos/gov/v1/genesis.proto | 11 +- proto/cosmos/gov/v1/query.proto | 17 +- x/gov/types/v1/genesis.pb.go | 231 +++++++++- x/gov/types/v1/query.pb.go | 362 ++++++++++++--- x/gov/types/v1/query.pb.gw.go | 18 + 7 files changed, 1385 insertions(+), 263 deletions(-) diff --git a/api/cosmos/gov/v1/genesis.pulsar.go b/api/cosmos/gov/v1/genesis.pulsar.go index 56fa30e58d89..902cd86da38b 100644 --- a/api/cosmos/gov/v1/genesis.pulsar.go +++ b/api/cosmos/gov/v1/genesis.pulsar.go @@ -171,6 +171,9 @@ var ( fd_GenesisState_deposits protoreflect.FieldDescriptor fd_GenesisState_votes protoreflect.FieldDescriptor fd_GenesisState_proposals protoreflect.FieldDescriptor + fd_GenesisState_deposit_params protoreflect.FieldDescriptor + fd_GenesisState_voting_params protoreflect.FieldDescriptor + fd_GenesisState_tally_params protoreflect.FieldDescriptor fd_GenesisState_params protoreflect.FieldDescriptor ) @@ -181,6 +184,9 @@ func init() { fd_GenesisState_deposits = md_GenesisState.Fields().ByName("deposits") fd_GenesisState_votes = md_GenesisState.Fields().ByName("votes") fd_GenesisState_proposals = md_GenesisState.Fields().ByName("proposals") + fd_GenesisState_deposit_params = md_GenesisState.Fields().ByName("deposit_params") + fd_GenesisState_voting_params = md_GenesisState.Fields().ByName("voting_params") + fd_GenesisState_tally_params = md_GenesisState.Fields().ByName("tally_params") fd_GenesisState_params = md_GenesisState.Fields().ByName("params") } @@ -273,6 +279,24 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, return } } + if x.DepositParams != nil { + value := protoreflect.ValueOfMessage(x.DepositParams.ProtoReflect()) + if !f(fd_GenesisState_deposit_params, value) { + return + } + } + if x.VotingParams != nil { + value := protoreflect.ValueOfMessage(x.VotingParams.ProtoReflect()) + if !f(fd_GenesisState_voting_params, value) { + return + } + } + if x.TallyParams != nil { + value := protoreflect.ValueOfMessage(x.TallyParams.ProtoReflect()) + if !f(fd_GenesisState_tally_params, value) { + return + } + } if x.Params != nil { value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) if !f(fd_GenesisState_params, value) { @@ -302,6 +326,12 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool return len(x.Votes) != 0 case "cosmos.gov.v1.GenesisState.proposals": return len(x.Proposals) != 0 + case "cosmos.gov.v1.GenesisState.deposit_params": + return x.DepositParams != nil + case "cosmos.gov.v1.GenesisState.voting_params": + return x.VotingParams != nil + case "cosmos.gov.v1.GenesisState.tally_params": + return x.TallyParams != nil case "cosmos.gov.v1.GenesisState.params": return x.Params != nil default: @@ -328,6 +358,12 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { x.Votes = nil case "cosmos.gov.v1.GenesisState.proposals": x.Proposals = nil + case "cosmos.gov.v1.GenesisState.deposit_params": + x.DepositParams = nil + case "cosmos.gov.v1.GenesisState.voting_params": + x.VotingParams = nil + case "cosmos.gov.v1.GenesisState.tally_params": + x.TallyParams = nil case "cosmos.gov.v1.GenesisState.params": x.Params = nil default: @@ -367,6 +403,15 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto } listValue := &_GenesisState_4_list{list: &x.Proposals} return protoreflect.ValueOfList(listValue) + case "cosmos.gov.v1.GenesisState.deposit_params": + value := x.DepositParams + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.gov.v1.GenesisState.voting_params": + value := x.VotingParams + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.gov.v1.GenesisState.tally_params": + value := x.TallyParams + return protoreflect.ValueOfMessage(value.ProtoReflect()) case "cosmos.gov.v1.GenesisState.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) @@ -404,6 +449,12 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value lv := value.List() clv := lv.(*_GenesisState_4_list) x.Proposals = *clv.list + case "cosmos.gov.v1.GenesisState.deposit_params": + x.DepositParams = value.Message().Interface().(*DepositParams) + case "cosmos.gov.v1.GenesisState.voting_params": + x.VotingParams = value.Message().Interface().(*VotingParams) + case "cosmos.gov.v1.GenesisState.tally_params": + x.TallyParams = value.Message().Interface().(*TallyParams) case "cosmos.gov.v1.GenesisState.params": x.Params = value.Message().Interface().(*Params) default: @@ -444,6 +495,21 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p } value := &_GenesisState_4_list{list: &x.Proposals} return protoreflect.ValueOfList(value) + case "cosmos.gov.v1.GenesisState.deposit_params": + if x.DepositParams == nil { + x.DepositParams = new(DepositParams) + } + return protoreflect.ValueOfMessage(x.DepositParams.ProtoReflect()) + case "cosmos.gov.v1.GenesisState.voting_params": + if x.VotingParams == nil { + x.VotingParams = new(VotingParams) + } + return protoreflect.ValueOfMessage(x.VotingParams.ProtoReflect()) + case "cosmos.gov.v1.GenesisState.tally_params": + if x.TallyParams == nil { + x.TallyParams = new(TallyParams) + } + return protoreflect.ValueOfMessage(x.TallyParams.ProtoReflect()) case "cosmos.gov.v1.GenesisState.params": if x.Params == nil { x.Params = new(Params) @@ -475,6 +541,15 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) case "cosmos.gov.v1.GenesisState.proposals": list := []*Proposal{} return protoreflect.ValueOfList(&_GenesisState_4_list{list: &list}) + case "cosmos.gov.v1.GenesisState.deposit_params": + m := new(DepositParams) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.gov.v1.GenesisState.voting_params": + m := new(VotingParams) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.gov.v1.GenesisState.tally_params": + m := new(TallyParams) + return protoreflect.ValueOfMessage(m.ProtoReflect()) case "cosmos.gov.v1.GenesisState.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) @@ -568,6 +643,18 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } + if x.DepositParams != nil { + l = options.Size(x.DepositParams) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.VotingParams != nil { + l = options.Size(x.VotingParams) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.TallyParams != nil { + l = options.Size(x.TallyParams) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.Params != nil { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) @@ -613,6 +700,48 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- + dAtA[i] = 0x42 + } + if x.TallyParams != nil { + encoded, err := options.Marshal(x.TallyParams) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x3a + } + if x.VotingParams != nil { + encoded, err := options.Marshal(x.VotingParams) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x32 + } + if x.DepositParams != nil { + encoded, err := options.Marshal(x.DepositParams) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- dAtA[i] = 0x2a } if len(x.Proposals) > 0 { @@ -839,6 +968,114 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { } iNdEx = postIndex case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DepositParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.DepositParams == nil { + x.DepositParams = &DepositParams{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DepositParams); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VotingParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.VotingParams == nil { + x.VotingParams = &VotingParams{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VotingParams); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TallyParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.TallyParams == nil { + x.TallyParams = &TallyParams{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TallyParams); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 8: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } @@ -938,8 +1175,17 @@ type GenesisState struct { Votes []*Vote `protobuf:"bytes,3,rep,name=votes,proto3" json:"votes,omitempty"` // proposals defines all the proposals present at genesis. Proposals []*Proposal `protobuf:"bytes,4,rep,name=proposals,proto3" json:"proposals,omitempty"` + // Deprecated: Prefer to use `params` instead. + // deposit_params defines all the paramaters of related to deposit. + DepositParams *DepositParams `protobuf:"bytes,5,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"` + // Deprecated: Prefer to use `params` instead. + // voting_params defines all the paramaters of related to voting. + VotingParams *VotingParams `protobuf:"bytes,6,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"` + // Deprecated: Prefer to use `params` instead. + // tally_params defines all the paramaters of related to tally. + TallyParams *TallyParams `protobuf:"bytes,7,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` // params defines all the paramaters of x/gov module. - Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` + Params *Params `protobuf:"bytes,8,opt,name=params,proto3" json:"params,omitempty"` } func (x *GenesisState) Reset() { @@ -990,6 +1236,27 @@ func (x *GenesisState) GetProposals() []*Proposal { return nil } +func (x *GenesisState) GetDepositParams() *DepositParams { + if x != nil { + return x.DepositParams + } + return nil +} + +func (x *GenesisState) GetVotingParams() *VotingParams { + if x != nil { + return x.VotingParams + } + return nil +} + +func (x *GenesisState) GetTallyParams() *TallyParams { + if x != nil { + return x.TallyParams + } + return nil +} + func (x *GenesisState) GetParams() *Params { if x != nil { return x.Params @@ -1004,7 +1271,7 @@ var file_cosmos_gov_v1_genesis_proto_rawDesc = []byte{ 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x76, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x02, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcb, 0x03, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, @@ -1017,21 +1284,33 @@ var file_cosmos_gov_v1_genesis_proto_rawDesc = []byte{ 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x2d, - 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x9d, 0x01, - 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, - 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, - 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, - 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, - 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x61, 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x43, + 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x69, 0x6e, + 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, + 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, + 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x42, 0x9d, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, + 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, + 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, + 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, + 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1048,22 +1327,28 @@ func file_cosmos_gov_v1_genesis_proto_rawDescGZIP() []byte { var file_cosmos_gov_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_cosmos_gov_v1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: cosmos.gov.v1.GenesisState - (*Deposit)(nil), // 1: cosmos.gov.v1.Deposit - (*Vote)(nil), // 2: cosmos.gov.v1.Vote - (*Proposal)(nil), // 3: cosmos.gov.v1.Proposal - (*Params)(nil), // 4: cosmos.gov.v1.Params + (*GenesisState)(nil), // 0: cosmos.gov.v1.GenesisState + (*Deposit)(nil), // 1: cosmos.gov.v1.Deposit + (*Vote)(nil), // 2: cosmos.gov.v1.Vote + (*Proposal)(nil), // 3: cosmos.gov.v1.Proposal + (*DepositParams)(nil), // 4: cosmos.gov.v1.DepositParams + (*VotingParams)(nil), // 5: cosmos.gov.v1.VotingParams + (*TallyParams)(nil), // 6: cosmos.gov.v1.TallyParams + (*Params)(nil), // 7: cosmos.gov.v1.Params } var file_cosmos_gov_v1_genesis_proto_depIdxs = []int32{ 1, // 0: cosmos.gov.v1.GenesisState.deposits:type_name -> cosmos.gov.v1.Deposit 2, // 1: cosmos.gov.v1.GenesisState.votes:type_name -> cosmos.gov.v1.Vote 3, // 2: cosmos.gov.v1.GenesisState.proposals:type_name -> cosmos.gov.v1.Proposal - 4, // 3: cosmos.gov.v1.GenesisState.params:type_name -> cosmos.gov.v1.Params - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 4, // 3: cosmos.gov.v1.GenesisState.deposit_params:type_name -> cosmos.gov.v1.DepositParams + 5, // 4: cosmos.gov.v1.GenesisState.voting_params:type_name -> cosmos.gov.v1.VotingParams + 6, // 5: cosmos.gov.v1.GenesisState.tally_params:type_name -> cosmos.gov.v1.TallyParams + 7, // 6: cosmos.gov.v1.GenesisState.params:type_name -> cosmos.gov.v1.Params + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_cosmos_gov_v1_genesis_proto_init() } diff --git a/api/cosmos/gov/v1/query.pulsar.go b/api/cosmos/gov/v1/query.pulsar.go index 67a5074177ec..d253c15fbac2 100644 --- a/api/cosmos/gov/v1/query.pulsar.go +++ b/api/cosmos/gov/v1/query.pulsar.go @@ -3998,12 +3998,14 @@ func (x *fastReflection_QueryVotesResponse) ProtoMethods() *protoiface.Methods { } var ( - md_QueryParamsRequest protoreflect.MessageDescriptor + md_QueryParamsRequest protoreflect.MessageDescriptor + fd_QueryParamsRequest_params_type protoreflect.FieldDescriptor ) func init() { file_cosmos_gov_v1_query_proto_init() md_QueryParamsRequest = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryParamsRequest") + fd_QueryParamsRequest_params_type = md_QueryParamsRequest.Fields().ByName("params_type") } var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) @@ -4071,6 +4073,12 @@ func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessag // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ParamsType != "" { + value := protoreflect.ValueOfString(x.ParamsType) + if !f(fd_QueryParamsRequest_params_type, value) { + return + } + } } // Has reports whether a field is populated. @@ -4086,6 +4094,8 @@ func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescr // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "cosmos.gov.v1.QueryParamsRequest.params_type": + return x.ParamsType != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsRequest")) @@ -4102,6 +4112,8 @@ func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "cosmos.gov.v1.QueryParamsRequest.params_type": + x.ParamsType = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsRequest")) @@ -4118,6 +4130,9 @@ func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescripto // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "cosmos.gov.v1.QueryParamsRequest.params_type": + value := x.ParamsType + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsRequest")) @@ -4138,6 +4153,8 @@ func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDes // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "cosmos.gov.v1.QueryParamsRequest.params_type": + x.ParamsType = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsRequest")) @@ -4158,6 +4175,8 @@ func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.gov.v1.QueryParamsRequest.params_type": + panic(fmt.Errorf("field params_type of message cosmos.gov.v1.QueryParamsRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsRequest")) @@ -4171,6 +4190,8 @@ func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescrip // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.gov.v1.QueryParamsRequest.params_type": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.QueryParamsRequest")) @@ -4240,6 +4261,10 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { var n int var l int _ = l + l = len(x.ParamsType) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -4269,6 +4294,13 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.ParamsType) > 0 { + i -= len(x.ParamsType) + copy(dAtA[i:], x.ParamsType) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ParamsType))) + i-- + dAtA[i] = 0xa + } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -4318,6 +4350,38 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ParamsType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ParamsType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -4354,13 +4418,19 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { } var ( - md_QueryParamsResponse protoreflect.MessageDescriptor - fd_QueryParamsResponse_params protoreflect.FieldDescriptor + md_QueryParamsResponse protoreflect.MessageDescriptor + fd_QueryParamsResponse_voting_params protoreflect.FieldDescriptor + fd_QueryParamsResponse_deposit_params protoreflect.FieldDescriptor + fd_QueryParamsResponse_tally_params protoreflect.FieldDescriptor + fd_QueryParamsResponse_params protoreflect.FieldDescriptor ) func init() { file_cosmos_gov_v1_query_proto_init() md_QueryParamsResponse = File_cosmos_gov_v1_query_proto.Messages().ByName("QueryParamsResponse") + fd_QueryParamsResponse_voting_params = md_QueryParamsResponse.Fields().ByName("voting_params") + fd_QueryParamsResponse_deposit_params = md_QueryParamsResponse.Fields().ByName("deposit_params") + fd_QueryParamsResponse_tally_params = md_QueryParamsResponse.Fields().ByName("tally_params") fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") } @@ -4429,6 +4499,24 @@ func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessa // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.VotingParams != nil { + value := protoreflect.ValueOfMessage(x.VotingParams.ProtoReflect()) + if !f(fd_QueryParamsResponse_voting_params, value) { + return + } + } + if x.DepositParams != nil { + value := protoreflect.ValueOfMessage(x.DepositParams.ProtoReflect()) + if !f(fd_QueryParamsResponse_deposit_params, value) { + return + } + } + if x.TallyParams != nil { + value := protoreflect.ValueOfMessage(x.TallyParams.ProtoReflect()) + if !f(fd_QueryParamsResponse_tally_params, value) { + return + } + } if x.Params != nil { value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) if !f(fd_QueryParamsResponse_params, value) { @@ -4450,6 +4538,12 @@ func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDesc // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "cosmos.gov.v1.QueryParamsResponse.voting_params": + return x.VotingParams != nil + case "cosmos.gov.v1.QueryParamsResponse.deposit_params": + return x.DepositParams != nil + case "cosmos.gov.v1.QueryParamsResponse.tally_params": + return x.TallyParams != nil case "cosmos.gov.v1.QueryParamsResponse.params": return x.Params != nil default: @@ -4468,6 +4562,12 @@ func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "cosmos.gov.v1.QueryParamsResponse.voting_params": + x.VotingParams = nil + case "cosmos.gov.v1.QueryParamsResponse.deposit_params": + x.DepositParams = nil + case "cosmos.gov.v1.QueryParamsResponse.tally_params": + x.TallyParams = nil case "cosmos.gov.v1.QueryParamsResponse.params": x.Params = nil default: @@ -4486,6 +4586,15 @@ func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescript // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "cosmos.gov.v1.QueryParamsResponse.voting_params": + value := x.VotingParams + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.gov.v1.QueryParamsResponse.deposit_params": + value := x.DepositParams + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.gov.v1.QueryParamsResponse.tally_params": + value := x.TallyParams + return protoreflect.ValueOfMessage(value.ProtoReflect()) case "cosmos.gov.v1.QueryParamsResponse.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) @@ -4509,6 +4618,12 @@ func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDe // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "cosmos.gov.v1.QueryParamsResponse.voting_params": + x.VotingParams = value.Message().Interface().(*VotingParams) + case "cosmos.gov.v1.QueryParamsResponse.deposit_params": + x.DepositParams = value.Message().Interface().(*DepositParams) + case "cosmos.gov.v1.QueryParamsResponse.tally_params": + x.TallyParams = value.Message().Interface().(*TallyParams) case "cosmos.gov.v1.QueryParamsResponse.params": x.Params = value.Message().Interface().(*Params) default: @@ -4531,6 +4646,21 @@ func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.gov.v1.QueryParamsResponse.voting_params": + if x.VotingParams == nil { + x.VotingParams = new(VotingParams) + } + return protoreflect.ValueOfMessage(x.VotingParams.ProtoReflect()) + case "cosmos.gov.v1.QueryParamsResponse.deposit_params": + if x.DepositParams == nil { + x.DepositParams = new(DepositParams) + } + return protoreflect.ValueOfMessage(x.DepositParams.ProtoReflect()) + case "cosmos.gov.v1.QueryParamsResponse.tally_params": + if x.TallyParams == nil { + x.TallyParams = new(TallyParams) + } + return protoreflect.ValueOfMessage(x.TallyParams.ProtoReflect()) case "cosmos.gov.v1.QueryParamsResponse.params": if x.Params == nil { x.Params = new(Params) @@ -4549,6 +4679,15 @@ func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescri // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.gov.v1.QueryParamsResponse.voting_params": + m := new(VotingParams) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.gov.v1.QueryParamsResponse.deposit_params": + m := new(DepositParams) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.gov.v1.QueryParamsResponse.tally_params": + m := new(TallyParams) + return protoreflect.ValueOfMessage(m.ProtoReflect()) case "cosmos.gov.v1.QueryParamsResponse.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) @@ -4621,6 +4760,18 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods var n int var l int _ = l + if x.VotingParams != nil { + l = options.Size(x.VotingParams) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.DepositParams != nil { + l = options.Size(x.DepositParams) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.TallyParams != nil { + l = options.Size(x.TallyParams) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.Params != nil { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) @@ -4666,7 +4817,49 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 + } + if x.TallyParams != nil { + encoded, err := options.Marshal(x.TallyParams) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if x.DepositParams != nil { + encoded, err := options.Marshal(x.DepositParams) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if x.VotingParams != nil { + encoded, err := options.Marshal(x.VotingParams) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -4717,7 +4910,115 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 5: + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VotingParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.VotingParams == nil { + x.VotingParams = &VotingParams{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VotingParams); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DepositParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.DepositParams == nil { + x.DepositParams = &DepositParams{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DepositParams); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TallyParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.TallyParams == nil { + x.TallyParams = &TallyParams{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TallyParams); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } @@ -7964,6 +8265,10 @@ type QueryParamsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // params_type defines which parameters to query for, can be one of "voting", + // "tallying" or "deposit". + ParamsType string `protobuf:"bytes,1,opt,name=params_type,json=paramsType,proto3" json:"params_type,omitempty"` } func (x *QueryParamsRequest) Reset() { @@ -7986,14 +8291,30 @@ func (*QueryParamsRequest) Descriptor() ([]byte, []int) { return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{8} } +func (x *QueryParamsRequest) GetParamsType() string { + if x != nil { + return x.ParamsType + } + return "" +} + // QueryParamsResponse is the response type for the Query/Params RPC method. type QueryParamsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Deprecated: Prefer to use `params` instead. + // voting_params defines the parameters related to voting. + VotingParams *VotingParams `protobuf:"bytes,1,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"` + // Deprecated: Prefer to use `params` instead. + // deposit_params defines the parameters related to deposit. + DepositParams *DepositParams `protobuf:"bytes,2,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"` + // Deprecated: Prefer to use `params` instead. + // tally_params defines the parameters related to tally. + TallyParams *TallyParams `protobuf:"bytes,3,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` // params defines all the paramaters of x/gov module. - Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` + Params *Params `protobuf:"bytes,4,opt,name=params,proto3" json:"params,omitempty"` } func (x *QueryParamsResponse) Reset() { @@ -8016,6 +8337,27 @@ func (*QueryParamsResponse) Descriptor() ([]byte, []int) { return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{9} } +func (x *QueryParamsResponse) GetVotingParams() *VotingParams { + if x != nil { + return x.VotingParams + } + return nil +} + +func (x *QueryParamsResponse) GetDepositParams() *DepositParams { + if x != nil { + return x.DepositParams + } + return nil +} + +func (x *QueryParamsResponse) GetTallyParams() *TallyParams { + if x != nil { + return x.TallyParams + } + return nil +} + func (x *QueryParamsResponse) GetParams() *Params { if x != nil { return x.Params @@ -8346,130 +8688,144 @@ var file_cosmos_gov_v1_query_proto_rawDesc = []byte{ 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x44, - 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x22, 0x6e, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x09, - 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x22, 0x48, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, - 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x22, 0x7f, - 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x94, 0x01, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x64, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x47, 0x0a, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, - 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x49, 0x64, 0x22, 0x4c, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, - 0x0a, 0x05, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, - 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x74, 0x61, 0x6c, 0x6c, 0x79, - 0x32, 0xcc, 0x08, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x85, 0x01, 0x0a, 0x08, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, - 0x64, 0x7d, 0x12, 0x7a, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, - 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, - 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x87, - 0x01, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x36, 0x12, 0x34, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x35, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, + 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, + 0x8a, 0x02, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, + 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0c, 0x76, 0x6f, 0x74, + 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x0e, 0x64, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x0d, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3d, + 0x0a, 0x0c, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, + 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x0b, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2d, 0x0a, + 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x6e, 0x0a, 0x13, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x22, 0x48, 0x0a, 0x14, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x07, 0x64, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x22, 0x7f, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, + 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, + 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x01, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x32, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x08, 0x64, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, + 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, + 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x22, 0x4c, 0x0a, 0x18, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x52, 0x05, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x32, 0xcc, 0x08, 0x0a, 0x05, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x12, 0x85, 0x01, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, + 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, + 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x28, 0x12, 0x26, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x73, - 0x2f, 0x7b, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x7d, 0x12, 0x82, 0x01, 0x0a, 0x05, 0x56, 0x6f, 0x74, - 0x65, 0x73, 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, - 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, - 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, - 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x6e, 0x0a, - 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x97, 0x01, - 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x7a, 0x0a, 0x09, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x63, 0x6f, 0x73, + 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, + 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, - 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x08, 0x44, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x64, 0x7d, 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x7d, + 0x12, 0x82, 0x01, 0x0a, 0x05, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, - 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x94, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, - 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, - 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, + 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x6e, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x97, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, + 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x7d, 0x12, + 0x8e, 0x01, 0x0a, 0x08, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, + 0x2f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, + 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, + 0x12, 0x94, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, - 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x42, - 0x9b, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, - 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, - 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, - 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, + 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, + 0x7d, 0x2f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x42, 0x9b, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, + 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -8507,9 +8863,12 @@ var file_cosmos_gov_v1_query_proto_goTypes = []interface{}{ (*v1beta1.PageRequest)(nil), // 18: cosmos.base.query.v1beta1.PageRequest (*v1beta1.PageResponse)(nil), // 19: cosmos.base.query.v1beta1.PageResponse (*Vote)(nil), // 20: cosmos.gov.v1.Vote - (*Params)(nil), // 21: cosmos.gov.v1.Params - (*Deposit)(nil), // 22: cosmos.gov.v1.Deposit - (*TallyResult)(nil), // 23: cosmos.gov.v1.TallyResult + (*VotingParams)(nil), // 21: cosmos.gov.v1.VotingParams + (*DepositParams)(nil), // 22: cosmos.gov.v1.DepositParams + (*TallyParams)(nil), // 23: cosmos.gov.v1.TallyParams + (*Params)(nil), // 24: cosmos.gov.v1.Params + (*Deposit)(nil), // 25: cosmos.gov.v1.Deposit + (*TallyResult)(nil), // 26: cosmos.gov.v1.TallyResult } var file_cosmos_gov_v1_query_proto_depIdxs = []int32{ 16, // 0: cosmos.gov.v1.QueryProposalResponse.proposal:type_name -> cosmos.gov.v1.Proposal @@ -8521,33 +8880,36 @@ var file_cosmos_gov_v1_query_proto_depIdxs = []int32{ 18, // 6: cosmos.gov.v1.QueryVotesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest 20, // 7: cosmos.gov.v1.QueryVotesResponse.votes:type_name -> cosmos.gov.v1.Vote 19, // 8: cosmos.gov.v1.QueryVotesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 21, // 9: cosmos.gov.v1.QueryParamsResponse.params:type_name -> cosmos.gov.v1.Params - 22, // 10: cosmos.gov.v1.QueryDepositResponse.deposit:type_name -> cosmos.gov.v1.Deposit - 18, // 11: cosmos.gov.v1.QueryDepositsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 22, // 12: cosmos.gov.v1.QueryDepositsResponse.deposits:type_name -> cosmos.gov.v1.Deposit - 19, // 13: cosmos.gov.v1.QueryDepositsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 23, // 14: cosmos.gov.v1.QueryTallyResultResponse.tally:type_name -> cosmos.gov.v1.TallyResult - 0, // 15: cosmos.gov.v1.Query.Proposal:input_type -> cosmos.gov.v1.QueryProposalRequest - 2, // 16: cosmos.gov.v1.Query.Proposals:input_type -> cosmos.gov.v1.QueryProposalsRequest - 4, // 17: cosmos.gov.v1.Query.Vote:input_type -> cosmos.gov.v1.QueryVoteRequest - 6, // 18: cosmos.gov.v1.Query.Votes:input_type -> cosmos.gov.v1.QueryVotesRequest - 8, // 19: cosmos.gov.v1.Query.Params:input_type -> cosmos.gov.v1.QueryParamsRequest - 10, // 20: cosmos.gov.v1.Query.Deposit:input_type -> cosmos.gov.v1.QueryDepositRequest - 12, // 21: cosmos.gov.v1.Query.Deposits:input_type -> cosmos.gov.v1.QueryDepositsRequest - 14, // 22: cosmos.gov.v1.Query.TallyResult:input_type -> cosmos.gov.v1.QueryTallyResultRequest - 1, // 23: cosmos.gov.v1.Query.Proposal:output_type -> cosmos.gov.v1.QueryProposalResponse - 3, // 24: cosmos.gov.v1.Query.Proposals:output_type -> cosmos.gov.v1.QueryProposalsResponse - 5, // 25: cosmos.gov.v1.Query.Vote:output_type -> cosmos.gov.v1.QueryVoteResponse - 7, // 26: cosmos.gov.v1.Query.Votes:output_type -> cosmos.gov.v1.QueryVotesResponse - 9, // 27: cosmos.gov.v1.Query.Params:output_type -> cosmos.gov.v1.QueryParamsResponse - 11, // 28: cosmos.gov.v1.Query.Deposit:output_type -> cosmos.gov.v1.QueryDepositResponse - 13, // 29: cosmos.gov.v1.Query.Deposits:output_type -> cosmos.gov.v1.QueryDepositsResponse - 15, // 30: cosmos.gov.v1.Query.TallyResult:output_type -> cosmos.gov.v1.QueryTallyResultResponse - 23, // [23:31] is the sub-list for method output_type - 15, // [15:23] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name + 21, // 9: cosmos.gov.v1.QueryParamsResponse.voting_params:type_name -> cosmos.gov.v1.VotingParams + 22, // 10: cosmos.gov.v1.QueryParamsResponse.deposit_params:type_name -> cosmos.gov.v1.DepositParams + 23, // 11: cosmos.gov.v1.QueryParamsResponse.tally_params:type_name -> cosmos.gov.v1.TallyParams + 24, // 12: cosmos.gov.v1.QueryParamsResponse.params:type_name -> cosmos.gov.v1.Params + 25, // 13: cosmos.gov.v1.QueryDepositResponse.deposit:type_name -> cosmos.gov.v1.Deposit + 18, // 14: cosmos.gov.v1.QueryDepositsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 25, // 15: cosmos.gov.v1.QueryDepositsResponse.deposits:type_name -> cosmos.gov.v1.Deposit + 19, // 16: cosmos.gov.v1.QueryDepositsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 26, // 17: cosmos.gov.v1.QueryTallyResultResponse.tally:type_name -> cosmos.gov.v1.TallyResult + 0, // 18: cosmos.gov.v1.Query.Proposal:input_type -> cosmos.gov.v1.QueryProposalRequest + 2, // 19: cosmos.gov.v1.Query.Proposals:input_type -> cosmos.gov.v1.QueryProposalsRequest + 4, // 20: cosmos.gov.v1.Query.Vote:input_type -> cosmos.gov.v1.QueryVoteRequest + 6, // 21: cosmos.gov.v1.Query.Votes:input_type -> cosmos.gov.v1.QueryVotesRequest + 8, // 22: cosmos.gov.v1.Query.Params:input_type -> cosmos.gov.v1.QueryParamsRequest + 10, // 23: cosmos.gov.v1.Query.Deposit:input_type -> cosmos.gov.v1.QueryDepositRequest + 12, // 24: cosmos.gov.v1.Query.Deposits:input_type -> cosmos.gov.v1.QueryDepositsRequest + 14, // 25: cosmos.gov.v1.Query.TallyResult:input_type -> cosmos.gov.v1.QueryTallyResultRequest + 1, // 26: cosmos.gov.v1.Query.Proposal:output_type -> cosmos.gov.v1.QueryProposalResponse + 3, // 27: cosmos.gov.v1.Query.Proposals:output_type -> cosmos.gov.v1.QueryProposalsResponse + 5, // 28: cosmos.gov.v1.Query.Vote:output_type -> cosmos.gov.v1.QueryVoteResponse + 7, // 29: cosmos.gov.v1.Query.Votes:output_type -> cosmos.gov.v1.QueryVotesResponse + 9, // 30: cosmos.gov.v1.Query.Params:output_type -> cosmos.gov.v1.QueryParamsResponse + 11, // 31: cosmos.gov.v1.Query.Deposit:output_type -> cosmos.gov.v1.QueryDepositResponse + 13, // 32: cosmos.gov.v1.Query.Deposits:output_type -> cosmos.gov.v1.QueryDepositsResponse + 15, // 33: cosmos.gov.v1.Query.TallyResult:output_type -> cosmos.gov.v1.QueryTallyResultResponse + 26, // [26:34] is the sub-list for method output_type + 18, // [18:26] is the sub-list for method input_type + 18, // [18:18] is the sub-list for extension type_name + 18, // [18:18] is the sub-list for extension extendee + 0, // [0:18] is the sub-list for field type_name } func init() { file_cosmos_gov_v1_query_proto_init() } diff --git a/proto/cosmos/gov/v1/genesis.proto b/proto/cosmos/gov/v1/genesis.proto index 7b0fed2da5b1..ba247ab4a0ce 100644 --- a/proto/cosmos/gov/v1/genesis.proto +++ b/proto/cosmos/gov/v1/genesis.proto @@ -17,6 +17,15 @@ message GenesisState { repeated Vote votes = 3; // proposals defines all the proposals present at genesis. repeated Proposal proposals = 4; + // Deprecated: Prefer to use `params` instead. + // deposit_params defines all the paramaters of related to deposit. + DepositParams deposit_params = 5; + // Deprecated: Prefer to use `params` instead. + // voting_params defines all the paramaters of related to voting. + VotingParams voting_params = 6; + // Deprecated: Prefer to use `params` instead. + // tally_params defines all the paramaters of related to tally. + TallyParams tally_params = 7; // params defines all the paramaters of x/gov module. - Params params = 5; + Params params = 8; } diff --git a/proto/cosmos/gov/v1/query.proto b/proto/cosmos/gov/v1/query.proto index e6531c0487cf..3bdc21a7a58a 100644 --- a/proto/cosmos/gov/v1/query.proto +++ b/proto/cosmos/gov/v1/query.proto @@ -122,12 +122,25 @@ 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; +} // QueryParamsResponse is the response type for the Query/Params RPC method. message QueryParamsResponse { + // Deprecated: Prefer to use `params` instead. + // voting_params defines the parameters related to voting. + VotingParams voting_params = 1; + // Deprecated: Prefer to use `params` instead. + // deposit_params defines the parameters related to deposit. + DepositParams deposit_params = 2; + // Deprecated: Prefer to use `params` instead. + // tally_params defines the parameters related to tally. + TallyParams tally_params = 3; // params defines all the paramaters of x/gov module. - Params params = 5; + Params params = 4; } // QueryDepositRequest is the request type for the Query/Deposit RPC method. diff --git a/x/gov/types/v1/genesis.pb.go b/x/gov/types/v1/genesis.pb.go index a2bc06cd5ef2..635a323b4cc4 100644 --- a/x/gov/types/v1/genesis.pb.go +++ b/x/gov/types/v1/genesis.pb.go @@ -32,8 +32,17 @@ type GenesisState struct { Votes []*Vote `protobuf:"bytes,3,rep,name=votes,proto3" json:"votes,omitempty"` // proposals defines all the proposals present at genesis. Proposals []*Proposal `protobuf:"bytes,4,rep,name=proposals,proto3" json:"proposals,omitempty"` + // Deprecated: Prefer to use `params` instead. + // deposit_params defines all the paramaters of related to deposit. + DepositParams *DepositParams `protobuf:"bytes,5,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"` + // Deprecated: Prefer to use `params` instead. + // voting_params defines all the paramaters of related to voting. + VotingParams *VotingParams `protobuf:"bytes,6,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"` + // Deprecated: Prefer to use `params` instead. + // tally_params defines all the paramaters of related to tally. + TallyParams *TallyParams `protobuf:"bytes,7,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` // params defines all the paramaters of x/gov module. - Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` + Params *Params `protobuf:"bytes,8,opt,name=params,proto3" json:"params,omitempty"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -97,6 +106,27 @@ func (m *GenesisState) GetProposals() []*Proposal { return nil } +func (m *GenesisState) GetDepositParams() *DepositParams { + if m != nil { + return m.DepositParams + } + return nil +} + +func (m *GenesisState) GetVotingParams() *VotingParams { + if m != nil { + return m.VotingParams + } + return nil +} + +func (m *GenesisState) GetTallyParams() *TallyParams { + if m != nil { + return m.TallyParams + } + return nil +} + func (m *GenesisState) GetParams() *Params { if m != nil { return m.Params @@ -111,25 +141,30 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1/genesis.proto", fileDescriptor_ef7cfd15e3ded621) } var fileDescriptor_ef7cfd15e3ded621 = []byte{ - // 284 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0xcd, 0x4a, 0xc4, 0x30, - 0x14, 0x46, 0x27, 0xf3, 0x87, 0x66, 0x74, 0x13, 0x7f, 0xa6, 0x28, 0x84, 0xc1, 0xd5, 0x88, 0x4c, - 0x62, 0x2b, 0xbe, 0x80, 0x28, 0xe2, 0x4e, 0x2a, 0xb8, 0x70, 0x33, 0x74, 0xa6, 0xa1, 0x16, 0xed, - 0xdc, 0xd0, 0x1b, 0x83, 0x3e, 0x80, 0x7b, 0x1f, 0xcb, 0xe5, 0x2c, 0x5d, 0x4a, 0xfb, 0x22, 0x42, - 0xd3, 0x2a, 0x76, 0x95, 0xc5, 0x39, 0x87, 0x5c, 0x3e, 0x7a, 0xb8, 0x04, 0xcc, 0x00, 0x65, 0x02, - 0x56, 0x5a, 0x5f, 0x26, 0x6a, 0xa5, 0x30, 0x45, 0xa1, 0x73, 0x30, 0xc0, 0xb6, 0x1d, 0x14, 0x09, - 0x58, 0x61, 0xfd, 0x83, 0x71, 0xcb, 0x05, 0xeb, 0xbc, 0xa3, 0xf7, 0x2e, 0xdd, 0xba, 0x76, 0xe5, - 0x9d, 0x89, 0x8c, 0x62, 0xa7, 0x74, 0x17, 0x4d, 0x94, 0x9b, 0x74, 0x95, 0xcc, 0x75, 0x0e, 0x1a, - 0x30, 0x7a, 0x9e, 0xa7, 0xb1, 0x47, 0x26, 0x64, 0xda, 0x0f, 0x59, 0xc3, 0x6e, 0x6b, 0x74, 0x13, - 0xb3, 0x80, 0x6e, 0xc4, 0x4a, 0x03, 0xa6, 0x06, 0xbd, 0xee, 0xa4, 0x37, 0x1d, 0x05, 0xfb, 0xe2, - 0xdf, 0xef, 0xe2, 0xd2, 0xe1, 0xf0, 0xd7, 0x63, 0xc7, 0x74, 0x60, 0xc1, 0x28, 0xf4, 0x7a, 0x55, - 0xb0, 0xd3, 0x0a, 0xee, 0xc1, 0xa8, 0xd0, 0x19, 0xec, 0x9c, 0x6e, 0x36, 0x77, 0xa0, 0xd7, 0xaf, - 0xf4, 0x71, 0x4b, 0x6f, 0x8e, 0x09, 0xff, 0x4c, 0x36, 0xa3, 0x43, 0x1d, 0xe5, 0x51, 0x86, 0xde, - 0x60, 0x42, 0xa6, 0xa3, 0x60, 0xaf, 0xdd, 0x54, 0x30, 0xac, 0xa5, 0x8b, 0xab, 0xcf, 0x82, 0x93, - 0x75, 0xc1, 0xc9, 0x77, 0xc1, 0xc9, 0x47, 0xc9, 0x3b, 0xeb, 0x92, 0x77, 0xbe, 0x4a, 0xde, 0x79, - 0x38, 0x49, 0x52, 0xf3, 0xf8, 0xb2, 0x10, 0x4b, 0xc8, 0x64, 0xbd, 0xa2, 0x7b, 0x66, 0x18, 0x3f, - 0xc9, 0xd7, 0x6a, 0x52, 0xf3, 0xa6, 0x15, 0x4a, 0xeb, 0x2f, 0x86, 0xd5, 0xaa, 0x67, 0x3f, 0x01, - 0x00, 0x00, 0xff, 0xff, 0x06, 0x05, 0xbf, 0x43, 0x9c, 0x01, 0x00, 0x00, + // 356 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xcd, 0x4e, 0xfa, 0x40, + 0x14, 0xc5, 0xe9, 0x9f, 0x8f, 0x3f, 0x0e, 0xe0, 0x62, 0xfc, 0xa0, 0x01, 0xd3, 0x10, 0x57, 0x18, + 0x43, 0x2b, 0x18, 0x97, 0x26, 0xc6, 0x8f, 0x18, 0x77, 0xa4, 0x1a, 0x17, 0x6e, 0x48, 0xa1, 0x93, + 0xda, 0x08, 0xdc, 0xa6, 0x77, 0x9c, 0xc8, 0x5b, 0xf8, 0x58, 0x26, 0x6e, 0x58, 0xba, 0x34, 0xf4, + 0x45, 0x0c, 0x33, 0x53, 0xc1, 0xea, 0xaa, 0xb9, 0x39, 0xbf, 0x73, 0xe6, 0xf4, 0xe6, 0x92, 0xe6, + 0x08, 0x70, 0x02, 0xe8, 0x04, 0x20, 0x1c, 0xd1, 0x75, 0x02, 0x36, 0x65, 0x18, 0xa2, 0x1d, 0xc5, + 0xc0, 0x81, 0xd6, 0x94, 0x68, 0x07, 0x20, 0x6c, 0xd1, 0x6d, 0xd4, 0x33, 0x2c, 0x08, 0xc5, 0xed, + 0xbf, 0xe7, 0x49, 0xf5, 0x5a, 0x39, 0x6f, 0xb9, 0xc7, 0x19, 0x3d, 0x22, 0xdb, 0xc8, 0xbd, 0x98, + 0x87, 0xd3, 0x60, 0x10, 0xc5, 0x10, 0x01, 0x7a, 0xe3, 0x41, 0xe8, 0x9b, 0x46, 0xcb, 0x68, 0x17, + 0x5c, 0x9a, 0x6a, 0x7d, 0x2d, 0xdd, 0xf8, 0xb4, 0x47, 0xca, 0x3e, 0x8b, 0x00, 0x43, 0x8e, 0xe6, + 0xbf, 0x56, 0xbe, 0x5d, 0xe9, 0xed, 0xda, 0x3f, 0x5e, 0xb7, 0x2f, 0x95, 0xec, 0x7e, 0x73, 0xf4, + 0x80, 0x14, 0x05, 0x70, 0x86, 0x66, 0x5e, 0x1a, 0xb6, 0x32, 0x86, 0x7b, 0xe0, 0xcc, 0x55, 0x04, + 0x3d, 0x21, 0x1b, 0x69, 0x0f, 0x34, 0x0b, 0x12, 0xaf, 0x67, 0xf0, 0xb4, 0x8c, 0xbb, 0x22, 0xe9, + 0x05, 0xd9, 0xd4, 0xaf, 0x0d, 0x22, 0x2f, 0xf6, 0x26, 0x68, 0x16, 0x5b, 0x46, 0xbb, 0xd2, 0xdb, + 0xfb, 0xbb, 0x5b, 0x5f, 0x32, 0x6e, 0xcd, 0x5f, 0x1f, 0xe9, 0x19, 0xa9, 0x09, 0x50, 0xab, 0x50, + 0x19, 0x25, 0x99, 0xd1, 0xfc, 0x5d, 0x77, 0xb9, 0x12, 0x15, 0x51, 0x15, 0x6b, 0x13, 0x3d, 0x25, + 0x55, 0xee, 0x8d, 0xc7, 0xb3, 0x34, 0xe0, 0xbf, 0x0c, 0x68, 0x64, 0x02, 0xee, 0x96, 0x88, 0xf6, + 0x57, 0xf8, 0x6a, 0xa0, 0x1d, 0x52, 0xd2, 0xc6, 0xb2, 0x34, 0xee, 0x64, 0xff, 0x5c, 0x79, 0x34, + 0x74, 0x7e, 0xf5, 0xb6, 0xb0, 0x8c, 0xf9, 0xc2, 0x32, 0x3e, 0x17, 0x96, 0xf1, 0x9a, 0x58, 0xb9, + 0x79, 0x62, 0xe5, 0x3e, 0x12, 0x2b, 0xf7, 0x70, 0x18, 0x84, 0xfc, 0xf1, 0x79, 0x68, 0x8f, 0x60, + 0xe2, 0xe8, 0x5b, 0x50, 0x9f, 0x0e, 0xfa, 0x4f, 0xce, 0x8b, 0x3c, 0x0c, 0x3e, 0x8b, 0x18, 0x3a, + 0xa2, 0x3b, 0x2c, 0xc9, 0xdb, 0x38, 0xfe, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x88, 0x17, 0x73, 0x08, + 0x62, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -162,6 +197,42 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x42 + } + if m.TallyParams != nil { + { + size, err := m.TallyParams.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if m.VotingParams != nil { + { + size, err := m.VotingParams.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.DepositParams != nil { + { + size, err := m.DepositParams.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x2a } if len(m.Proposals) > 0 { @@ -252,6 +323,18 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + if m.DepositParams != nil { + l = m.DepositParams.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + if m.VotingParams != nil { + l = m.VotingParams.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + if m.TallyParams != nil { + l = m.TallyParams.Size() + n += 1 + l + sovGenesis(uint64(l)) + } if m.Params != nil { l = m.Params.Size() n += 1 + l + sovGenesis(uint64(l)) @@ -416,6 +499,114 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DepositParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DepositParams == nil { + m.DepositParams = &DepositParams{} + } + if err := m.DepositParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VotingParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VotingParams == nil { + m.VotingParams = &VotingParams{} + } + if err := m.VotingParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TallyParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TallyParams == nil { + m.TallyParams = &TallyParams{} + } + if err := m.TallyParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } diff --git a/x/gov/types/v1/query.pb.go b/x/gov/types/v1/query.pb.go index a8957ddfaea6..7573a6e7c7b4 100644 --- a/x/gov/types/v1/query.pb.go +++ b/x/gov/types/v1/query.pb.go @@ -462,6 +462,9 @@ func (m *QueryVotesResponse) GetPagination() *query.PageResponse { // QueryParamsRequest is the request type for the Query/Params RPC method. type QueryParamsRequest struct { + // params_type defines which parameters to query for, can be one of "voting", + // "tallying" or "deposit". + ParamsType string `protobuf:"bytes,1,opt,name=params_type,json=paramsType,proto3" json:"params_type,omitempty"` } func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } @@ -497,10 +500,26 @@ func (m *QueryParamsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo +func (m *QueryParamsRequest) GetParamsType() string { + if m != nil { + return m.ParamsType + } + return "" +} + // QueryParamsResponse is the response type for the Query/Params RPC method. type QueryParamsResponse struct { + // Deprecated: Prefer to use `params` instead. + // voting_params defines the parameters related to voting. + VotingParams *VotingParams `protobuf:"bytes,1,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"` + // Deprecated: Prefer to use `params` instead. + // deposit_params defines the parameters related to deposit. + DepositParams *DepositParams `protobuf:"bytes,2,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"` + // Deprecated: Prefer to use `params` instead. + // tally_params defines the parameters related to tally. + TallyParams *TallyParams `protobuf:"bytes,3,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` // params defines all the paramaters of x/gov module. - Params *Params `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` + Params *Params `protobuf:"bytes,4,opt,name=params,proto3" json:"params,omitempty"` } func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } @@ -536,6 +555,27 @@ func (m *QueryParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo +func (m *QueryParamsResponse) GetVotingParams() *VotingParams { + if m != nil { + return m.VotingParams + } + return nil +} + +func (m *QueryParamsResponse) GetDepositParams() *DepositParams { + if m != nil { + return m.DepositParams + } + return nil +} + +func (m *QueryParamsResponse) GetTallyParams() *TallyParams { + if m != nil { + return m.TallyParams + } + return nil +} + func (m *QueryParamsResponse) GetParams() *Params { if m != nil { return m.Params @@ -867,62 +907,67 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1/query.proto", fileDescriptor_46a436d1109b50d0) } var fileDescriptor_46a436d1109b50d0 = []byte{ - // 876 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4d, 0x4f, 0x13, 0x5b, - 0x18, 0x66, 0x4a, 0x0b, 0xed, 0x4b, 0x2e, 0xf7, 0xde, 0xc3, 0x47, 0xe7, 0x4e, 0x2e, 0xa5, 0x77, - 0xb8, 0x02, 0x7e, 0x30, 0x63, 0x0b, 0x42, 0xa2, 0xb8, 0x10, 0x11, 0x35, 0x71, 0x81, 0xc5, 0xb8, - 0x70, 0x43, 0x06, 0x3a, 0x19, 0x1b, 0xcb, 0x9c, 0x61, 0xce, 0xb4, 0x11, 0x91, 0x98, 0x90, 0x18, - 0x5d, 0xa9, 0x89, 0x24, 0xfa, 0x43, 0xfc, 0x11, 0x2e, 0x5c, 0x10, 0xdd, 0xb8, 0x34, 0xe0, 0x0f, - 0x31, 0x73, 0xce, 0x99, 0xe9, 0xcc, 0xd0, 0x4e, 0x5b, 0x42, 0x5c, 0x35, 0x33, 0xe7, 0x79, 0xdf, - 0xe7, 0x79, 0x3f, 0xce, 0x33, 0x85, 0x7f, 0x36, 0x31, 0xd9, 0xc2, 0x44, 0x35, 0x70, 0x5d, 0xad, - 0x17, 0xd4, 0xed, 0x9a, 0x6e, 0xef, 0x28, 0x96, 0x8d, 0x1d, 0x8c, 0xfe, 0x60, 0x47, 0x8a, 0x81, - 0xeb, 0x4a, 0xbd, 0x20, 0x5d, 0xe0, 0xc8, 0x0d, 0x8d, 0xe8, 0x0c, 0xa7, 0xd6, 0x0b, 0x1b, 0xba, - 0xa3, 0x15, 0x54, 0x4b, 0x33, 0x2a, 0xa6, 0xe6, 0x54, 0xb0, 0xc9, 0x42, 0xa5, 0x7f, 0x0d, 0x8c, - 0x8d, 0xaa, 0xae, 0x6a, 0x56, 0x45, 0xd5, 0x4c, 0x13, 0x3b, 0xf4, 0x90, 0xf0, 0xd3, 0x6c, 0x98, - 0xd3, 0xcd, 0xcf, 0x0e, 0xb8, 0x98, 0x75, 0xfa, 0xa4, 0x72, 0x7a, 0xfa, 0x20, 0x2f, 0xc0, 0xf0, - 0x7d, 0x97, 0x73, 0xd5, 0xc6, 0x16, 0x26, 0x5a, 0xb5, 0xa4, 0x6f, 0xd7, 0x74, 0xe2, 0xa0, 0x71, - 0x18, 0xb0, 0xf8, 0xab, 0xf5, 0x4a, 0x59, 0x14, 0xf2, 0xc2, 0x74, 0xb2, 0x04, 0xde, 0xab, 0xbb, - 0x65, 0xf9, 0x1e, 0x8c, 0x44, 0x02, 0x89, 0x85, 0x4d, 0xa2, 0xa3, 0x59, 0x48, 0x7b, 0x30, 0x1a, - 0x36, 0x50, 0xcc, 0x2a, 0xa1, 0x8a, 0x15, 0x3f, 0xc4, 0x07, 0xca, 0x6f, 0x13, 0x91, 0x74, 0xc4, - 0x13, 0xb2, 0x02, 0x7f, 0xfa, 0x42, 0x88, 0xa3, 0x39, 0x35, 0x42, 0xb3, 0x0e, 0x16, 0xc7, 0x5a, - 0x64, 0x5d, 0xa3, 0xa0, 0xd2, 0xa0, 0x15, 0x7a, 0x46, 0x0a, 0xa4, 0xea, 0xd8, 0xd1, 0x6d, 0x31, - 0x91, 0x17, 0xa6, 0x33, 0x4b, 0xe2, 0xd7, 0x4f, 0x33, 0xc3, 0x3c, 0xc1, 0x8d, 0x72, 0xd9, 0xd6, - 0x09, 0x59, 0x73, 0xec, 0x8a, 0x69, 0x94, 0x18, 0x0c, 0xcd, 0x43, 0xa6, 0xac, 0x5b, 0x98, 0x54, - 0x1c, 0x6c, 0x8b, 0xbd, 0x6d, 0x62, 0x1a, 0x50, 0xb4, 0x02, 0xd0, 0x18, 0x9b, 0x98, 0xa4, 0x0d, - 0x98, 0xf4, 0xa4, 0xba, 0x33, 0x56, 0xd8, 0x2e, 0xf0, 0x19, 0x2b, 0xab, 0x9a, 0xa1, 0xf3, 0x5a, - 0x4b, 0x81, 0x48, 0xf9, 0xa3, 0x00, 0xa3, 0xd1, 0x8e, 0xf0, 0x0e, 0x5f, 0x81, 0x8c, 0x57, 0x9c, - 0xdb, 0x8c, 0xde, 0xb8, 0x16, 0x37, 0x90, 0xe8, 0x76, 0x48, 0x59, 0x82, 0x2a, 0x9b, 0x6a, 0xab, - 0x8c, 0x71, 0x86, 0xa4, 0x6d, 0xc2, 0x5f, 0x54, 0xd9, 0x43, 0xec, 0xe8, 0x9d, 0xee, 0x4b, 0xb7, - 0xfd, 0x97, 0x17, 0xe1, 0xef, 0x00, 0x09, 0xaf, 0x7c, 0x0a, 0x92, 0xee, 0x29, 0xdf, 0xab, 0xa1, - 0x48, 0xd1, 0x14, 0x4a, 0x01, 0xf2, 0xf3, 0x40, 0x34, 0xe9, 0x58, 0xe3, 0x4a, 0x93, 0x0e, 0x9d, - 0x66, 0x76, 0xaf, 0x05, 0x40, 0x41, 0x7a, 0xae, 0xfe, 0x3c, 0x6b, 0x81, 0x37, 0xb3, 0xa6, 0xf2, - 0x19, 0xe2, 0xec, 0x66, 0x35, 0xcc, 0x95, 0xac, 0x6a, 0xb6, 0xb6, 0xe5, 0x75, 0x42, 0x5e, 0x86, - 0xa1, 0xd0, 0x5b, 0x2e, 0x70, 0x06, 0xfa, 0x2c, 0xfa, 0x46, 0x4c, 0x51, 0xc6, 0x91, 0xe8, 0x56, - 0x31, 0x38, 0x07, 0xc9, 0x26, 0xcf, 0xb2, 0xcc, 0x96, 0xbf, 0xe3, 0x36, 0x87, 0xae, 0x56, 0xa2, - 0xe3, 0xab, 0x25, 0xdf, 0xe1, 0x5e, 0xe5, 0xf3, 0x71, 0xd9, 0x97, 0xa1, 0x9f, 0x83, 0xf8, 0x62, - 0x8c, 0x46, 0x74, 0x7b, 0x01, 0x1e, 0x4c, 0x7e, 0x11, 0xce, 0xf4, 0xfb, 0x37, 0xe4, 0x40, 0xe0, - 0x7e, 0xd7, 0x50, 0xc0, 0x8b, 0x29, 0x42, 0x9a, 0xab, 0xf4, 0xf6, 0xa4, 0x55, 0x35, 0x3e, 0xee, - 0xec, 0xb6, 0xe5, 0x2a, 0x64, 0xa9, 0xaa, 0x07, 0x5a, 0xb5, 0xba, 0x53, 0xd2, 0x49, 0xad, 0xea, - 0x74, 0xf1, 0x41, 0x10, 0x4f, 0xc6, 0xfa, 0x13, 0x4a, 0x39, 0xee, 0x6b, 0x3e, 0x1f, 0x29, 0x52, - 0x51, 0x30, 0x84, 0x01, 0x8b, 0x5f, 0xd2, 0x90, 0xa2, 0xe9, 0xd0, 0x4b, 0x01, 0xd2, 0x9e, 0x9d, - 0xa1, 0x89, 0x48, 0x64, 0xb3, 0x6f, 0x97, 0xf4, 0x7f, 0x3c, 0x88, 0x69, 0x92, 0x95, 0xfd, 0x6f, - 0x3f, 0xdf, 0x27, 0xa6, 0xd1, 0xa4, 0x1a, 0xfe, 0x6c, 0xfa, 0x86, 0xa9, 0xee, 0x06, 0x0a, 0xde, - 0x43, 0xcf, 0x20, 0xe3, 0x5b, 0x31, 0x8a, 0xa5, 0xf0, 0xd6, 0x49, 0x3a, 0xd7, 0x06, 0xc5, 0x95, - 0xe4, 0xa9, 0x12, 0x09, 0x89, 0xad, 0x94, 0xa0, 0x57, 0x02, 0x24, 0x5d, 0x7b, 0x40, 0xe3, 0xcd, - 0x32, 0x06, 0x7c, 0x58, 0xca, 0xb7, 0x06, 0x70, 0xb6, 0x45, 0xca, 0x36, 0x8f, 0xe6, 0x3a, 0xab, - 0x5b, 0xa5, 0x86, 0xa4, 0xee, 0x52, 0x57, 0xde, 0x43, 0xfb, 0x02, 0xa4, 0xa8, 0xab, 0xa1, 0x96, - 0x4c, 0x7e, 0xf9, 0xff, 0xc5, 0x20, 0xb8, 0x98, 0x39, 0x2a, 0x46, 0x41, 0x97, 0xba, 0x11, 0x83, - 0x4c, 0xe8, 0x63, 0x56, 0x84, 0x9a, 0x52, 0x84, 0xbc, 0x4e, 0x92, 0xe3, 0x20, 0x5c, 0xc6, 0x18, - 0x95, 0x91, 0x45, 0x23, 0x51, 0x19, 0x8c, 0xe5, 0x83, 0x00, 0xfd, 0xfc, 0xd6, 0xa1, 0xa6, 0xe9, - 0xc2, 0x0e, 0x28, 0x4d, 0xc4, 0x62, 0x38, 0xe7, 0x4d, 0xca, 0x79, 0x1d, 0x5d, 0xeb, 0xb0, 0x74, - 0xef, 0xb6, 0xab, 0xbb, 0xbe, 0x23, 0xee, 0xa1, 0x37, 0x02, 0xa4, 0x3d, 0x0b, 0x41, 0x71, 0xb4, - 0x24, 0xf6, 0x72, 0x44, 0x5d, 0x48, 0x5e, 0xa0, 0xe2, 0x0a, 0x48, 0xed, 0x52, 0x1c, 0x3a, 0x10, - 0x60, 0x20, 0x70, 0x9d, 0xd1, 0x64, 0x33, 0xba, 0x93, 0xf6, 0x22, 0x4d, 0xb5, 0xc5, 0x9d, 0x72, - 0x63, 0xa8, 0x9d, 0x2c, 0xdd, 0xfa, 0x7c, 0x94, 0x13, 0x0e, 0x8f, 0x72, 0xc2, 0x8f, 0xa3, 0x9c, - 0xf0, 0xee, 0x38, 0xd7, 0x73, 0x78, 0x9c, 0xeb, 0xf9, 0x7e, 0x9c, 0xeb, 0x79, 0x74, 0xd1, 0xa8, - 0x38, 0x8f, 0x6b, 0x1b, 0xca, 0x26, 0xde, 0xf2, 0x32, 0xb2, 0x9f, 0x19, 0x52, 0x7e, 0xa2, 0x3e, - 0xa5, 0xe9, 0x9d, 0x1d, 0x4b, 0x27, 0xee, 0xbf, 0xf2, 0x3e, 0xfa, 0xa7, 0x79, 0xf6, 0x57, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x4f, 0xff, 0xaf, 0xfa, 0xde, 0x0b, 0x00, 0x00, + // 954 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4b, 0x6f, 0xdc, 0x54, + 0x14, 0x8e, 0x27, 0x8f, 0xce, 0x9c, 0x34, 0x01, 0x4e, 0x9b, 0x66, 0x30, 0xed, 0x34, 0xb8, 0x90, + 0x84, 0x47, 0x6c, 0x26, 0x7d, 0x49, 0xd0, 0x4a, 0xd0, 0x42, 0x00, 0x89, 0x45, 0x98, 0x56, 0x2c, + 0xd8, 0x44, 0x4e, 0xc6, 0x32, 0x16, 0x13, 0x5f, 0xd7, 0xf7, 0x8e, 0x45, 0x08, 0x11, 0x52, 0x25, + 0x04, 0x62, 0x01, 0x48, 0x54, 0x82, 0x1f, 0xc2, 0x8f, 0x60, 0xc1, 0xa2, 0x82, 0x0d, 0x4b, 0x94, + 0xf0, 0x43, 0x90, 0xef, 0x3d, 0xf6, 0xd8, 0x8e, 0xc7, 0x33, 0x53, 0x55, 0xac, 0xa2, 0xeb, 0xfb, + 0x9d, 0xef, 0x7c, 0xe7, 0x79, 0x33, 0xf0, 0xfc, 0x1e, 0xe3, 0xfb, 0x8c, 0x5b, 0x2e, 0x8b, 0xac, + 0xa8, 0x6d, 0x3d, 0xe8, 0x3b, 0xe1, 0x81, 0x19, 0x84, 0x4c, 0x30, 0x5c, 0x50, 0x57, 0xa6, 0xcb, + 0x22, 0x33, 0x6a, 0xeb, 0xaf, 0x12, 0x72, 0xd7, 0xe6, 0x8e, 0xc2, 0x59, 0x51, 0x7b, 0xd7, 0x11, + 0x76, 0xdb, 0x0a, 0x6c, 0xd7, 0xf3, 0x6d, 0xe1, 0x31, 0x5f, 0x99, 0xea, 0x17, 0x5d, 0xc6, 0xdc, + 0x9e, 0x63, 0xd9, 0x81, 0x67, 0xd9, 0xbe, 0xcf, 0x84, 0xbc, 0xe4, 0x74, 0xbb, 0x9c, 0xf7, 0x19, + 0xf3, 0xab, 0x0b, 0x12, 0xb3, 0x23, 0x4f, 0x16, 0xb9, 0x97, 0x07, 0xe3, 0x26, 0x9c, 0xff, 0x38, + 0xf6, 0xb9, 0x1d, 0xb2, 0x80, 0x71, 0xbb, 0xd7, 0x71, 0x1e, 0xf4, 0x1d, 0x2e, 0xf0, 0x32, 0xcc, + 0x07, 0xf4, 0x69, 0xc7, 0xeb, 0x36, 0xb5, 0x15, 0x6d, 0x7d, 0xa6, 0x03, 0xc9, 0xa7, 0x0f, 0xbb, + 0xc6, 0x47, 0xb0, 0x54, 0x30, 0xe4, 0x01, 0xf3, 0xb9, 0x83, 0x57, 0xa1, 0x9e, 0xc0, 0xa4, 0xd9, + 0xfc, 0xe6, 0xb2, 0x99, 0x8b, 0xd8, 0x4c, 0x4d, 0x52, 0xa0, 0xf1, 0x63, 0xad, 0x40, 0xc7, 0x13, + 0x21, 0x5b, 0xf0, 0x4c, 0x2a, 0x84, 0x0b, 0x5b, 0xf4, 0xb9, 0x64, 0x5d, 0xdc, 0xbc, 0x34, 0x84, + 0xf5, 0x9e, 0x04, 0x75, 0x16, 0x83, 0xdc, 0x19, 0x4d, 0x98, 0x8d, 0x98, 0x70, 0xc2, 0x66, 0x6d, + 0x45, 0x5b, 0x6f, 0xdc, 0x69, 0xfe, 0xf9, 0xdb, 0xc6, 0x79, 0x22, 0x78, 0xa7, 0xdb, 0x0d, 0x1d, + 0xce, 0xef, 0x89, 0xd0, 0xf3, 0xdd, 0x8e, 0x82, 0xe1, 0x0d, 0x68, 0x74, 0x9d, 0x80, 0x71, 0x4f, + 0xb0, 0xb0, 0x39, 0x3d, 0xc2, 0x66, 0x00, 0xc5, 0x2d, 0x80, 0x41, 0xd9, 0x9a, 0x33, 0x32, 0x01, + 0xab, 0x89, 0xd4, 0xb8, 0xc6, 0xa6, 0xea, 0x05, 0xaa, 0xb1, 0xb9, 0x6d, 0xbb, 0x0e, 0xc5, 0xda, + 0xc9, 0x58, 0x1a, 0xbf, 0x6a, 0x70, 0xa1, 0x98, 0x11, 0xca, 0xf0, 0x75, 0x68, 0x24, 0xc1, 0xc5, + 0xc9, 0x98, 0xae, 0x4a, 0xf1, 0x00, 0x89, 0xef, 0xe7, 0x94, 0xd5, 0xa4, 0xb2, 0xb5, 0x91, 0xca, + 0x94, 0xcf, 0x9c, 0xb4, 0x3d, 0x78, 0x56, 0x2a, 0xfb, 0x84, 0x09, 0x67, 0xdc, 0x7e, 0x99, 0x34, + 0xff, 0xc6, 0x2d, 0x78, 0x2e, 0xe3, 0x84, 0x22, 0x5f, 0x83, 0x99, 0xf8, 0x96, 0xfa, 0xea, 0x5c, + 0x21, 0x68, 0x09, 0x95, 0x00, 0xe3, 0xab, 0x8c, 0x35, 0x1f, 0x5b, 0xe3, 0x56, 0x49, 0x86, 0x9e, + 0xa4, 0x76, 0xdf, 0x69, 0x80, 0x59, 0xf7, 0xa4, 0xfe, 0x15, 0x95, 0x82, 0xa4, 0x66, 0xa5, 0xf2, + 0x15, 0xe2, 0xe9, 0xd5, 0xea, 0x3a, 0x29, 0xd9, 0xb6, 0x43, 0x7b, 0x3f, 0x97, 0x09, 0xf9, 0x61, + 0x47, 0x1c, 0x04, 0x2a, 0x9d, 0x8d, 0xd8, 0x2c, 0xfe, 0x74, 0xff, 0x20, 0x70, 0x8c, 0xef, 0x6b, + 0x70, 0x2e, 0x67, 0x47, 0x21, 0xbc, 0x0d, 0x0b, 0x11, 0x13, 0x9e, 0xef, 0xee, 0x28, 0x30, 0x55, + 0xe2, 0x85, 0xd3, 0xa1, 0x78, 0xbe, 0x4b, 0xb6, 0x67, 0xa3, 0xcc, 0x09, 0xef, 0xc2, 0x22, 0x0d, + 0x4b, 0x42, 0xa1, 0xa2, 0xbb, 0x58, 0xa0, 0x78, 0x57, 0x81, 0x88, 0x63, 0xa1, 0x9b, 0x3d, 0xe2, + 0x6d, 0x38, 0x2b, 0xec, 0x5e, 0xef, 0x20, 0xa1, 0x98, 0x96, 0x14, 0x7a, 0x81, 0xe2, 0x7e, 0x0c, + 0x21, 0x82, 0x79, 0x31, 0x38, 0xe0, 0x06, 0xcc, 0x91, 0xa1, 0x9a, 0xcf, 0xa5, 0xe2, 0xf4, 0x28, + 0x1b, 0x02, 0x19, 0x3e, 0xe5, 0x82, 0x24, 0x8d, 0xdd, 0x4e, 0xb9, 0x15, 0x52, 0x1b, 0x7b, 0x85, + 0x18, 0x1f, 0xd0, 0x4e, 0x4e, 0xfd, 0x51, 0xf2, 0xdf, 0x80, 0x33, 0x04, 0xa2, 0xb4, 0x5f, 0x28, + 0xcf, 0x59, 0x27, 0x81, 0x19, 0x5f, 0xe7, 0x99, 0xfe, 0xff, 0x49, 0x78, 0xa4, 0xd1, 0x5e, 0x1f, + 0x28, 0xa0, 0x60, 0x36, 0xa1, 0x4e, 0x2a, 0x93, 0x79, 0x18, 0x16, 0x4d, 0x8a, 0x7b, 0x7a, 0x53, + 0xf1, 0x26, 0x2c, 0x4b, 0x55, 0xb2, 0x43, 0x3a, 0x0e, 0xef, 0xf7, 0xc4, 0x04, 0x0f, 0x5f, 0xf3, + 0xb4, 0x6d, 0x5a, 0xa1, 0x59, 0xd9, 0x67, 0x54, 0x9f, 0xd2, 0x86, 0x24, 0x13, 0x05, 0xdc, 0xfc, + 0xa3, 0x0e, 0xb3, 0x92, 0x0e, 0xbf, 0xd1, 0xa0, 0x9e, 0xac, 0x6d, 0xbc, 0x52, 0xb0, 0x2c, 0x7b, + 0xa3, 0xf5, 0x97, 0xaa, 0x41, 0x4a, 0x93, 0x61, 0x3e, 0xfc, 0xeb, 0xdf, 0x9f, 0x6b, 0xeb, 0xb8, + 0x6a, 0xe5, 0xff, 0x3d, 0x48, 0x1f, 0x06, 0xeb, 0x30, 0x13, 0xf0, 0x11, 0x7e, 0x09, 0x8d, 0xf4, + 0xc9, 0xc1, 0x4a, 0x17, 0x49, 0x3b, 0xe9, 0x2f, 0x8f, 0x40, 0x91, 0x92, 0x15, 0xa9, 0x44, 0xc7, + 0xe6, 0x30, 0x25, 0xf8, 0xad, 0x06, 0x33, 0xf1, 0x1a, 0xc4, 0xcb, 0x65, 0x8c, 0x99, 0xf7, 0x46, + 0x5f, 0x19, 0x0e, 0x20, 0x6f, 0xb7, 0xa4, 0xb7, 0x1b, 0x78, 0x6d, 0xbc, 0xb8, 0x2d, 0xb9, 0x78, + 0xad, 0x43, 0xf9, 0xfa, 0x1c, 0xe1, 0x43, 0x0d, 0x66, 0xe5, 0xf6, 0xc6, 0xa1, 0x9e, 0xd2, 0xf0, + 0x5f, 0xac, 0x40, 0x90, 0x98, 0x6b, 0x52, 0x8c, 0x89, 0xaf, 0x4f, 0x22, 0x06, 0x7d, 0x98, 0xa3, + 0x8d, 0x55, 0xea, 0x22, 0xb7, 0xd3, 0x75, 0xa3, 0x0a, 0x42, 0x32, 0x2e, 0x49, 0x19, 0xcb, 0xb8, + 0x54, 0x94, 0xa1, 0xbc, 0xfc, 0xa2, 0xc1, 0x19, 0x9a, 0x3a, 0x2c, 0xa5, 0xcb, 0x6f, 0x40, 0xfd, + 0x4a, 0x25, 0x86, 0x7c, 0xde, 0x95, 0x3e, 0x6f, 0xe3, 0x5b, 0x63, 0x86, 0x9e, 0x4c, 0xbb, 0x75, + 0x98, 0x6e, 0xc4, 0x23, 0xfc, 0x41, 0x83, 0x7a, 0xb2, 0x42, 0xb0, 0xca, 0x2d, 0xaf, 0x1c, 0x8e, + 0xe2, 0x16, 0x32, 0x6e, 0x4a, 0x71, 0x6d, 0xb4, 0x26, 0x14, 0x87, 0x8f, 0x34, 0x98, 0xcf, 0x8c, + 0x33, 0xae, 0x96, 0xb9, 0x3b, 0xbd, 0x5e, 0xf4, 0xb5, 0x91, 0xb8, 0x27, 0xec, 0x18, 0xb9, 0x4e, + 0xee, 0xbc, 0xf7, 0xfb, 0x71, 0x4b, 0x7b, 0x7c, 0xdc, 0xd2, 0xfe, 0x39, 0x6e, 0x69, 0x3f, 0x9d, + 0xb4, 0xa6, 0x1e, 0x9f, 0xb4, 0xa6, 0xfe, 0x3e, 0x69, 0x4d, 0x7d, 0xfa, 0x9a, 0xeb, 0x89, 0xcf, + 0xfa, 0xbb, 0xe6, 0x1e, 0xdb, 0x4f, 0x18, 0xd5, 0x9f, 0x0d, 0xde, 0xfd, 0xdc, 0xfa, 0x42, 0xd2, + 0xc7, 0xff, 0x0c, 0xf0, 0xf8, 0xd7, 0xc7, 0x9c, 0xfc, 0x71, 0x70, 0xf5, 0xbf, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xf3, 0xb1, 0xfc, 0xbb, 0xc6, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1618,6 +1663,13 @@ func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.ParamsType) > 0 { + i -= len(m.ParamsType) + copy(dAtA[i:], m.ParamsType) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ParamsType))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -1651,7 +1703,43 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 + } + if m.TallyParams != nil { + { + size, err := m.TallyParams.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.DepositParams != nil { + { + size, err := m.DepositParams.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.VotingParams != nil { + { + size, err := m.VotingParams.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -2027,6 +2115,10 @@ func (m *QueryParamsRequest) Size() (n int) { } var l int _ = l + l = len(m.ParamsType) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -2036,6 +2128,18 @@ func (m *QueryParamsResponse) Size() (n int) { } var l int _ = l + if m.VotingParams != nil { + l = m.VotingParams.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.DepositParams != nil { + l = m.DepositParams.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.TallyParams != nil { + l = m.TallyParams.Size() + n += 1 + l + sovQuery(uint64(l)) + } if m.Params != nil { l = m.Params.Size() n += 1 + l + sovQuery(uint64(l)) @@ -3023,6 +3127,38 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParamsType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ParamsType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3073,7 +3209,115 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 5: + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VotingParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VotingParams == nil { + m.VotingParams = &VotingParams{} + } + if err := m.VotingParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DepositParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DepositParams == nil { + m.DepositParams = &DepositParams{} + } + if err := m.DepositParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TallyParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TallyParams == nil { + m.TallyParams = &TallyParams{} + } + if err := m.TallyParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } diff --git a/x/gov/types/v1/query.pb.gw.go b/x/gov/types/v1/query.pb.gw.go index 13bab966dcd3..ef3d56caf59e 100644 --- a/x/gov/types/v1/query.pb.gw.go +++ b/x/gov/types/v1/query.pb.gw.go @@ -271,10 +271,21 @@ func local_request_Query_Votes_0(ctx context.Context, marshaler runtime.Marshale } +var ( + filter_Query_Params_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryParamsRequest var metadata runtime.ServerMetadata + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Params_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -284,6 +295,13 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal var protoReq QueryParamsRequest var metadata runtime.ServerMetadata + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Params_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.Params(ctx, &protoReq) return msg, metadata, err From 1a082681b248186bf479e19b85c94c24993e08b6 Mon Sep 17 00:00:00 2001 From: atheesh Date: Fri, 22 Jul 2022 12:01:14 +0530 Subject: [PATCH 15/33] add deprecate --- x/gov/genesis.go | 7 +++++ x/gov/keeper/grpc_query.go | 52 ++++++++++++++++++++++++++------------ x/gov/types/v1/genesis.go | 20 +++++++++++++++ x/gov/types/v1/params.go | 24 ++++++++++++++++++ 4 files changed, 87 insertions(+), 16 deletions(-) diff --git a/x/gov/genesis.go b/x/gov/genesis.go index ebae2d8b12bf..4a29424c2295 100644 --- a/x/gov/genesis.go +++ b/x/gov/genesis.go @@ -58,6 +58,10 @@ func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *v1.GenesisState { proposals := k.GetProposals(ctx) params := k.GetParams(ctx) + depositParams := v1.NewDepositParams(params.MinDeposit, params.MaxDepositPeriod) + votingParams := v1.NewVotingParams(params.VotingPeriod) + tallyParams := v1.NewTallyParams(params.Quorum, params.Threshold, params.VetoThreshold) + var proposalsDeposits v1.Deposits var proposalsVotes v1.Votes for _, proposal := range proposals { @@ -73,6 +77,9 @@ func ExportGenesis(ctx sdk.Context, k *keeper.Keeper) *v1.GenesisState { Deposits: proposalsDeposits, Votes: proposalsVotes, Proposals: proposals, + DepositParams: &depositParams, + VotingParams: &votingParams, + TallyParams: &tallyParams, Params: ¶ms, } } diff --git a/x/gov/keeper/grpc_query.go b/x/gov/keeper/grpc_query.go index c7b62cd05c40..e4f7c9bf105f 100644 --- a/x/gov/keeper/grpc_query.go +++ b/x/gov/keeper/grpc_query.go @@ -160,6 +160,27 @@ func (q Keeper) Params(c context.Context, req *v1.QueryParamsRequest) (*v1.Query ctx := sdk.UnwrapSDKContext(c) params := q.GetParams(ctx) + response := &v1.QueryParamsResponse{} + + switch req.ParamsType { + case v1.ParamDeposit: + depositParams := v1.NewDepositParams(params.MinDeposit, params.MaxDepositPeriod) + response.DepositParams = &depositParams + + case v1.ParamVoting: + votingParams := v1.NewVotingParams(params.VotingPeriod) + response.VotingParams = &votingParams + + case v1.ParamTallying: + tallyParams := v1.NewTallyParams(params.Quorum, params.Threshold, params.VetoThreshold) + response.TallyParams = &tallyParams + default: + return nil, status.Errorf(codes.InvalidArgument, + "%s is not a valid parameter type", req.ParamsType) + + } + response.Params = ¶ms + return &v1.QueryParamsResponse{Params: ¶ms}, nil } @@ -350,41 +371,40 @@ func (q legacyQueryServer) Votes(c context.Context, req *v1beta1.QueryVotesReque } func (q legacyQueryServer) Params(c context.Context, req *v1beta1.QueryParamsRequest) (*v1beta1.QueryParamsResponse, error) { - p, err := q.keeper.Params(c, &v1.QueryParamsRequest{}) + resp, err := q.keeper.Params(c, &v1.QueryParamsRequest{ + ParamsType: req.ParamsType, + }) + if err != nil { return nil, err } response := &v1beta1.QueryParamsResponse{} - switch req.ParamsType { - case v1.ParamDeposit: - response.DepositParams = v1beta1.NewDepositParams(p.Params.MinDeposit, *p.Params.MaxDepositPeriod) + if resp.DepositParams != nil { + minDeposit := sdk.NewCoins(resp.DepositParams.MinDeposit...) + response.DepositParams = v1beta1.NewDepositParams(minDeposit, *resp.DepositParams.MaxDepositPeriod) + } - case v1.ParamVoting: - response.VotingParams = v1beta1.NewVotingParams(*p.Params.VotingPeriod) + if resp.VotingParams != nil { + response.VotingParams = v1beta1.NewVotingParams(*resp.VotingParams.VotingPeriod) + } - case v1.ParamTallying: - quorum, err := sdk.NewDecFromStr(p.Params.Quorum) + if resp.TallyParams != nil { + quorum, err := sdk.NewDecFromStr(resp.TallyParams.Quorum) if err != nil { return nil, err } - - threshold, err := sdk.NewDecFromStr(p.Params.Threshold) + threshold, err := sdk.NewDecFromStr(resp.TallyParams.Threshold) if err != nil { return nil, err } - - vetoThreshold, err := sdk.NewDecFromStr(p.Params.VetoThreshold) + vetoThreshold, err := sdk.NewDecFromStr(resp.TallyParams.VetoThreshold) if err != nil { return nil, err } response.TallyParams = v1beta1.NewTallyParams(quorum, threshold, vetoThreshold) - default: - return nil, status.Errorf(codes.InvalidArgument, - "%s is not a valid parameter type", req.ParamsType) - } return response, nil diff --git a/x/gov/types/v1/genesis.go b/x/gov/types/v1/genesis.go index ef44bd481627..cc407309fbfe 100644 --- a/x/gov/types/v1/genesis.go +++ b/x/gov/types/v1/genesis.go @@ -2,14 +2,22 @@ package v1 import ( "errors" + "fmt" "github.com/cosmos/cosmos-sdk/codec/types" ) // NewGenesisState creates a new genesis state for the governance module func NewGenesisState(startingProposalID uint64, params Params) *GenesisState { + dp := NewDepositParams(params.MinDeposit, params.MaxDepositPeriod) + vp := NewVotingParams(params.VotingPeriod) + tp := NewTallyParams(params.Quorum, params.Threshold, params.VetoThreshold) + return &GenesisState{ StartingProposalId: startingProposalID, + DepositParams: &dp, + VotingParams: &vp, + TallyParams: &tp, Params: ¶ms, } } @@ -33,6 +41,18 @@ func ValidateGenesis(data *GenesisState) error { return errors.New("starting proposal id must be greater than 0") } + if err := validateTallyParams(*data.TallyParams); err != nil { + return fmt.Errorf("invalid tally params: %w", err) + } + + if err := validateVotingParams(*data.VotingParams); err != nil { + return fmt.Errorf("invalid voting params: %w", err) + } + + if err := validateDepositParams(*data.DepositParams); err != nil { + return fmt.Errorf("invalid deposit params: %w", err) + } + return data.Params.ValidateBasic() } diff --git a/x/gov/types/v1/params.go b/x/gov/types/v1/params.go index eac6f3721126..547b0d814e27 100644 --- a/x/gov/types/v1/params.go +++ b/x/gov/types/v1/params.go @@ -26,6 +26,30 @@ func (p Params) Equal(p2 Params) bool { p.VotingPeriod == p2.VotingPeriod } +// NewDepositParams creates a new DepositParams object +func NewDepositParams(minDeposit sdk.Coins, maxDepositPeriod *time.Duration) DepositParams { + return DepositParams{ + MinDeposit: minDeposit, + MaxDepositPeriod: maxDepositPeriod, + } +} + +// NewTallyParams creates a new TallyParams object +func NewTallyParams(quorum, threshold, vetoThreshold string) TallyParams { + return TallyParams{ + Quorum: quorum, + Threshold: threshold, + VetoThreshold: vetoThreshold, + } +} + +// NewVotingParams creates a new VotingParams object +func NewVotingParams(votingPeriod *time.Duration) VotingParams { + return VotingParams{ + VotingPeriod: votingPeriod, + } +} + func NewParams( minDeposit sdk.Coins, maxDepositPeriod time.Duration, votingPeriod time.Duration, quorum string, threshold string, vetoThreshold string, From 222a97cd8916d7dc74bc0392f714ef1055187446 Mon Sep 17 00:00:00 2001 From: atheesh Date: Mon, 25 Jul 2022 11:53:36 +0530 Subject: [PATCH 16/33] fix test --- x/gov/types/v1/genesis_test.go | 39 ++++++++++------------------------ 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/x/gov/types/v1/genesis_test.go b/x/gov/types/v1/genesis_test.go index 8109d5845ada..1d74e2ded392 100644 --- a/x/gov/types/v1/genesis_test.go +++ b/x/gov/types/v1/genesis_test.go @@ -27,19 +27,13 @@ func TestValidateGenesis(t *testing.T) { { name: "valid", genesisState: func() *v1.GenesisState { - return &v1.GenesisState{ - StartingProposalId: v1.DefaultStartingProposalID, - Params: ¶ms, - } + return v1.NewGenesisState(v1.DefaultStartingProposalID, params) }, }, { name: "invalid StartingProposalId", genesisState: func() *v1.GenesisState { - return &v1.GenesisState{ - StartingProposalId: 0, - Params: ¶ms, - } + return v1.NewGenesisState(0, params) }, expErr: true, }, @@ -52,10 +46,7 @@ func TestValidateGenesis(t *testing.T) { Amount: sdk.NewInt(-100), }} - return &v1.GenesisState{ - StartingProposalId: 0, - Params: ¶ms1, - } + return v1.NewGenesisState(0, params1) }, expErr: true, }, @@ -64,10 +55,8 @@ func TestValidateGenesis(t *testing.T) { genesisState: func() *v1.GenesisState { params1 := params params1.MaxDepositPeriod = nil - return &v1.GenesisState{ - StartingProposalId: 0, - Params: ¶ms1, - } + + return v1.NewGenesisState(0, params1) }, expErr: true, }, @@ -76,10 +65,8 @@ func TestValidateGenesis(t *testing.T) { genesisState: func() *v1.GenesisState { params1 := params params1.Quorum = "2" - return &v1.GenesisState{ - StartingProposalId: 0, - Params: ¶ms1, - } + + return v1.NewGenesisState(0, params1) }, expErr: true, }, @@ -88,10 +75,8 @@ func TestValidateGenesis(t *testing.T) { genesisState: func() *v1.GenesisState { params1 := params params1.Threshold = "2" - return &v1.GenesisState{ - StartingProposalId: 0, - Params: ¶ms1, - } + + return v1.NewGenesisState(0, params1) }, expErr: true, }, @@ -100,10 +85,8 @@ func TestValidateGenesis(t *testing.T) { genesisState: func() *v1.GenesisState { params1 := params params1.VetoThreshold = "2" - return &v1.GenesisState{ - StartingProposalId: 0, - Params: ¶ms1, - } + + return v1.NewGenesisState(0, params1) }, expErr: true, }, From b778d3a534f277288be2682b058e830a08f65b53 Mon Sep 17 00:00:00 2001 From: atheesh Date: Mon, 25 Jul 2022 14:59:24 +0530 Subject: [PATCH 17/33] add deprecation option --- api/cosmos/gov/v1/genesis.pulsar.go | 60 ++++--- api/cosmos/gov/v1/query.pulsar.go | 266 +++++++++++++++------------- proto/cosmos/gov/v1/genesis.proto | 6 +- proto/cosmos/gov/v1/query.proto | 6 +- x/gov/types/v1/genesis.pb.go | 55 +++--- x/gov/types/v1/query.pb.go | 129 +++++++------- 6 files changed, 274 insertions(+), 248 deletions(-) diff --git a/api/cosmos/gov/v1/genesis.pulsar.go b/api/cosmos/gov/v1/genesis.pulsar.go index 902cd86da38b..0259ac955bb7 100644 --- a/api/cosmos/gov/v1/genesis.pulsar.go +++ b/api/cosmos/gov/v1/genesis.pulsar.go @@ -1177,12 +1177,18 @@ type GenesisState struct { Proposals []*Proposal `protobuf:"bytes,4,rep,name=proposals,proto3" json:"proposals,omitempty"` // Deprecated: Prefer to use `params` instead. // deposit_params defines all the paramaters of related to deposit. + // + // Deprecated: Do not use. DepositParams *DepositParams `protobuf:"bytes,5,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"` // Deprecated: Prefer to use `params` instead. // voting_params defines all the paramaters of related to voting. + // + // Deprecated: Do not use. VotingParams *VotingParams `protobuf:"bytes,6,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"` // Deprecated: Prefer to use `params` instead. // tally_params defines all the paramaters of related to tally. + // + // Deprecated: Do not use. TallyParams *TallyParams `protobuf:"bytes,7,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` // params defines all the paramaters of x/gov module. Params *Params `protobuf:"bytes,8,opt,name=params,proto3" json:"params,omitempty"` @@ -1236,6 +1242,7 @@ func (x *GenesisState) GetProposals() []*Proposal { return nil } +// Deprecated: Do not use. func (x *GenesisState) GetDepositParams() *DepositParams { if x != nil { return x.DepositParams @@ -1243,6 +1250,7 @@ func (x *GenesisState) GetDepositParams() *DepositParams { return nil } +// Deprecated: Do not use. func (x *GenesisState) GetVotingParams() *VotingParams { if x != nil { return x.VotingParams @@ -1250,6 +1258,7 @@ func (x *GenesisState) GetVotingParams() *VotingParams { return nil } +// Deprecated: Do not use. func (x *GenesisState) GetTallyParams() *TallyParams { if x != nil { return x.TallyParams @@ -1271,7 +1280,7 @@ var file_cosmos_gov_v1_genesis_proto_rawDesc = []byte{ 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x76, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcb, 0x03, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd7, 0x03, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, @@ -1284,33 +1293,34 @@ var file_cosmos_gov_v1_genesis_proto_rawDesc = []byte{ 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x43, + 0x73, 0x61, 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x47, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x69, 0x6e, - 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x42, 0x9d, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, - 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, - 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, - 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, - 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, - 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x61, 0x6d, 0x73, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x44, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, + 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x02, 0x18, 0x01, 0x52, + 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x41, 0x0a, + 0x0c, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, + 0x02, 0x18, 0x01, 0x52, 0x0b, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, + 0x9d, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, + 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, + 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, + 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/gov/v1/query.pulsar.go b/api/cosmos/gov/v1/query.pulsar.go index d253c15fbac2..9cbe31c9d0a8 100644 --- a/api/cosmos/gov/v1/query.pulsar.go +++ b/api/cosmos/gov/v1/query.pulsar.go @@ -8306,12 +8306,18 @@ type QueryParamsResponse struct { // Deprecated: Prefer to use `params` instead. // voting_params defines the parameters related to voting. + // + // Deprecated: Do not use. VotingParams *VotingParams `protobuf:"bytes,1,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"` // Deprecated: Prefer to use `params` instead. // deposit_params defines the parameters related to deposit. + // + // Deprecated: Do not use. DepositParams *DepositParams `protobuf:"bytes,2,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"` // Deprecated: Prefer to use `params` instead. // tally_params defines the parameters related to tally. + // + // Deprecated: Do not use. TallyParams *TallyParams `protobuf:"bytes,3,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` // params defines all the paramaters of x/gov module. Params *Params `protobuf:"bytes,4,opt,name=params,proto3" json:"params,omitempty"` @@ -8337,6 +8343,7 @@ func (*QueryParamsResponse) Descriptor() ([]byte, []int) { return file_cosmos_gov_v1_query_proto_rawDescGZIP(), []int{9} } +// Deprecated: Do not use. func (x *QueryParamsResponse) GetVotingParams() *VotingParams { if x != nil { return x.VotingParams @@ -8344,6 +8351,7 @@ func (x *QueryParamsResponse) GetVotingParams() *VotingParams { return nil } +// Deprecated: Do not use. func (x *QueryParamsResponse) GetDepositParams() *DepositParams { if x != nil { return x.DepositParams @@ -8351,6 +8359,7 @@ func (x *QueryParamsResponse) GetDepositParams() *DepositParams { return nil } +// Deprecated: Do not use. func (x *QueryParamsResponse) GetTallyParams() *TallyParams { if x != nil { return x.TallyParams @@ -8692,140 +8701,141 @@ var file_cosmos_gov_v1_query_proto_rawDesc = []byte{ 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, - 0x8a, 0x02, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, + 0x96, 0x02, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x56, - 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0c, 0x76, 0x6f, 0x74, - 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x43, 0x0a, 0x0e, 0x64, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x0d, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3d, - 0x0a, 0x0c, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x0b, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2d, 0x0a, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x6e, 0x0a, 0x13, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x22, 0x48, 0x0a, 0x14, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x07, 0x64, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x22, 0x7f, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, - 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, - 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x01, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x32, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x08, 0x64, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, - 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, - 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x22, 0x4c, 0x0a, 0x18, 0x51, 0x75, + 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x02, 0x18, 0x01, 0x52, + 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x47, 0x0a, + 0x0e, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, + 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x41, 0x0a, 0x0c, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x5f, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6c, + 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x74, 0x61, + 0x6c, 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x6e, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, + 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x22, 0x48, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x30, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x22, 0x7f, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x01, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, + 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x52, 0x05, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x32, 0xcc, 0x08, 0x0a, 0x05, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x12, 0x85, 0x01, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, - 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x28, 0x12, 0x26, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, - 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x7a, 0x0a, 0x09, 0x50, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, - 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, - 0x64, 0x7d, 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x7d, - 0x12, 0x82, 0x01, 0x0a, 0x05, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, - 0x76, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x6e, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, - 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x22, 0x4c, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, + 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x74, + 0x61, 0x6c, 0x6c, 0x79, 0x32, 0xcc, 0x08, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x85, + 0x01, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x23, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x97, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x7a, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, + 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x76, + 0x6f, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x7d, 0x12, 0x82, 0x01, 0x0a, + 0x05, 0x56, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, 0x74, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x6f, + 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, + 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x6f, 0x74, 0x65, + 0x73, 0x12, 0x6e, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x97, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x22, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, - 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, - 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, - 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x7d, 0x12, - 0x8e, 0x01, 0x0a, 0x08, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x63, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x3b, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x2f, + 0x7b, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x08, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, + 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x94, 0x01, 0x0a, + 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, - 0x2f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, - 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, - 0x12, 0x94, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, - 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, - 0x7d, 0x2f, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x42, 0x9b, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, - 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, + 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, + 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, + 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x74, 0x61, + 0x6c, 0x6c, 0x79, 0x42, 0x9b, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, + 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, + 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/cosmos/gov/v1/genesis.proto b/proto/cosmos/gov/v1/genesis.proto index ba247ab4a0ce..a3e76d7f0c31 100644 --- a/proto/cosmos/gov/v1/genesis.proto +++ b/proto/cosmos/gov/v1/genesis.proto @@ -19,13 +19,13 @@ message GenesisState { repeated Proposal proposals = 4; // Deprecated: Prefer to use `params` instead. // deposit_params defines all the paramaters of related to deposit. - DepositParams deposit_params = 5; + DepositParams deposit_params = 5 [deprecated=true]; // Deprecated: Prefer to use `params` instead. // voting_params defines all the paramaters of related to voting. - VotingParams voting_params = 6; + VotingParams voting_params = 6 [deprecated=true]; // Deprecated: Prefer to use `params` instead. // tally_params defines all the paramaters of related to tally. - TallyParams tally_params = 7; + TallyParams tally_params = 7 [deprecated=true]; // params defines all the paramaters of x/gov module. Params params = 8; } diff --git a/proto/cosmos/gov/v1/query.proto b/proto/cosmos/gov/v1/query.proto index 3bdc21a7a58a..02b88a7c3ba3 100644 --- a/proto/cosmos/gov/v1/query.proto +++ b/proto/cosmos/gov/v1/query.proto @@ -132,13 +132,13 @@ message QueryParamsRequest { message QueryParamsResponse { // Deprecated: Prefer to use `params` instead. // voting_params defines the parameters related to voting. - VotingParams voting_params = 1; + VotingParams voting_params = 1 [deprecated=true]; // Deprecated: Prefer to use `params` instead. // deposit_params defines the parameters related to deposit. - DepositParams deposit_params = 2; + DepositParams deposit_params = 2 [deprecated=true]; // Deprecated: Prefer to use `params` instead. // tally_params defines the parameters related to tally. - TallyParams tally_params = 3; + TallyParams tally_params = 3 [deprecated=true]; // params defines all the paramaters of x/gov module. Params params = 4; } diff --git a/x/gov/types/v1/genesis.pb.go b/x/gov/types/v1/genesis.pb.go index 635a323b4cc4..0d31b301b393 100644 --- a/x/gov/types/v1/genesis.pb.go +++ b/x/gov/types/v1/genesis.pb.go @@ -34,13 +34,13 @@ type GenesisState struct { Proposals []*Proposal `protobuf:"bytes,4,rep,name=proposals,proto3" json:"proposals,omitempty"` // Deprecated: Prefer to use `params` instead. // deposit_params defines all the paramaters of related to deposit. - DepositParams *DepositParams `protobuf:"bytes,5,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"` + DepositParams *DepositParams `protobuf:"bytes,5,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"` // Deprecated: Do not use. // Deprecated: Prefer to use `params` instead. // voting_params defines all the paramaters of related to voting. - VotingParams *VotingParams `protobuf:"bytes,6,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"` + VotingParams *VotingParams `protobuf:"bytes,6,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"` // Deprecated: Do not use. // Deprecated: Prefer to use `params` instead. // tally_params defines all the paramaters of related to tally. - TallyParams *TallyParams `protobuf:"bytes,7,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` + TallyParams *TallyParams `protobuf:"bytes,7,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` // Deprecated: Do not use. // params defines all the paramaters of x/gov module. Params *Params `protobuf:"bytes,8,opt,name=params,proto3" json:"params,omitempty"` } @@ -106,6 +106,7 @@ func (m *GenesisState) GetProposals() []*Proposal { return nil } +// Deprecated: Do not use. func (m *GenesisState) GetDepositParams() *DepositParams { if m != nil { return m.DepositParams @@ -113,6 +114,7 @@ func (m *GenesisState) GetDepositParams() *DepositParams { return nil } +// Deprecated: Do not use. func (m *GenesisState) GetVotingParams() *VotingParams { if m != nil { return m.VotingParams @@ -120,6 +122,7 @@ func (m *GenesisState) GetVotingParams() *VotingParams { return nil } +// Deprecated: Do not use. func (m *GenesisState) GetTallyParams() *TallyParams { if m != nil { return m.TallyParams @@ -141,30 +144,30 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1/genesis.proto", fileDescriptor_ef7cfd15e3ded621) } var fileDescriptor_ef7cfd15e3ded621 = []byte{ - // 356 bytes of a gzipped FileDescriptorProto + // 358 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xcd, 0x4e, 0xfa, 0x40, - 0x14, 0xc5, 0xe9, 0x9f, 0x8f, 0x3f, 0x0e, 0xe0, 0x62, 0xfc, 0xa0, 0x01, 0xd3, 0x10, 0x57, 0x18, - 0x43, 0x2b, 0x18, 0x97, 0x26, 0xc6, 0x8f, 0x18, 0x77, 0xa4, 0x1a, 0x17, 0x6e, 0x48, 0xa1, 0x93, - 0xda, 0x08, 0xdc, 0xa6, 0x77, 0x9c, 0xc8, 0x5b, 0xf8, 0x58, 0x26, 0x6e, 0x58, 0xba, 0x34, 0xf4, - 0x45, 0x0c, 0x33, 0x53, 0xc1, 0xea, 0xaa, 0xb9, 0x39, 0xbf, 0x73, 0xe6, 0xf4, 0xe6, 0x92, 0xe6, - 0x08, 0x70, 0x02, 0xe8, 0x04, 0x20, 0x1c, 0xd1, 0x75, 0x02, 0x36, 0x65, 0x18, 0xa2, 0x1d, 0xc5, - 0xc0, 0x81, 0xd6, 0x94, 0x68, 0x07, 0x20, 0x6c, 0xd1, 0x6d, 0xd4, 0x33, 0x2c, 0x08, 0xc5, 0xed, - 0xbf, 0xe7, 0x49, 0xf5, 0x5a, 0x39, 0x6f, 0xb9, 0xc7, 0x19, 0x3d, 0x22, 0xdb, 0xc8, 0xbd, 0x98, - 0x87, 0xd3, 0x60, 0x10, 0xc5, 0x10, 0x01, 0x7a, 0xe3, 0x41, 0xe8, 0x9b, 0x46, 0xcb, 0x68, 0x17, - 0x5c, 0x9a, 0x6a, 0x7d, 0x2d, 0xdd, 0xf8, 0xb4, 0x47, 0xca, 0x3e, 0x8b, 0x00, 0x43, 0x8e, 0xe6, - 0xbf, 0x56, 0xbe, 0x5d, 0xe9, 0xed, 0xda, 0x3f, 0x5e, 0xb7, 0x2f, 0x95, 0xec, 0x7e, 0x73, 0xf4, - 0x80, 0x14, 0x05, 0x70, 0x86, 0x66, 0x5e, 0x1a, 0xb6, 0x32, 0x86, 0x7b, 0xe0, 0xcc, 0x55, 0x04, - 0x3d, 0x21, 0x1b, 0x69, 0x0f, 0x34, 0x0b, 0x12, 0xaf, 0x67, 0xf0, 0xb4, 0x8c, 0xbb, 0x22, 0xe9, - 0x05, 0xd9, 0xd4, 0xaf, 0x0d, 0x22, 0x2f, 0xf6, 0x26, 0x68, 0x16, 0x5b, 0x46, 0xbb, 0xd2, 0xdb, - 0xfb, 0xbb, 0x5b, 0x5f, 0x32, 0x6e, 0xcd, 0x5f, 0x1f, 0xe9, 0x19, 0xa9, 0x09, 0x50, 0xab, 0x50, - 0x19, 0x25, 0x99, 0xd1, 0xfc, 0x5d, 0x77, 0xb9, 0x12, 0x15, 0x51, 0x15, 0x6b, 0x13, 0x3d, 0x25, - 0x55, 0xee, 0x8d, 0xc7, 0xb3, 0x34, 0xe0, 0xbf, 0x0c, 0x68, 0x64, 0x02, 0xee, 0x96, 0x88, 0xf6, - 0x57, 0xf8, 0x6a, 0xa0, 0x1d, 0x52, 0xd2, 0xc6, 0xb2, 0x34, 0xee, 0x64, 0xff, 0x5c, 0x79, 0x34, - 0x74, 0x7e, 0xf5, 0xb6, 0xb0, 0x8c, 0xf9, 0xc2, 0x32, 0x3e, 0x17, 0x96, 0xf1, 0x9a, 0x58, 0xb9, - 0x79, 0x62, 0xe5, 0x3e, 0x12, 0x2b, 0xf7, 0x70, 0x18, 0x84, 0xfc, 0xf1, 0x79, 0x68, 0x8f, 0x60, - 0xe2, 0xe8, 0x5b, 0x50, 0x9f, 0x0e, 0xfa, 0x4f, 0xce, 0x8b, 0x3c, 0x0c, 0x3e, 0x8b, 0x18, 0x3a, - 0xa2, 0x3b, 0x2c, 0xc9, 0xdb, 0x38, 0xfe, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x88, 0x17, 0x73, 0x08, - 0x62, 0x02, 0x00, 0x00, + 0x14, 0xc5, 0x19, 0xbe, 0xfe, 0xfc, 0x07, 0x70, 0x31, 0x7e, 0xd0, 0x80, 0x69, 0x88, 0x2b, 0x8c, + 0xa1, 0x15, 0x8c, 0x0f, 0x20, 0xc1, 0x10, 0x77, 0xa4, 0x1a, 0x17, 0x6e, 0x48, 0xa1, 0x93, 0xda, + 0x08, 0xdc, 0xa6, 0x77, 0x9c, 0xc8, 0x5b, 0xf8, 0x58, 0x2e, 0xd9, 0xe9, 0xd2, 0xc0, 0x8b, 0x18, + 0x66, 0x5a, 0xc1, 0xea, 0x6a, 0x92, 0x7b, 0x7e, 0xe7, 0xcc, 0xc9, 0xcd, 0xa5, 0x8d, 0x09, 0xe0, + 0x0c, 0xd0, 0xf6, 0x41, 0xda, 0xb2, 0x63, 0xfb, 0x7c, 0xce, 0x31, 0x40, 0x2b, 0x8c, 0x40, 0x00, + 0xab, 0x6a, 0xd1, 0xf2, 0x41, 0x5a, 0xb2, 0x53, 0xaf, 0xa5, 0x58, 0x90, 0x9a, 0x3b, 0x79, 0xcf, + 0xd1, 0xca, 0x40, 0x3b, 0x6f, 0x85, 0x2b, 0x38, 0x3b, 0xa7, 0x07, 0x28, 0xdc, 0x48, 0x04, 0x73, + 0x7f, 0x14, 0x46, 0x10, 0x02, 0xba, 0xd3, 0x51, 0xe0, 0x19, 0xa4, 0x49, 0x5a, 0x79, 0x87, 0x25, + 0xda, 0x30, 0x96, 0x6e, 0x3c, 0xd6, 0xa5, 0x25, 0x8f, 0x87, 0x80, 0x81, 0x40, 0x23, 0xdb, 0xcc, + 0xb5, 0xca, 0xdd, 0x23, 0xeb, 0xc7, 0xef, 0x56, 0x5f, 0xcb, 0xce, 0x37, 0xc7, 0x4e, 0x69, 0x41, + 0x82, 0xe0, 0x68, 0xe4, 0x94, 0x61, 0x3f, 0x65, 0xb8, 0x07, 0xc1, 0x1d, 0x4d, 0xb0, 0x4b, 0xfa, + 0x3f, 0xe9, 0x81, 0x46, 0x5e, 0xe1, 0xb5, 0x14, 0x9e, 0x94, 0x71, 0xb6, 0x24, 0x1b, 0xd0, 0xbd, + 0xf8, 0xb7, 0x51, 0xe8, 0x46, 0xee, 0x0c, 0x8d, 0x42, 0x93, 0xb4, 0xca, 0xdd, 0xe3, 0xbf, 0xbb, + 0x0d, 0x15, 0xd3, 0xcb, 0x1a, 0xc4, 0xa9, 0x7a, 0xbb, 0x23, 0xd6, 0xa7, 0x55, 0x09, 0x7a, 0x1d, + 0x3a, 0xa7, 0xa8, 0x72, 0x1a, 0xbf, 0x2b, 0x6f, 0xd6, 0xb2, 0x8d, 0xa9, 0xc8, 0x9d, 0x09, 0xbb, + 0xa2, 0x15, 0xe1, 0x4e, 0xa7, 0x8b, 0x24, 0xe4, 0x9f, 0x0a, 0xa9, 0xa7, 0x42, 0xee, 0x36, 0xc8, + 0x4e, 0x46, 0x59, 0x6c, 0x07, 0xac, 0x4d, 0x8b, 0xb1, 0xb9, 0xa4, 0xcc, 0x87, 0xe9, 0x2d, 0x28, + 0xd1, 0x89, 0xa1, 0xde, 0xf5, 0xdb, 0xca, 0x24, 0xcb, 0x95, 0x49, 0x3e, 0x57, 0x26, 0x79, 0x5d, + 0x9b, 0x99, 0xe5, 0xda, 0xcc, 0x7c, 0xac, 0xcd, 0xcc, 0xc3, 0x99, 0x1f, 0x88, 0xc7, 0xe7, 0xb1, + 0x35, 0x81, 0x99, 0x1d, 0xdf, 0x85, 0x7e, 0xda, 0xe8, 0x3d, 0xd9, 0x2f, 0xea, 0x48, 0xc4, 0x22, + 0xe4, 0x68, 0xcb, 0xce, 0xb8, 0xa8, 0xee, 0xe4, 0xe2, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xe0, 0xb2, + 0x17, 0xb2, 0x6e, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/gov/types/v1/query.pb.go b/x/gov/types/v1/query.pb.go index 7573a6e7c7b4..45941759a7c1 100644 --- a/x/gov/types/v1/query.pb.go +++ b/x/gov/types/v1/query.pb.go @@ -511,13 +511,13 @@ func (m *QueryParamsRequest) GetParamsType() string { type QueryParamsResponse struct { // Deprecated: Prefer to use `params` instead. // voting_params defines the parameters related to voting. - VotingParams *VotingParams `protobuf:"bytes,1,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"` + VotingParams *VotingParams `protobuf:"bytes,1,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"` // Deprecated: Do not use. // Deprecated: Prefer to use `params` instead. // deposit_params defines the parameters related to deposit. - DepositParams *DepositParams `protobuf:"bytes,2,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"` + DepositParams *DepositParams `protobuf:"bytes,2,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"` // Deprecated: Do not use. // Deprecated: Prefer to use `params` instead. // tally_params defines the parameters related to tally. - TallyParams *TallyParams `protobuf:"bytes,3,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` + TallyParams *TallyParams `protobuf:"bytes,3,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` // Deprecated: Do not use. // params defines all the paramaters of x/gov module. Params *Params `protobuf:"bytes,4,opt,name=params,proto3" json:"params,omitempty"` } @@ -555,6 +555,7 @@ func (m *QueryParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo +// Deprecated: Do not use. func (m *QueryParamsResponse) GetVotingParams() *VotingParams { if m != nil { return m.VotingParams @@ -562,6 +563,7 @@ func (m *QueryParamsResponse) GetVotingParams() *VotingParams { return nil } +// Deprecated: Do not use. func (m *QueryParamsResponse) GetDepositParams() *DepositParams { if m != nil { return m.DepositParams @@ -569,6 +571,7 @@ func (m *QueryParamsResponse) GetDepositParams() *DepositParams { return nil } +// Deprecated: Do not use. func (m *QueryParamsResponse) GetTallyParams() *TallyParams { if m != nil { return m.TallyParams @@ -907,67 +910,67 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1/query.proto", fileDescriptor_46a436d1109b50d0) } var fileDescriptor_46a436d1109b50d0 = []byte{ - // 954 bytes of a gzipped FileDescriptorProto + // 959 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4b, 0x6f, 0xdc, 0x54, - 0x14, 0x8e, 0x27, 0x8f, 0xce, 0x9c, 0x34, 0x01, 0x4e, 0x9b, 0x66, 0x30, 0xed, 0x34, 0xb8, 0x90, - 0x84, 0x47, 0x6c, 0x26, 0x7d, 0x49, 0xd0, 0x4a, 0xd0, 0x42, 0x00, 0x89, 0x45, 0x98, 0x56, 0x2c, - 0xd8, 0x44, 0x4e, 0xc6, 0x32, 0x16, 0x13, 0x5f, 0xd7, 0xf7, 0x8e, 0x45, 0x08, 0x11, 0x52, 0x25, - 0x04, 0x62, 0x01, 0x48, 0x54, 0x82, 0x1f, 0xc2, 0x8f, 0x60, 0xc1, 0xa2, 0x82, 0x0d, 0x4b, 0x94, - 0xf0, 0x43, 0x90, 0xef, 0x3d, 0xf6, 0xd8, 0x8e, 0xc7, 0x33, 0x53, 0x55, 0xac, 0xa2, 0xeb, 0xfb, - 0x9d, 0xef, 0x7c, 0xe7, 0x79, 0x33, 0xf0, 0xfc, 0x1e, 0xe3, 0xfb, 0x8c, 0x5b, 0x2e, 0x8b, 0xac, - 0xa8, 0x6d, 0x3d, 0xe8, 0x3b, 0xe1, 0x81, 0x19, 0x84, 0x4c, 0x30, 0x5c, 0x50, 0x57, 0xa6, 0xcb, - 0x22, 0x33, 0x6a, 0xeb, 0xaf, 0x12, 0x72, 0xd7, 0xe6, 0x8e, 0xc2, 0x59, 0x51, 0x7b, 0xd7, 0x11, - 0x76, 0xdb, 0x0a, 0x6c, 0xd7, 0xf3, 0x6d, 0xe1, 0x31, 0x5f, 0x99, 0xea, 0x17, 0x5d, 0xc6, 0xdc, - 0x9e, 0x63, 0xd9, 0x81, 0x67, 0xd9, 0xbe, 0xcf, 0x84, 0xbc, 0xe4, 0x74, 0xbb, 0x9c, 0xf7, 0x19, - 0xf3, 0xab, 0x0b, 0x12, 0xb3, 0x23, 0x4f, 0x16, 0xb9, 0x97, 0x07, 0xe3, 0x26, 0x9c, 0xff, 0x38, - 0xf6, 0xb9, 0x1d, 0xb2, 0x80, 0x71, 0xbb, 0xd7, 0x71, 0x1e, 0xf4, 0x1d, 0x2e, 0xf0, 0x32, 0xcc, - 0x07, 0xf4, 0x69, 0xc7, 0xeb, 0x36, 0xb5, 0x15, 0x6d, 0x7d, 0xa6, 0x03, 0xc9, 0xa7, 0x0f, 0xbb, - 0xc6, 0x47, 0xb0, 0x54, 0x30, 0xe4, 0x01, 0xf3, 0xb9, 0x83, 0x57, 0xa1, 0x9e, 0xc0, 0xa4, 0xd9, - 0xfc, 0xe6, 0xb2, 0x99, 0x8b, 0xd8, 0x4c, 0x4d, 0x52, 0xa0, 0xf1, 0x63, 0xad, 0x40, 0xc7, 0x13, - 0x21, 0x5b, 0xf0, 0x4c, 0x2a, 0x84, 0x0b, 0x5b, 0xf4, 0xb9, 0x64, 0x5d, 0xdc, 0xbc, 0x34, 0x84, - 0xf5, 0x9e, 0x04, 0x75, 0x16, 0x83, 0xdc, 0x19, 0x4d, 0x98, 0x8d, 0x98, 0x70, 0xc2, 0x66, 0x6d, - 0x45, 0x5b, 0x6f, 0xdc, 0x69, 0xfe, 0xf9, 0xdb, 0xc6, 0x79, 0x22, 0x78, 0xa7, 0xdb, 0x0d, 0x1d, - 0xce, 0xef, 0x89, 0xd0, 0xf3, 0xdd, 0x8e, 0x82, 0xe1, 0x0d, 0x68, 0x74, 0x9d, 0x80, 0x71, 0x4f, - 0xb0, 0xb0, 0x39, 0x3d, 0xc2, 0x66, 0x00, 0xc5, 0x2d, 0x80, 0x41, 0xd9, 0x9a, 0x33, 0x32, 0x01, - 0xab, 0x89, 0xd4, 0xb8, 0xc6, 0xa6, 0xea, 0x05, 0xaa, 0xb1, 0xb9, 0x6d, 0xbb, 0x0e, 0xc5, 0xda, - 0xc9, 0x58, 0x1a, 0xbf, 0x6a, 0x70, 0xa1, 0x98, 0x11, 0xca, 0xf0, 0x75, 0x68, 0x24, 0xc1, 0xc5, - 0xc9, 0x98, 0xae, 0x4a, 0xf1, 0x00, 0x89, 0xef, 0xe7, 0x94, 0xd5, 0xa4, 0xb2, 0xb5, 0x91, 0xca, - 0x94, 0xcf, 0x9c, 0xb4, 0x3d, 0x78, 0x56, 0x2a, 0xfb, 0x84, 0x09, 0x67, 0xdc, 0x7e, 0x99, 0x34, - 0xff, 0xc6, 0x2d, 0x78, 0x2e, 0xe3, 0x84, 0x22, 0x5f, 0x83, 0x99, 0xf8, 0x96, 0xfa, 0xea, 0x5c, - 0x21, 0x68, 0x09, 0x95, 0x00, 0xe3, 0xab, 0x8c, 0x35, 0x1f, 0x5b, 0xe3, 0x56, 0x49, 0x86, 0x9e, - 0xa4, 0x76, 0xdf, 0x69, 0x80, 0x59, 0xf7, 0xa4, 0xfe, 0x15, 0x95, 0x82, 0xa4, 0x66, 0xa5, 0xf2, - 0x15, 0xe2, 0xe9, 0xd5, 0xea, 0x3a, 0x29, 0xd9, 0xb6, 0x43, 0x7b, 0x3f, 0x97, 0x09, 0xf9, 0x61, - 0x47, 0x1c, 0x04, 0x2a, 0x9d, 0x8d, 0xd8, 0x2c, 0xfe, 0x74, 0xff, 0x20, 0x70, 0x8c, 0xef, 0x6b, - 0x70, 0x2e, 0x67, 0x47, 0x21, 0xbc, 0x0d, 0x0b, 0x11, 0x13, 0x9e, 0xef, 0xee, 0x28, 0x30, 0x55, - 0xe2, 0x85, 0xd3, 0xa1, 0x78, 0xbe, 0x4b, 0xb6, 0x67, 0xa3, 0xcc, 0x09, 0xef, 0xc2, 0x22, 0x0d, - 0x4b, 0x42, 0xa1, 0xa2, 0xbb, 0x58, 0xa0, 0x78, 0x57, 0x81, 0x88, 0x63, 0xa1, 0x9b, 0x3d, 0xe2, - 0x6d, 0x38, 0x2b, 0xec, 0x5e, 0xef, 0x20, 0xa1, 0x98, 0x96, 0x14, 0x7a, 0x81, 0xe2, 0x7e, 0x0c, - 0x21, 0x82, 0x79, 0x31, 0x38, 0xe0, 0x06, 0xcc, 0x91, 0xa1, 0x9a, 0xcf, 0xa5, 0xe2, 0xf4, 0x28, - 0x1b, 0x02, 0x19, 0x3e, 0xe5, 0x82, 0x24, 0x8d, 0xdd, 0x4e, 0xb9, 0x15, 0x52, 0x1b, 0x7b, 0x85, - 0x18, 0x1f, 0xd0, 0x4e, 0x4e, 0xfd, 0x51, 0xf2, 0xdf, 0x80, 0x33, 0x04, 0xa2, 0xb4, 0x5f, 0x28, - 0xcf, 0x59, 0x27, 0x81, 0x19, 0x5f, 0xe7, 0x99, 0xfe, 0xff, 0x49, 0x78, 0xa4, 0xd1, 0x5e, 0x1f, - 0x28, 0xa0, 0x60, 0x36, 0xa1, 0x4e, 0x2a, 0x93, 0x79, 0x18, 0x16, 0x4d, 0x8a, 0x7b, 0x7a, 0x53, - 0xf1, 0x26, 0x2c, 0x4b, 0x55, 0xb2, 0x43, 0x3a, 0x0e, 0xef, 0xf7, 0xc4, 0x04, 0x0f, 0x5f, 0xf3, - 0xb4, 0x6d, 0x5a, 0xa1, 0x59, 0xd9, 0x67, 0x54, 0x9f, 0xd2, 0x86, 0x24, 0x13, 0x05, 0xdc, 0xfc, - 0xa3, 0x0e, 0xb3, 0x92, 0x0e, 0xbf, 0xd1, 0xa0, 0x9e, 0xac, 0x6d, 0xbc, 0x52, 0xb0, 0x2c, 0x7b, - 0xa3, 0xf5, 0x97, 0xaa, 0x41, 0x4a, 0x93, 0x61, 0x3e, 0xfc, 0xeb, 0xdf, 0x9f, 0x6b, 0xeb, 0xb8, - 0x6a, 0xe5, 0xff, 0x3d, 0x48, 0x1f, 0x06, 0xeb, 0x30, 0x13, 0xf0, 0x11, 0x7e, 0x09, 0x8d, 0xf4, - 0xc9, 0xc1, 0x4a, 0x17, 0x49, 0x3b, 0xe9, 0x2f, 0x8f, 0x40, 0x91, 0x92, 0x15, 0xa9, 0x44, 0xc7, - 0xe6, 0x30, 0x25, 0xf8, 0xad, 0x06, 0x33, 0xf1, 0x1a, 0xc4, 0xcb, 0x65, 0x8c, 0x99, 0xf7, 0x46, - 0x5f, 0x19, 0x0e, 0x20, 0x6f, 0xb7, 0xa4, 0xb7, 0x1b, 0x78, 0x6d, 0xbc, 0xb8, 0x2d, 0xb9, 0x78, - 0xad, 0x43, 0xf9, 0xfa, 0x1c, 0xe1, 0x43, 0x0d, 0x66, 0xe5, 0xf6, 0xc6, 0xa1, 0x9e, 0xd2, 0xf0, - 0x5f, 0xac, 0x40, 0x90, 0x98, 0x6b, 0x52, 0x8c, 0x89, 0xaf, 0x4f, 0x22, 0x06, 0x7d, 0x98, 0xa3, - 0x8d, 0x55, 0xea, 0x22, 0xb7, 0xd3, 0x75, 0xa3, 0x0a, 0x42, 0x32, 0x2e, 0x49, 0x19, 0xcb, 0xb8, - 0x54, 0x94, 0xa1, 0xbc, 0xfc, 0xa2, 0xc1, 0x19, 0x9a, 0x3a, 0x2c, 0xa5, 0xcb, 0x6f, 0x40, 0xfd, - 0x4a, 0x25, 0x86, 0x7c, 0xde, 0x95, 0x3e, 0x6f, 0xe3, 0x5b, 0x63, 0x86, 0x9e, 0x4c, 0xbb, 0x75, - 0x98, 0x6e, 0xc4, 0x23, 0xfc, 0x41, 0x83, 0x7a, 0xb2, 0x42, 0xb0, 0xca, 0x2d, 0xaf, 0x1c, 0x8e, - 0xe2, 0x16, 0x32, 0x6e, 0x4a, 0x71, 0x6d, 0xb4, 0x26, 0x14, 0x87, 0x8f, 0x34, 0x98, 0xcf, 0x8c, - 0x33, 0xae, 0x96, 0xb9, 0x3b, 0xbd, 0x5e, 0xf4, 0xb5, 0x91, 0xb8, 0x27, 0xec, 0x18, 0xb9, 0x4e, - 0xee, 0xbc, 0xf7, 0xfb, 0x71, 0x4b, 0x7b, 0x7c, 0xdc, 0xd2, 0xfe, 0x39, 0x6e, 0x69, 0x3f, 0x9d, - 0xb4, 0xa6, 0x1e, 0x9f, 0xb4, 0xa6, 0xfe, 0x3e, 0x69, 0x4d, 0x7d, 0xfa, 0x9a, 0xeb, 0x89, 0xcf, - 0xfa, 0xbb, 0xe6, 0x1e, 0xdb, 0x4f, 0x18, 0xd5, 0x9f, 0x0d, 0xde, 0xfd, 0xdc, 0xfa, 0x42, 0xd2, - 0xc7, 0xff, 0x0c, 0xf0, 0xf8, 0xd7, 0xc7, 0x9c, 0xfc, 0x71, 0x70, 0xf5, 0xbf, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xf3, 0xb1, 0xfc, 0xbb, 0xc6, 0x0c, 0x00, 0x00, + 0x14, 0xce, 0x9d, 0x3c, 0x3a, 0x73, 0xd2, 0x04, 0x38, 0x6d, 0x9a, 0xc1, 0xb4, 0xd3, 0xe0, 0x42, + 0x12, 0x1e, 0xb1, 0x99, 0xf4, 0x25, 0x41, 0x59, 0x34, 0x94, 0x14, 0x24, 0x16, 0x61, 0x5a, 0xb1, + 0x60, 0x13, 0x39, 0x19, 0xcb, 0x58, 0x4c, 0x7c, 0xdd, 0xb9, 0x77, 0x46, 0x84, 0x10, 0x21, 0x55, + 0x42, 0xb0, 0x02, 0x24, 0x2a, 0xe0, 0x87, 0xf0, 0x23, 0x58, 0xb0, 0xa8, 0x60, 0xc3, 0x12, 0x25, + 0xfc, 0x10, 0xe4, 0x7b, 0x8f, 0x3d, 0xb6, 0xe3, 0x71, 0x66, 0xaa, 0x88, 0x55, 0xe4, 0x7b, 0xbf, + 0xf3, 0x9d, 0xef, 0x3c, 0x6f, 0x06, 0x5e, 0xdc, 0xe5, 0x62, 0x8f, 0x0b, 0xdb, 0xe3, 0x7d, 0xbb, + 0xdf, 0xb4, 0x1f, 0xf5, 0xdc, 0xee, 0xbe, 0x15, 0x76, 0xb9, 0xe4, 0x38, 0xa7, 0xaf, 0x2c, 0x8f, + 0xf7, 0xad, 0x7e, 0xd3, 0x78, 0x9d, 0x90, 0x3b, 0x8e, 0x70, 0x35, 0xce, 0xee, 0x37, 0x77, 0x5c, + 0xe9, 0x34, 0xed, 0xd0, 0xf1, 0xfc, 0xc0, 0x91, 0x3e, 0x0f, 0xb4, 0xa9, 0x71, 0xd9, 0xe3, 0xdc, + 0xeb, 0xb8, 0xb6, 0x13, 0xfa, 0xb6, 0x13, 0x04, 0x5c, 0xaa, 0x4b, 0x41, 0xb7, 0x8b, 0x59, 0x9f, + 0x11, 0xbf, 0xbe, 0x20, 0x31, 0xdb, 0xea, 0xcb, 0x26, 0xf7, 0xea, 0xc3, 0xbc, 0x0d, 0x17, 0x3f, + 0x8e, 0x7c, 0x6e, 0x75, 0x79, 0xc8, 0x85, 0xd3, 0x69, 0xb9, 0x8f, 0x7a, 0xae, 0x90, 0x78, 0x15, + 0x66, 0x43, 0x3a, 0xda, 0xf6, 0xdb, 0x75, 0xb6, 0xc4, 0x56, 0xa7, 0x5a, 0x10, 0x1f, 0x7d, 0xd8, + 0x36, 0x3f, 0x82, 0x85, 0x9c, 0xa1, 0x08, 0x79, 0x20, 0x5c, 0xbc, 0x0e, 0xd5, 0x18, 0xa6, 0xcc, + 0x66, 0xd7, 0x17, 0xad, 0x4c, 0xc4, 0x56, 0x62, 0x92, 0x00, 0xcd, 0x1f, 0x2a, 0x39, 0x3a, 0x11, + 0x0b, 0xd9, 0x84, 0xe7, 0x12, 0x21, 0x42, 0x3a, 0xb2, 0x27, 0x14, 0xeb, 0xfc, 0xfa, 0x95, 0x21, + 0xac, 0x0f, 0x14, 0xa8, 0x35, 0x1f, 0x66, 0xbe, 0xd1, 0x82, 0xe9, 0x3e, 0x97, 0x6e, 0xb7, 0x5e, + 0x59, 0x62, 0xab, 0xb5, 0x8d, 0xfa, 0x9f, 0xbf, 0xad, 0x5d, 0x24, 0x82, 0xbb, 0xed, 0x76, 0xd7, + 0x15, 0xe2, 0x81, 0xec, 0xfa, 0x81, 0xd7, 0xd2, 0x30, 0xbc, 0x05, 0xb5, 0xb6, 0x1b, 0x72, 0xe1, + 0x4b, 0xde, 0xad, 0x4f, 0x9e, 0x62, 0x33, 0x80, 0xe2, 0x26, 0xc0, 0xa0, 0x6c, 0xf5, 0x29, 0x95, + 0x80, 0xe5, 0x58, 0x6a, 0x54, 0x63, 0x4b, 0xf7, 0x02, 0xd5, 0xd8, 0xda, 0x72, 0x3c, 0x97, 0x62, + 0x6d, 0xa5, 0x2c, 0xcd, 0x5f, 0x19, 0x5c, 0xca, 0x67, 0x84, 0x32, 0x7c, 0x13, 0x6a, 0x71, 0x70, + 0x51, 0x32, 0x26, 0xcb, 0x52, 0x3c, 0x40, 0xe2, 0xfd, 0x8c, 0xb2, 0x8a, 0x52, 0xb6, 0x72, 0xaa, + 0x32, 0xed, 0x33, 0x23, 0x6d, 0x17, 0x9e, 0x57, 0xca, 0x3e, 0xe1, 0xd2, 0x1d, 0xb5, 0x5f, 0xc6, + 0xcd, 0xbf, 0x79, 0x07, 0x5e, 0x48, 0x39, 0xa1, 0xc8, 0x57, 0x60, 0x2a, 0xba, 0xa5, 0xbe, 0xba, + 0x90, 0x0b, 0x5a, 0x41, 0x15, 0xc0, 0xfc, 0x2a, 0x65, 0x2d, 0x46, 0xd6, 0xb8, 0x59, 0x90, 0xa1, + 0x67, 0xa9, 0xdd, 0x77, 0x0c, 0x30, 0xed, 0x9e, 0xd4, 0xbf, 0xa6, 0x53, 0x10, 0xd7, 0xac, 0x50, + 0xbe, 0x46, 0x9c, 0x5d, 0xad, 0x6e, 0x92, 0x92, 0x2d, 0xa7, 0xeb, 0xec, 0x65, 0x32, 0xa1, 0x0e, + 0xb6, 0xe5, 0x7e, 0xa8, 0xd3, 0x59, 0x8b, 0xcc, 0xa2, 0xa3, 0x87, 0xfb, 0xa1, 0x6b, 0xfe, 0x5c, + 0x81, 0x0b, 0x19, 0x3b, 0x0a, 0xe1, 0x1e, 0xcc, 0xf5, 0xb9, 0xf4, 0x03, 0x6f, 0x5b, 0x83, 0xa9, + 0x12, 0x2f, 0x9d, 0x0c, 0xc5, 0x0f, 0x3c, 0x6d, 0xbb, 0x51, 0xa9, 0xb3, 0xd6, 0xf9, 0x7e, 0xea, + 0x04, 0xef, 0xc3, 0x3c, 0x0d, 0x4c, 0x4c, 0xa3, 0x23, 0xbc, 0x9c, 0xa3, 0xb9, 0xa7, 0x41, 0x29, + 0x9e, 0xb9, 0x76, 0xfa, 0x08, 0xef, 0xc2, 0x79, 0xe9, 0x74, 0x3a, 0xfb, 0x31, 0xcd, 0xa4, 0xa2, + 0x31, 0x72, 0x34, 0x0f, 0x23, 0x48, 0x8a, 0x64, 0x56, 0x0e, 0x0e, 0x70, 0x0d, 0x66, 0xc8, 0x58, + 0xcf, 0xea, 0x42, 0x7e, 0x92, 0x74, 0x02, 0x08, 0x64, 0x06, 0x94, 0x17, 0x92, 0x36, 0x72, 0x6b, + 0x65, 0xd6, 0x49, 0x65, 0xe4, 0x75, 0x62, 0x7e, 0x40, 0xfb, 0x39, 0xf1, 0x47, 0x85, 0x78, 0x0b, + 0xce, 0x11, 0x88, 0x4a, 0x70, 0xa9, 0x38, 0x77, 0xad, 0x18, 0x66, 0x7e, 0x9d, 0x65, 0xfa, 0xff, + 0xa7, 0xe2, 0x09, 0xa3, 0x1d, 0x3f, 0x50, 0x40, 0xc1, 0xac, 0x43, 0x95, 0x54, 0xc6, 0xb3, 0x31, + 0x2c, 0x9a, 0x04, 0x77, 0x76, 0x13, 0xf2, 0x36, 0x2c, 0x2a, 0x55, 0xaa, 0x4b, 0x5a, 0xae, 0xe8, + 0x75, 0xe4, 0x18, 0x8f, 0x60, 0xfd, 0xa4, 0x6d, 0x52, 0xa1, 0x69, 0xd5, 0x67, 0x54, 0x9f, 0xc2, + 0xa6, 0x24, 0x13, 0x0d, 0x5c, 0xff, 0xa3, 0x0a, 0xd3, 0x8a, 0x0e, 0xbf, 0x61, 0x50, 0x8d, 0x57, + 0x38, 0x5e, 0xcb, 0x59, 0x16, 0xbd, 0xd7, 0xc6, 0x2b, 0xe5, 0x20, 0xad, 0xc9, 0xb4, 0x1e, 0xff, + 0xf5, 0xef, 0x4f, 0x95, 0x55, 0x5c, 0xb6, 0xb3, 0xff, 0x2a, 0x24, 0x8f, 0x84, 0x7d, 0x90, 0x0a, + 0xf8, 0x10, 0xbf, 0x84, 0x5a, 0xf2, 0xfc, 0x60, 0xa9, 0x8b, 0xb8, 0x9d, 0x8c, 0x57, 0x4f, 0x41, + 0x91, 0x92, 0x25, 0xa5, 0xc4, 0xc0, 0xfa, 0x30, 0x25, 0xf8, 0x2d, 0x83, 0xa9, 0x68, 0x25, 0xe2, + 0xd5, 0x22, 0xc6, 0xd4, 0xdb, 0x63, 0x2c, 0x0d, 0x07, 0x90, 0xb7, 0x3b, 0xca, 0xdb, 0x2d, 0xbc, + 0x31, 0x5a, 0xdc, 0xb6, 0x5a, 0xc2, 0xf6, 0x81, 0x7a, 0x89, 0x0e, 0xf1, 0x31, 0x83, 0x69, 0xb5, + 0xc9, 0x71, 0xa8, 0xa7, 0x24, 0xfc, 0x97, 0x4b, 0x10, 0x24, 0xe6, 0x86, 0x12, 0x63, 0xe1, 0x9b, + 0xe3, 0x88, 0xc1, 0x00, 0x66, 0x68, 0x63, 0x15, 0xba, 0xc8, 0xec, 0x77, 0xc3, 0x2c, 0x83, 0x90, + 0x8c, 0x2b, 0x4a, 0xc6, 0x22, 0x2e, 0xe4, 0x65, 0x68, 0x2f, 0xbf, 0x30, 0x38, 0x47, 0x53, 0x87, + 0x85, 0x74, 0xd9, 0x0d, 0x68, 0x5c, 0x2b, 0xc5, 0x90, 0xcf, 0xf7, 0x94, 0xcf, 0x77, 0xf1, 0x9d, + 0x11, 0x43, 0x8f, 0xa7, 0xdd, 0x3e, 0x48, 0x36, 0xe2, 0x21, 0x7e, 0xcf, 0xa0, 0x1a, 0xaf, 0x10, + 0x2c, 0x73, 0x2b, 0x4a, 0x87, 0x23, 0xbf, 0x85, 0xcc, 0xdb, 0x4a, 0x5c, 0x13, 0xed, 0x31, 0xc5, + 0xe1, 0x13, 0x06, 0xb3, 0xa9, 0x71, 0xc6, 0xe5, 0x22, 0x77, 0x27, 0xd7, 0x8b, 0xb1, 0x72, 0x2a, + 0xee, 0x19, 0x3b, 0x46, 0xad, 0x93, 0x8d, 0xf7, 0x7f, 0x3f, 0x6a, 0xb0, 0xa7, 0x47, 0x0d, 0xf6, + 0xcf, 0x51, 0x83, 0xfd, 0x78, 0xdc, 0x98, 0x78, 0x7a, 0xdc, 0x98, 0xf8, 0xfb, 0xb8, 0x31, 0xf1, + 0xe9, 0x1b, 0x9e, 0x2f, 0x3f, 0xeb, 0xed, 0x58, 0xbb, 0x7c, 0x2f, 0x66, 0xd4, 0x7f, 0xd6, 0x44, + 0xfb, 0x73, 0xfb, 0x0b, 0x45, 0x1f, 0xfd, 0x63, 0x20, 0xa2, 0x5f, 0x22, 0x33, 0xea, 0x87, 0xc2, + 0xf5, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x32, 0x5c, 0x08, 0x26, 0xd2, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From e238373af719a692634743110c613c4c3dce0d99 Mon Sep 17 00:00:00 2001 From: atheesh Date: Mon, 25 Jul 2022 18:42:22 +0530 Subject: [PATCH 18/33] fix tests --- x/gov/client/cli/query.go | 54 +++++++++++++++++++++++++++++++++ x/gov/client/testutil/query.go | 48 +++++++++++++++++++++++++++++ x/gov/keeper/grpc_query.go | 5 ++- x/gov/keeper/grpc_query_test.go | 47 ++++++++++++++++++++++++++-- 4 files changed, 150 insertions(+), 4 deletions(-) diff --git a/x/gov/client/cli/query.go b/x/gov/client/cli/query.go index e042ae665c97..326aeb0ead81 100644 --- a/x/gov/client/cli/query.go +++ b/x/gov/client/cli/query.go @@ -33,6 +33,7 @@ func GetQueryCmd() *cobra.Command { GetCmdQueryVote(), GetCmdQueryVotes(), GetCmdQueryParams(), + GetCmdQueryParam(), GetCmdQueryProposer(), GetCmdQueryDeposit(), GetCmdQueryDeposits(), @@ -548,6 +549,59 @@ $ %s query gov params return cmd } +// GetCmdQueryParam implements the query param command. +func GetCmdQueryParam() *cobra.Command { + cmd := &cobra.Command{ + Use: "param [param-type]", + Args: cobra.ExactArgs(1), + Short: "Query the parameters (voting|tallying|deposit) of the governance process", + Long: strings.TrimSpace( + fmt.Sprintf(`Query the all the parameters for the governance process. +Example: +$ %s query gov param voting +$ %s query gov param tallying +$ %s query gov param deposit +`, + version.AppName, version.AppName, version.AppName, + ), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := v1.NewQueryClient(clientCtx) + + // Query store + res, err := queryClient.Params( + cmd.Context(), + &v1.QueryParamsRequest{ParamsType: args[0]}, + ) + if err != nil { + return err + } + + var out fmt.Stringer + switch args[0] { + case "voting": + out = res.GetVotingParams() + case "tallying": + out = res.GetTallyParams() + case "deposit": + out = res.GetDepositParams() + default: + return fmt.Errorf("argument must be one of (voting|tallying|deposit), was %s", args[0]) + } + + return clientCtx.PrintObjectLegacy(out) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + // GetCmdQueryProposer implements the query proposer command. func GetCmdQueryProposer() *cobra.Command { cmd := &cobra.Command{ diff --git a/x/gov/client/testutil/query.go b/x/gov/client/testutil/query.go index ed65bc9c53e9..9eb8a85014f8 100644 --- a/x/gov/client/testutil/query.go +++ b/x/gov/client/testutil/query.go @@ -57,6 +57,54 @@ params: } } +func (s *IntegrationTestSuite) TestCmdParam() { + val := s.network.Validators[0] + + testCases := []struct { + name string + args []string + expectedOutput string + }{ + { + "voting params", + []string{ + "voting", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + `{"voting_period":"172800000000000"}`, + }, + { + "tally params", + []string{ + "tallying", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + `{"quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"}`, + }, + { + "deposit params", + []string{ + "deposit", + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + `{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800000000000"}`, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + cmd := cli.GetCmdQueryParam() + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) + s.Require().NoError(err) + s.Require().Equal(strings.TrimSpace(tc.expectedOutput), strings.TrimSpace(out.String())) + }) + } +} + func (s *IntegrationTestSuite) TestCmdProposer() { val := s.network.Validators[0] diff --git a/x/gov/keeper/grpc_query.go b/x/gov/keeper/grpc_query.go index e4f7c9bf105f..0ad5c1ea643c 100644 --- a/x/gov/keeper/grpc_query.go +++ b/x/gov/keeper/grpc_query.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "fmt" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -174,6 +175,7 @@ func (q Keeper) Params(c context.Context, req *v1.QueryParamsRequest) (*v1.Query case v1.ParamTallying: tallyParams := v1.NewTallyParams(params.Quorum, params.Threshold, params.VetoThreshold) response.TallyParams = &tallyParams + default: return nil, status.Errorf(codes.InvalidArgument, "%s is not a valid parameter type", req.ParamsType) @@ -181,7 +183,7 @@ func (q Keeper) Params(c context.Context, req *v1.QueryParamsRequest) (*v1.Query } response.Params = ¶ms - return &v1.QueryParamsResponse{Params: ¶ms}, nil + return response, nil } // Deposit queries single deposit information based on proposalID, depositAddr. @@ -379,6 +381,7 @@ func (q legacyQueryServer) Params(c context.Context, req *v1beta1.QueryParamsReq return nil, err } + fmt.Printf("resp: %v\n", resp) response := &v1beta1.QueryParamsResponse{} if resp.DepositParams != nil { diff --git a/x/gov/keeper/grpc_query_test.go b/x/gov/keeper/grpc_query_test.go index 162a1abea99b..8ae60dd0f2d3 100644 --- a/x/gov/keeper/grpc_query_test.go +++ b/x/gov/keeper/grpc_query_test.go @@ -788,6 +788,8 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryVotes() { func (suite *KeeperTestSuite) TestGRPCQueryParams() { queryClient := suite.queryClient + params := v1.DefaultParams() + var ( req *v1.QueryParamsRequest expRes *v1.QueryParamsResponse @@ -802,13 +804,50 @@ func (suite *KeeperTestSuite) TestGRPCQueryParams() { "empty request", func() { req = &v1.QueryParamsRequest{} - params := v1.DefaultParams() + }, + false, + }, + { + "deposit params request", + func() { + req = &v1.QueryParamsRequest{ParamsType: v1.ParamDeposit} + depositParams := v1.NewDepositParams(params.MinDeposit, params.MaxDepositPeriod) + expRes = &v1.QueryParamsResponse{ + DepositParams: &depositParams, + } + }, + true, + }, + { + "voting params request", + func() { + req = &v1.QueryParamsRequest{ParamsType: v1.ParamVoting} + votingParams := v1.NewVotingParams(params.VotingPeriod) + expRes = &v1.QueryParamsResponse{ + VotingParams: &votingParams, + } + }, + true, + }, + { + "tally params request", + func() { + req = &v1.QueryParamsRequest{ParamsType: v1.ParamTallying} + tallyParams := v1.NewTallyParams(params.Quorum, params.Threshold, params.VetoThreshold) expRes = &v1.QueryParamsResponse{ - Params: ¶ms, + TallyParams: &tallyParams, } }, true, }, + { + "invalid request", + func() { + req = &v1.QueryParamsRequest{ParamsType: "wrongPath"} + expRes = &v1.QueryParamsResponse{} + }, + false, + }, } for _, testCase := range testCases { @@ -819,7 +858,9 @@ func (suite *KeeperTestSuite) TestGRPCQueryParams() { if testCase.expPass { suite.Require().NoError(err) - suite.Require().Equal(expRes, params) + suite.Require().Equal(expRes.GetDepositParams(), params.GetDepositParams()) + suite.Require().Equal(expRes.GetVotingParams(), params.GetVotingParams()) + suite.Require().Equal(expRes.GetTallyParams(), params.GetTallyParams()) } else { suite.Require().Error(err) suite.Require().Nil(params) From 9c22c5a6060106e6604ac6ea374cf90e4bd27abc Mon Sep 17 00:00:00 2001 From: atheesh Date: Mon, 25 Jul 2022 19:00:31 +0530 Subject: [PATCH 19/33] review changes --- api/cosmos/gov/v1/query.pulsar.go | 85 ++++++++++----------- proto/cosmos/gov/v1/query.proto | 2 +- x/gov/keeper/grpc_query.go | 2 - x/gov/types/v1/query.pb.go | 121 +++++++++++++++--------------- x/gov/types/v1/query.pb.gw.go | 44 +++++++---- 5 files changed, 136 insertions(+), 118 deletions(-) diff --git a/api/cosmos/gov/v1/query.pulsar.go b/api/cosmos/gov/v1/query.pulsar.go index 9cbe31c9d0a8..4b307a5f9ac3 100644 --- a/api/cosmos/gov/v1/query.pulsar.go +++ b/api/cosmos/gov/v1/query.pulsar.go @@ -8756,7 +8756,7 @@ var file_cosmos_gov_v1_query_proto_rawDesc = []byte{ 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x74, - 0x61, 0x6c, 0x6c, 0x79, 0x32, 0xcc, 0x08, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x85, + 0x61, 0x6c, 0x6c, 0x79, 0x32, 0xda, 0x08, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x85, 0x01, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, @@ -8790,52 +8790,53 @@ var file_cosmos_gov_v1_query_proto_rawDesc = []byte{ 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x6f, 0x74, 0x65, - 0x73, 0x12, 0x6e, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x2e, 0x63, 0x6f, + 0x73, 0x12, 0x7c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x63, 0x6f, 0x73, + 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x97, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x22, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x3b, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x2f, - 0x7b, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x08, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, - 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x94, 0x01, 0x0a, - 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x26, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, - 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, - 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, - 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x74, 0x61, - 0x6c, 0x6c, 0x79, 0x42, 0x9b, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, - 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x7d, 0x12, + 0x97, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x22, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x2f, 0x7b, 0x64, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x08, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, + 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x94, 0x01, 0x0a, 0x0b, 0x54, + 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, + 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x74, 0x61, 0x6c, 0x6c, + 0x79, 0x42, 0x9b, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, + 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, + 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, + 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/cosmos/gov/v1/query.proto b/proto/cosmos/gov/v1/query.proto index 02b88a7c3ba3..8c81066019b8 100644 --- a/proto/cosmos/gov/v1/query.proto +++ b/proto/cosmos/gov/v1/query.proto @@ -34,7 +34,7 @@ service Query { // Params queries all parameters of the gov module. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/gov/v1/params"; + option (google.api.http).get = "/cosmos/gov/v1/params/{params_type}"; } // Deposit queries single deposit information based proposalID, depositAddr. diff --git a/x/gov/keeper/grpc_query.go b/x/gov/keeper/grpc_query.go index 0ad5c1ea643c..ca22848b8659 100644 --- a/x/gov/keeper/grpc_query.go +++ b/x/gov/keeper/grpc_query.go @@ -2,7 +2,6 @@ package keeper import ( "context" - "fmt" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -381,7 +380,6 @@ func (q legacyQueryServer) Params(c context.Context, req *v1beta1.QueryParamsReq return nil, err } - fmt.Printf("resp: %v\n", resp) response := &v1beta1.QueryParamsResponse{} if resp.DepositParams != nil { diff --git a/x/gov/types/v1/query.pb.go b/x/gov/types/v1/query.pb.go index 45941759a7c1..74105fcde5f8 100644 --- a/x/gov/types/v1/query.pb.go +++ b/x/gov/types/v1/query.pb.go @@ -910,67 +910,68 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1/query.proto", fileDescriptor_46a436d1109b50d0) } var fileDescriptor_46a436d1109b50d0 = []byte{ - // 959 bytes of a gzipped FileDescriptorProto + // 964 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4b, 0x6f, 0xdc, 0x54, - 0x14, 0xce, 0x9d, 0x3c, 0x3a, 0x73, 0xd2, 0x04, 0x38, 0x6d, 0x9a, 0xc1, 0xb4, 0xd3, 0xe0, 0x42, - 0x12, 0x1e, 0xb1, 0x99, 0xf4, 0x25, 0x41, 0x59, 0x34, 0x94, 0x14, 0x24, 0x16, 0x61, 0x5a, 0xb1, - 0x60, 0x13, 0x39, 0x19, 0xcb, 0x58, 0x4c, 0x7c, 0xdd, 0xb9, 0x77, 0x46, 0x84, 0x10, 0x21, 0x55, - 0x42, 0xb0, 0x02, 0x24, 0x2a, 0xe0, 0x87, 0xf0, 0x23, 0x58, 0xb0, 0xa8, 0x60, 0xc3, 0x12, 0x25, - 0xfc, 0x10, 0xe4, 0x7b, 0x8f, 0x3d, 0xb6, 0xe3, 0x71, 0x66, 0xaa, 0x88, 0x55, 0xe4, 0x7b, 0xbf, - 0xf3, 0x9d, 0xef, 0x3c, 0x6f, 0x06, 0x5e, 0xdc, 0xe5, 0x62, 0x8f, 0x0b, 0xdb, 0xe3, 0x7d, 0xbb, - 0xdf, 0xb4, 0x1f, 0xf5, 0xdc, 0xee, 0xbe, 0x15, 0x76, 0xb9, 0xe4, 0x38, 0xa7, 0xaf, 0x2c, 0x8f, - 0xf7, 0xad, 0x7e, 0xd3, 0x78, 0x9d, 0x90, 0x3b, 0x8e, 0x70, 0x35, 0xce, 0xee, 0x37, 0x77, 0x5c, - 0xe9, 0x34, 0xed, 0xd0, 0xf1, 0xfc, 0xc0, 0x91, 0x3e, 0x0f, 0xb4, 0xa9, 0x71, 0xd9, 0xe3, 0xdc, - 0xeb, 0xb8, 0xb6, 0x13, 0xfa, 0xb6, 0x13, 0x04, 0x5c, 0xaa, 0x4b, 0x41, 0xb7, 0x8b, 0x59, 0x9f, - 0x11, 0xbf, 0xbe, 0x20, 0x31, 0xdb, 0xea, 0xcb, 0x26, 0xf7, 0xea, 0xc3, 0xbc, 0x0d, 0x17, 0x3f, - 0x8e, 0x7c, 0x6e, 0x75, 0x79, 0xc8, 0x85, 0xd3, 0x69, 0xb9, 0x8f, 0x7a, 0xae, 0x90, 0x78, 0x15, - 0x66, 0x43, 0x3a, 0xda, 0xf6, 0xdb, 0x75, 0xb6, 0xc4, 0x56, 0xa7, 0x5a, 0x10, 0x1f, 0x7d, 0xd8, - 0x36, 0x3f, 0x82, 0x85, 0x9c, 0xa1, 0x08, 0x79, 0x20, 0x5c, 0xbc, 0x0e, 0xd5, 0x18, 0xa6, 0xcc, - 0x66, 0xd7, 0x17, 0xad, 0x4c, 0xc4, 0x56, 0x62, 0x92, 0x00, 0xcd, 0x1f, 0x2a, 0x39, 0x3a, 0x11, - 0x0b, 0xd9, 0x84, 0xe7, 0x12, 0x21, 0x42, 0x3a, 0xb2, 0x27, 0x14, 0xeb, 0xfc, 0xfa, 0x95, 0x21, - 0xac, 0x0f, 0x14, 0xa8, 0x35, 0x1f, 0x66, 0xbe, 0xd1, 0x82, 0xe9, 0x3e, 0x97, 0x6e, 0xb7, 0x5e, - 0x59, 0x62, 0xab, 0xb5, 0x8d, 0xfa, 0x9f, 0xbf, 0xad, 0x5d, 0x24, 0x82, 0xbb, 0xed, 0x76, 0xd7, - 0x15, 0xe2, 0x81, 0xec, 0xfa, 0x81, 0xd7, 0xd2, 0x30, 0xbc, 0x05, 0xb5, 0xb6, 0x1b, 0x72, 0xe1, - 0x4b, 0xde, 0xad, 0x4f, 0x9e, 0x62, 0x33, 0x80, 0xe2, 0x26, 0xc0, 0xa0, 0x6c, 0xf5, 0x29, 0x95, - 0x80, 0xe5, 0x58, 0x6a, 0x54, 0x63, 0x4b, 0xf7, 0x02, 0xd5, 0xd8, 0xda, 0x72, 0x3c, 0x97, 0x62, - 0x6d, 0xa5, 0x2c, 0xcd, 0x5f, 0x19, 0x5c, 0xca, 0x67, 0x84, 0x32, 0x7c, 0x13, 0x6a, 0x71, 0x70, - 0x51, 0x32, 0x26, 0xcb, 0x52, 0x3c, 0x40, 0xe2, 0xfd, 0x8c, 0xb2, 0x8a, 0x52, 0xb6, 0x72, 0xaa, - 0x32, 0xed, 0x33, 0x23, 0x6d, 0x17, 0x9e, 0x57, 0xca, 0x3e, 0xe1, 0xd2, 0x1d, 0xb5, 0x5f, 0xc6, - 0xcd, 0xbf, 0x79, 0x07, 0x5e, 0x48, 0x39, 0xa1, 0xc8, 0x57, 0x60, 0x2a, 0xba, 0xa5, 0xbe, 0xba, - 0x90, 0x0b, 0x5a, 0x41, 0x15, 0xc0, 0xfc, 0x2a, 0x65, 0x2d, 0x46, 0xd6, 0xb8, 0x59, 0x90, 0xa1, - 0x67, 0xa9, 0xdd, 0x77, 0x0c, 0x30, 0xed, 0x9e, 0xd4, 0xbf, 0xa6, 0x53, 0x10, 0xd7, 0xac, 0x50, - 0xbe, 0x46, 0x9c, 0x5d, 0xad, 0x6e, 0x92, 0x92, 0x2d, 0xa7, 0xeb, 0xec, 0x65, 0x32, 0xa1, 0x0e, - 0xb6, 0xe5, 0x7e, 0xa8, 0xd3, 0x59, 0x8b, 0xcc, 0xa2, 0xa3, 0x87, 0xfb, 0xa1, 0x6b, 0xfe, 0x5c, - 0x81, 0x0b, 0x19, 0x3b, 0x0a, 0xe1, 0x1e, 0xcc, 0xf5, 0xb9, 0xf4, 0x03, 0x6f, 0x5b, 0x83, 0xa9, - 0x12, 0x2f, 0x9d, 0x0c, 0xc5, 0x0f, 0x3c, 0x6d, 0xbb, 0x51, 0xa9, 0xb3, 0xd6, 0xf9, 0x7e, 0xea, - 0x04, 0xef, 0xc3, 0x3c, 0x0d, 0x4c, 0x4c, 0xa3, 0x23, 0xbc, 0x9c, 0xa3, 0xb9, 0xa7, 0x41, 0x29, - 0x9e, 0xb9, 0x76, 0xfa, 0x08, 0xef, 0xc2, 0x79, 0xe9, 0x74, 0x3a, 0xfb, 0x31, 0xcd, 0xa4, 0xa2, - 0x31, 0x72, 0x34, 0x0f, 0x23, 0x48, 0x8a, 0x64, 0x56, 0x0e, 0x0e, 0x70, 0x0d, 0x66, 0xc8, 0x58, - 0xcf, 0xea, 0x42, 0x7e, 0x92, 0x74, 0x02, 0x08, 0x64, 0x06, 0x94, 0x17, 0x92, 0x36, 0x72, 0x6b, - 0x65, 0xd6, 0x49, 0x65, 0xe4, 0x75, 0x62, 0x7e, 0x40, 0xfb, 0x39, 0xf1, 0x47, 0x85, 0x78, 0x0b, - 0xce, 0x11, 0x88, 0x4a, 0x70, 0xa9, 0x38, 0x77, 0xad, 0x18, 0x66, 0x7e, 0x9d, 0x65, 0xfa, 0xff, - 0xa7, 0xe2, 0x09, 0xa3, 0x1d, 0x3f, 0x50, 0x40, 0xc1, 0xac, 0x43, 0x95, 0x54, 0xc6, 0xb3, 0x31, - 0x2c, 0x9a, 0x04, 0x77, 0x76, 0x13, 0xf2, 0x36, 0x2c, 0x2a, 0x55, 0xaa, 0x4b, 0x5a, 0xae, 0xe8, - 0x75, 0xe4, 0x18, 0x8f, 0x60, 0xfd, 0xa4, 0x6d, 0x52, 0xa1, 0x69, 0xd5, 0x67, 0x54, 0x9f, 0xc2, - 0xa6, 0x24, 0x13, 0x0d, 0x5c, 0xff, 0xa3, 0x0a, 0xd3, 0x8a, 0x0e, 0xbf, 0x61, 0x50, 0x8d, 0x57, - 0x38, 0x5e, 0xcb, 0x59, 0x16, 0xbd, 0xd7, 0xc6, 0x2b, 0xe5, 0x20, 0xad, 0xc9, 0xb4, 0x1e, 0xff, - 0xf5, 0xef, 0x4f, 0x95, 0x55, 0x5c, 0xb6, 0xb3, 0xff, 0x2a, 0x24, 0x8f, 0x84, 0x7d, 0x90, 0x0a, - 0xf8, 0x10, 0xbf, 0x84, 0x5a, 0xf2, 0xfc, 0x60, 0xa9, 0x8b, 0xb8, 0x9d, 0x8c, 0x57, 0x4f, 0x41, - 0x91, 0x92, 0x25, 0xa5, 0xc4, 0xc0, 0xfa, 0x30, 0x25, 0xf8, 0x2d, 0x83, 0xa9, 0x68, 0x25, 0xe2, - 0xd5, 0x22, 0xc6, 0xd4, 0xdb, 0x63, 0x2c, 0x0d, 0x07, 0x90, 0xb7, 0x3b, 0xca, 0xdb, 0x2d, 0xbc, - 0x31, 0x5a, 0xdc, 0xb6, 0x5a, 0xc2, 0xf6, 0x81, 0x7a, 0x89, 0x0e, 0xf1, 0x31, 0x83, 0x69, 0xb5, - 0xc9, 0x71, 0xa8, 0xa7, 0x24, 0xfc, 0x97, 0x4b, 0x10, 0x24, 0xe6, 0x86, 0x12, 0x63, 0xe1, 0x9b, - 0xe3, 0x88, 0xc1, 0x00, 0x66, 0x68, 0x63, 0x15, 0xba, 0xc8, 0xec, 0x77, 0xc3, 0x2c, 0x83, 0x90, - 0x8c, 0x2b, 0x4a, 0xc6, 0x22, 0x2e, 0xe4, 0x65, 0x68, 0x2f, 0xbf, 0x30, 0x38, 0x47, 0x53, 0x87, - 0x85, 0x74, 0xd9, 0x0d, 0x68, 0x5c, 0x2b, 0xc5, 0x90, 0xcf, 0xf7, 0x94, 0xcf, 0x77, 0xf1, 0x9d, - 0x11, 0x43, 0x8f, 0xa7, 0xdd, 0x3e, 0x48, 0x36, 0xe2, 0x21, 0x7e, 0xcf, 0xa0, 0x1a, 0xaf, 0x10, - 0x2c, 0x73, 0x2b, 0x4a, 0x87, 0x23, 0xbf, 0x85, 0xcc, 0xdb, 0x4a, 0x5c, 0x13, 0xed, 0x31, 0xc5, - 0xe1, 0x13, 0x06, 0xb3, 0xa9, 0x71, 0xc6, 0xe5, 0x22, 0x77, 0x27, 0xd7, 0x8b, 0xb1, 0x72, 0x2a, - 0xee, 0x19, 0x3b, 0x46, 0xad, 0x93, 0x8d, 0xf7, 0x7f, 0x3f, 0x6a, 0xb0, 0xa7, 0x47, 0x0d, 0xf6, - 0xcf, 0x51, 0x83, 0xfd, 0x78, 0xdc, 0x98, 0x78, 0x7a, 0xdc, 0x98, 0xf8, 0xfb, 0xb8, 0x31, 0xf1, - 0xe9, 0x1b, 0x9e, 0x2f, 0x3f, 0xeb, 0xed, 0x58, 0xbb, 0x7c, 0x2f, 0x66, 0xd4, 0x7f, 0xd6, 0x44, - 0xfb, 0x73, 0xfb, 0x0b, 0x45, 0x1f, 0xfd, 0x63, 0x20, 0xa2, 0x5f, 0x22, 0x33, 0xea, 0x87, 0xc2, - 0xf5, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x32, 0x5c, 0x08, 0x26, 0xd2, 0x0c, 0x00, 0x00, + 0x14, 0x8e, 0x27, 0x8f, 0xce, 0x9c, 0x34, 0x01, 0x4e, 0x1f, 0x19, 0x4c, 0x99, 0x06, 0x87, 0x26, + 0x81, 0x12, 0x5f, 0x26, 0x7d, 0x49, 0x50, 0x16, 0x0d, 0x25, 0x05, 0x89, 0x45, 0x98, 0x56, 0x2c, + 0xd8, 0x44, 0x4e, 0xc6, 0x32, 0x16, 0x13, 0x5f, 0x77, 0xee, 0x9d, 0x11, 0x21, 0x8d, 0x90, 0x2a, + 0x21, 0x58, 0x01, 0x12, 0x15, 0xf0, 0x43, 0xf8, 0x11, 0x2c, 0x2b, 0xd8, 0x20, 0x56, 0x28, 0xe1, + 0x87, 0x20, 0xdf, 0x7b, 0xec, 0xb1, 0x1d, 0x8f, 0x33, 0x53, 0x55, 0xac, 0x22, 0xdf, 0xfb, 0x9d, + 0xef, 0x7c, 0xe7, 0x79, 0x33, 0xf0, 0xf2, 0x2e, 0x17, 0x7b, 0x5c, 0x30, 0x8f, 0xf7, 0x59, 0xbf, + 0xc9, 0x1e, 0xf6, 0xdc, 0xee, 0xbe, 0x1d, 0x76, 0xb9, 0xe4, 0x38, 0xa7, 0xaf, 0x6c, 0x8f, 0xf7, + 0xed, 0x7e, 0xd3, 0x7c, 0x93, 0x90, 0x3b, 0x8e, 0x70, 0x35, 0x8e, 0xf5, 0x9b, 0x3b, 0xae, 0x74, + 0x9a, 0x2c, 0x74, 0x3c, 0x3f, 0x70, 0xa4, 0xcf, 0x03, 0x6d, 0x6a, 0x5e, 0xf2, 0x38, 0xf7, 0x3a, + 0x2e, 0x73, 0x42, 0x9f, 0x39, 0x41, 0xc0, 0xa5, 0xba, 0x14, 0x74, 0xbb, 0x90, 0xf5, 0x19, 0xf1, + 0xeb, 0x0b, 0x12, 0xb3, 0xad, 0xbe, 0x18, 0xb9, 0x57, 0x1f, 0xd6, 0x2d, 0x38, 0xff, 0x49, 0xe4, + 0x73, 0xab, 0xcb, 0x43, 0x2e, 0x9c, 0x4e, 0xcb, 0x7d, 0xd8, 0x73, 0x85, 0xc4, 0xcb, 0x30, 0x1b, + 0xd2, 0xd1, 0xb6, 0xdf, 0xae, 0x1b, 0x8b, 0xc6, 0xea, 0x54, 0x0b, 0xe2, 0xa3, 0x8f, 0xda, 0xd6, + 0xc7, 0x70, 0x21, 0x67, 0x28, 0x42, 0x1e, 0x08, 0x17, 0xaf, 0x41, 0x35, 0x86, 0x29, 0xb3, 0xd9, + 0xf5, 0x05, 0x3b, 0x13, 0xb1, 0x9d, 0x98, 0x24, 0x40, 0xeb, 0x87, 0x4a, 0x8e, 0x4e, 0xc4, 0x42, + 0x36, 0xe1, 0x85, 0x44, 0x88, 0x90, 0x8e, 0xec, 0x09, 0xc5, 0x3a, 0xbf, 0xfe, 0xea, 0x10, 0xd6, + 0xfb, 0x0a, 0xd4, 0x9a, 0x0f, 0x33, 0xdf, 0x68, 0xc3, 0x74, 0x9f, 0x4b, 0xb7, 0x5b, 0xaf, 0x2c, + 0x1a, 0xab, 0xb5, 0x8d, 0xfa, 0x1f, 0xbf, 0xad, 0x9d, 0x27, 0x82, 0x3b, 0xed, 0x76, 0xd7, 0x15, + 0xe2, 0xbe, 0xec, 0xfa, 0x81, 0xd7, 0xd2, 0x30, 0xbc, 0x09, 0xb5, 0xb6, 0x1b, 0x72, 0xe1, 0x4b, + 0xde, 0xad, 0x4f, 0x9e, 0x62, 0x33, 0x80, 0xe2, 0x26, 0xc0, 0xa0, 0x6c, 0xf5, 0x29, 0x95, 0x80, + 0xe5, 0x58, 0x6a, 0x54, 0x63, 0x5b, 0xf7, 0x02, 0xd5, 0xd8, 0xde, 0x72, 0x3c, 0x97, 0x62, 0x6d, + 0xa5, 0x2c, 0xad, 0x5f, 0x0d, 0xb8, 0x98, 0xcf, 0x08, 0x65, 0xf8, 0x06, 0xd4, 0xe2, 0xe0, 0xa2, + 0x64, 0x4c, 0x96, 0xa5, 0x78, 0x80, 0xc4, 0x7b, 0x19, 0x65, 0x15, 0xa5, 0x6c, 0xe5, 0x54, 0x65, + 0xda, 0x67, 0x46, 0xda, 0x2e, 0xbc, 0xa8, 0x94, 0x7d, 0xca, 0xa5, 0x3b, 0x6a, 0xbf, 0x8c, 0x9b, + 0x7f, 0xeb, 0x36, 0xbc, 0x94, 0x72, 0x42, 0x91, 0xaf, 0xc0, 0x54, 0x74, 0x4b, 0x7d, 0x75, 0x2e, + 0x17, 0xb4, 0x82, 0x2a, 0x80, 0xf5, 0x28, 0x65, 0x2d, 0x46, 0xd6, 0xb8, 0x59, 0x90, 0xa1, 0x67, + 0xa9, 0xdd, 0x77, 0x06, 0x60, 0xda, 0x3d, 0xa9, 0x7f, 0x43, 0xa7, 0x20, 0xae, 0x59, 0xa1, 0x7c, + 0x8d, 0x78, 0x7e, 0xb5, 0xba, 0x41, 0x4a, 0xb6, 0x9c, 0xae, 0xb3, 0x97, 0xc9, 0x84, 0x3a, 0xd8, + 0x96, 0xfb, 0xa1, 0x4e, 0x67, 0x2d, 0x32, 0x8b, 0x8e, 0x1e, 0xec, 0x87, 0xae, 0xf5, 0x73, 0x05, + 0xce, 0x65, 0xec, 0x28, 0x84, 0xbb, 0x30, 0xd7, 0xe7, 0xd2, 0x0f, 0xbc, 0x6d, 0x0d, 0xa6, 0x4a, + 0xbc, 0x72, 0x32, 0x14, 0x3f, 0xf0, 0xb4, 0xed, 0x46, 0xa5, 0x6e, 0xb4, 0xce, 0xf6, 0x53, 0x27, + 0x78, 0x0f, 0xe6, 0x69, 0x60, 0x62, 0x1a, 0x1d, 0xe1, 0xa5, 0x1c, 0xcd, 0x5d, 0x0d, 0x4a, 0xf1, + 0xcc, 0xb5, 0xd3, 0x47, 0x78, 0x07, 0xce, 0x4a, 0xa7, 0xd3, 0xd9, 0x8f, 0x69, 0x26, 0x15, 0x8d, + 0x99, 0xa3, 0x79, 0x10, 0x41, 0x52, 0x24, 0xb3, 0x72, 0x70, 0x80, 0x6b, 0x30, 0x43, 0xc6, 0x7a, + 0x56, 0x2f, 0xe4, 0x27, 0x49, 0x27, 0x80, 0x40, 0x56, 0x40, 0x79, 0x21, 0x69, 0x23, 0xb7, 0x56, + 0x66, 0x9d, 0x54, 0x46, 0x5e, 0x27, 0xd6, 0x87, 0xb4, 0x9f, 0x13, 0x7f, 0x54, 0x88, 0xb7, 0xe1, + 0x0c, 0x81, 0xa8, 0x04, 0x17, 0x8b, 0x73, 0xd7, 0x8a, 0x61, 0xd6, 0xd7, 0x59, 0xa6, 0xff, 0x7f, + 0x2a, 0x9e, 0x18, 0xb4, 0xe3, 0x07, 0x0a, 0x28, 0x98, 0x75, 0xa8, 0x92, 0xca, 0x78, 0x36, 0x86, + 0x45, 0x93, 0xe0, 0x9e, 0xdf, 0x84, 0xbc, 0x03, 0x0b, 0x4a, 0x95, 0xea, 0x92, 0x96, 0x2b, 0x7a, + 0x1d, 0x39, 0xc6, 0x23, 0x58, 0x3f, 0x69, 0x9b, 0x54, 0x68, 0x5a, 0xf5, 0x19, 0xd5, 0xa7, 0xb0, + 0x29, 0xc9, 0x44, 0x03, 0xd7, 0xff, 0xae, 0xc2, 0xb4, 0xa2, 0xc3, 0x6f, 0x0c, 0xa8, 0xc6, 0x2b, + 0x1c, 0x97, 0x72, 0x96, 0x45, 0xef, 0xb5, 0xf9, 0x7a, 0x39, 0x48, 0x6b, 0xb2, 0xec, 0xc7, 0x7f, + 0xfe, 0xfb, 0x53, 0x65, 0x15, 0x97, 0x59, 0xf6, 0x5f, 0x85, 0xe4, 0x91, 0x60, 0x07, 0xa9, 0x80, + 0x0f, 0xf1, 0x2b, 0xa8, 0x25, 0xcf, 0x0f, 0x96, 0xba, 0x88, 0xdb, 0xc9, 0xbc, 0x72, 0x0a, 0x8a, + 0x94, 0x2c, 0x2a, 0x25, 0x26, 0xd6, 0x87, 0x29, 0xc1, 0x6f, 0x0d, 0x98, 0x8a, 0x56, 0x22, 0x5e, + 0x2e, 0x62, 0x4c, 0xbd, 0x3d, 0xe6, 0xe2, 0x70, 0x00, 0x79, 0xbb, 0xad, 0xbc, 0xdd, 0xc4, 0xeb, + 0xa3, 0xc5, 0xcd, 0xd4, 0x12, 0x66, 0x07, 0xea, 0x25, 0x3a, 0xc4, 0xc7, 0x06, 0x4c, 0xab, 0x4d, + 0x8e, 0x43, 0x3d, 0x25, 0xe1, 0xbf, 0x56, 0x82, 0x20, 0x31, 0xd7, 0x95, 0x18, 0x1b, 0xdf, 0x1a, + 0x47, 0x0c, 0x3e, 0x82, 0x19, 0xda, 0x58, 0x85, 0x2e, 0x32, 0xfb, 0xdd, 0xb4, 0xca, 0x20, 0x24, + 0xe3, 0xaa, 0x92, 0x71, 0x05, 0x97, 0xf2, 0x32, 0x14, 0x8c, 0x1d, 0xa4, 0x1e, 0x88, 0x43, 0xfc, + 0xc5, 0x80, 0x33, 0x34, 0x83, 0x58, 0x48, 0x9e, 0xdd, 0x87, 0xe6, 0x52, 0x29, 0x86, 0x14, 0xbc, + 0xaf, 0x14, 0xbc, 0x87, 0xef, 0x8e, 0x98, 0x88, 0x78, 0xf6, 0xd9, 0x41, 0xb2, 0x1f, 0x0f, 0xf1, + 0x7b, 0x03, 0xaa, 0xf1, 0x42, 0xc1, 0x32, 0xb7, 0xa2, 0x74, 0x54, 0xf2, 0x3b, 0xc9, 0xba, 0xa5, + 0xc4, 0x35, 0x91, 0x8d, 0x29, 0x0e, 0x9f, 0x18, 0x30, 0x9b, 0x1a, 0x6e, 0x5c, 0x2e, 0x72, 0x77, + 0x72, 0xd9, 0x98, 0x2b, 0xa7, 0xe2, 0x9e, 0xb1, 0x7f, 0xd4, 0x72, 0xd9, 0xf8, 0xe0, 0xf7, 0xa3, + 0x86, 0xf1, 0xf4, 0xa8, 0x61, 0xfc, 0x73, 0xd4, 0x30, 0x7e, 0x3c, 0x6e, 0x4c, 0x3c, 0x3d, 0x6e, + 0x4c, 0xfc, 0x75, 0xdc, 0x98, 0xf8, 0xec, 0xaa, 0xe7, 0xcb, 0xcf, 0x7b, 0x3b, 0xf6, 0x2e, 0xdf, + 0x8b, 0x19, 0xf5, 0x9f, 0x35, 0xd1, 0xfe, 0x82, 0x7d, 0xa9, 0xe8, 0xa3, 0x2e, 0x10, 0xd1, 0xef, + 0x92, 0x19, 0xf5, 0xb3, 0xe1, 0xda, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9f, 0xe4, 0xf6, 0xe9, + 0xe0, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/gov/types/v1/query.pb.gw.go b/x/gov/types/v1/query.pb.gw.go index ef3d56caf59e..18bdf04d96c7 100644 --- a/x/gov/types/v1/query.pb.gw.go +++ b/x/gov/types/v1/query.pb.gw.go @@ -271,19 +271,26 @@ func local_request_Query_Votes_0(ctx context.Context, marshaler runtime.Marshale } -var ( - filter_Query_Params_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryParamsRequest var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["params_type"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "params_type") } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Params_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + + protoReq.ParamsType, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "params_type", err) } msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -295,11 +302,22 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal var protoReq QueryParamsRequest var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["params_type"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "params_type") } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Params_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + + protoReq.ParamsType, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "params_type", err) } msg, err := server.Params(ctx, &protoReq) @@ -912,7 +930,7 @@ var ( pattern_Query_Votes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"cosmos", "gov", "v1", "proposals", "proposal_id", "votes"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "gov", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "gov", "v1", "params", "params_type"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Deposit_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"cosmos", "gov", "v1", "proposals", "proposal_id", "deposits", "depositor"}, "", runtime.AssumeColonVerbOpt(false))) From b9821b3020f7ab032f36aaf0c141270733159e01 Mon Sep 17 00:00:00 2001 From: atheesh Date: Mon, 25 Jul 2022 19:31:24 +0530 Subject: [PATCH 20/33] fix tests --- x/gov/client/cli/query.go | 9 ++++++++- x/gov/client/testutil/query.go | 13 ++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/x/gov/client/cli/query.go b/x/gov/client/cli/query.go index 326aeb0ead81..fc7f73c1a544 100644 --- a/x/gov/client/cli/query.go +++ b/x/gov/client/cli/query.go @@ -532,14 +532,21 @@ $ %s query gov params // Query store for all 3 params ctx := cmd.Context() + res, err := queryClient.Params( ctx, - &v1.QueryParamsRequest{}, + &v1.QueryParamsRequest{ParamsType: "deposit"}, ) if err != nil { return err } + vp := v1.NewVotingParams(res.Params.VotingPeriod) + res.VotingParams = &vp + + tp := v1.NewTallyParams(res.Params.Quorum, res.Params.Threshold, res.Params.VetoThreshold) + res.TallyParams = &tp + return clientCtx.PrintProto(res) }, } diff --git a/x/gov/client/testutil/query.go b/x/gov/client/testutil/query.go index 9eb8a85014f8..0db8db3c48e8 100644 --- a/x/gov/client/testutil/query.go +++ b/x/gov/client/testutil/query.go @@ -24,12 +24,17 @@ func (s *IntegrationTestSuite) TestCmdParams() { { "json output", []string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, - `{"params":{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800s","voting_period":"172800s","quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"}}`, + `{"voting_params":{"voting_period":"172800s"},"deposit_params":{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800s"},"tally_params":{"quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"},"params":{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800s","voting_period":"172800s","quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"}}`, }, { "text output", []string{}, ` +deposit_params: + max_deposit_period: 172800s + min_deposit: + - amount: "10000000" + denom: stake params: max_deposit_period: 172800s min_deposit: @@ -38,6 +43,12 @@ params: quorum: "0.334000000000000000" threshold: "0.500000000000000000" veto_threshold: "0.334000000000000000" + voting_period: 172800s +tally_params: + quorum: "0.334000000000000000" + threshold: "0.500000000000000000" + veto_threshold: "0.334000000000000000" +voting_params: voting_period: 172800s `, }, From 2f50c4ae230b876a66935de2683e2f496bced760 Mon Sep 17 00:00:00 2001 From: atheesh Date: Tue, 26 Jul 2022 10:23:43 +0530 Subject: [PATCH 21/33] fix tests --- x/gov/client/testutil/grpc.go | 26 ++++++++++++++++++++++++-- x/gov/migrations/v046/json_test.go | 5 ++++- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/x/gov/client/testutil/grpc.go b/x/gov/client/testutil/grpc.go index a3b962f8b058..dbcca6ad1188 100644 --- a/x/gov/client/testutil/grpc.go +++ b/x/gov/client/testutil/grpc.go @@ -357,6 +357,9 @@ func (s *IntegrationTestSuite) TestGetParamsGRPC() { val := s.network.Validators[0] params := v1.DefaultParams() + dp := v1.NewDepositParams(params.MinDeposit, params.MaxDepositPeriod) + vp := v1.NewVotingParams(params.VotingPeriod) + tp := v1.NewTallyParams(params.Quorum, params.Threshold, params.VetoThreshold) testCases := []struct { name string @@ -365,12 +368,31 @@ func (s *IntegrationTestSuite) TestGetParamsGRPC() { respType proto.Message expectResp proto.Message }{ + { + "request params with empty params type", + fmt.Sprintf("%s/cosmos/gov/v1/params/%s", val.APIAddress, ""), + true, nil, nil, + }, { "get deposit params", - fmt.Sprintf("%s/cosmos/gov/v1/params", val.APIAddress), + fmt.Sprintf("%s/cosmos/gov/v1/params/%s", val.APIAddress, v1.ParamDeposit), + false, + &v1.QueryParamsResponse{}, + &v1.QueryParamsResponse{DepositParams: &dp, Params: ¶ms}, + }, + { + "get vote params", + fmt.Sprintf("%s/cosmos/gov/v1/params/%s", val.APIAddress, v1.ParamVoting), + false, + &v1.QueryParamsResponse{}, + &v1.QueryParamsResponse{VotingParams: &vp, Params: ¶ms}, + }, + { + "get tally params", + fmt.Sprintf("%s/cosmos/gov/v1/params/%s", val.APIAddress, v1.ParamTallying), false, &v1.QueryParamsResponse{}, - &v1.QueryParamsResponse{Params: ¶ms}, + &v1.QueryParamsResponse{TallyParams: &tp, Params: ¶ms}, }, } diff --git a/x/gov/migrations/v046/json_test.go b/x/gov/migrations/v046/json_test.go index af7ec5812046..02187e2a9885 100644 --- a/x/gov/migrations/v046/json_test.go +++ b/x/gov/migrations/v046/json_test.go @@ -73,6 +73,7 @@ func TestMigrateJSON(t *testing.T) { // Make sure about: // - Proposals use MsgExecLegacyContent expected := `{ + "deposit_params": null, "deposits": [], "params": { "max_deposit_period": "172800s", @@ -122,6 +123,7 @@ func TestMigrateJSON(t *testing.T) { } ], "starting_proposal_id": "1", + "tally_params": null, "votes": [ { "metadata": "", @@ -145,7 +147,8 @@ func TestMigrateJSON(t *testing.T) { "proposal_id": "2", "voter": "cosmos1fl48vsnmsdzcv85q5d2q4z5ajdha8yu34mf0eh" } - ] + ], + "voting_params": null }` require.Equal(t, expected, string(indentedBz)) From 5dd9fb2a3774a7f8cea29e417005bc544121f294 Mon Sep 17 00:00:00 2001 From: atheesh Date: Tue, 26 Jul 2022 10:39:44 +0530 Subject: [PATCH 22/33] review changes --- x/gov/module.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/x/gov/module.go b/x/gov/module.go index f60eec0b8908..424807a0c6b9 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -167,10 +167,13 @@ type govInputs struct { Config *modulev1.Module Cdc codec.Codec Key *store.KVStoreKey + ModuleKey depinject.OwnModuleKey MsgServiceRouter *baseapp.MsgServiceRouter - AccountKeeper types.AccountKeeper - BankKeeper types.BankKeeper - StakingKeeper types.StakingKeeper + Authority map[string]sdk.AccAddress `optional:"true"` + + AccountKeeper types.AccountKeeper + BankKeeper types.BankKeeper + StakingKeeper types.StakingKeeper // LegacySubspace is used solely for migration of x/params managed parameters LegacySubspace types.ParamSubspace @@ -190,6 +193,11 @@ func provideModule(in govInputs) govOutputs { kConfig.MaxMetadataLen = in.Config.MaxMetadataLen } + authority, ok := in.Authority[depinject.ModuleKey(in.ModuleKey).Name()] + if !ok { + authority = authtypes.NewModuleAddress(govtypes.ModuleName) + } + k := keeper.NewKeeper( in.Cdc, in.Key, @@ -198,7 +206,7 @@ func provideModule(in govInputs) govOutputs { in.StakingKeeper, in.MsgServiceRouter, kConfig, - authtypes.NewModuleAddress(govtypes.ModuleName).String(), + authority.String(), ) m := NewAppModule(in.Cdc, k, in.AccountKeeper, in.BankKeeper, in.LegacySubspace) hr := v1beta1.HandlerRoute{Handler: v1beta1.ProposalHandler, RouteKey: types.RouterKey} From 679f35f33942dd9f888131852aba4eb97c408960 Mon Sep 17 00:00:00 2001 From: atheesh Date: Tue, 26 Jul 2022 10:44:42 +0530 Subject: [PATCH 23/33] fix test --- x/params/module.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x/params/module.go b/x/params/module.go index 7d851f6fec09..7c68d7f0d394 100644 --- a/x/params/module.go +++ b/x/params/module.go @@ -26,7 +26,6 @@ import ( simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/params/client/cli" "github.com/cosmos/cosmos-sdk/x/params/keeper" - "github.com/cosmos/cosmos-sdk/x/params/simulation" "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/cosmos/cosmos-sdk/x/params/types/proposal" ) @@ -125,7 +124,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { // ProposalContents returns all the params content functions used to // simulate governance proposals. func (am AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent { - return simulation.ProposalContents(simState.ParamChanges) + return nil } // RandomizedParams creates randomized distribution param changes for the simulator. From ebf0cb75613651ef252fa77daf0b3980ad50c944 Mon Sep 17 00:00:00 2001 From: atheesh Date: Tue, 26 Jul 2022 12:34:45 +0530 Subject: [PATCH 24/33] add since --- api/cosmos/gov/v1/gov.pulsar.go | 2 ++ proto/cosmos/gov/v1/gov.proto | 2 ++ x/gov/types/v1/gov.pb.go | 2 ++ 3 files changed, 6 insertions(+) diff --git a/api/cosmos/gov/v1/gov.pulsar.go b/api/cosmos/gov/v1/gov.pulsar.go index 32da270571fa..e9563b8113d7 100644 --- a/api/cosmos/gov/v1/gov.pulsar.go +++ b/api/cosmos/gov/v1/gov.pulsar.go @@ -6580,6 +6580,8 @@ func (x *TallyParams) GetVetoThreshold() string { } // Params defines the parameters for the x/gov module. +// +// Since: cosmos-sdk 0.47 type Params struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/proto/cosmos/gov/v1/gov.proto b/proto/cosmos/gov/v1/gov.proto index bbcd66c58b18..181320afb972 100644 --- a/proto/cosmos/gov/v1/gov.proto +++ b/proto/cosmos/gov/v1/gov.proto @@ -132,6 +132,8 @@ message TallyParams { } // Params defines the parameters for the x/gov module. +// +// Since: cosmos-sdk 0.47 message Params { // Minimum deposit for a proposal to enter voting period. repeated cosmos.base.v1beta1.Coin min_deposit = 1 diff --git a/x/gov/types/v1/gov.pb.go b/x/gov/types/v1/gov.pb.go index 8d20909c613e..3bede1d59b62 100644 --- a/x/gov/types/v1/gov.pb.go +++ b/x/gov/types/v1/gov.pb.go @@ -665,6 +665,8 @@ func (m *TallyParams) GetVetoThreshold() string { } // Params defines the parameters for the x/gov module. +// +// Since: cosmos-sdk 0.47 type Params struct { // Minimum deposit for a proposal to enter voting period. MinDeposit []types.Coin `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3" json:"min_deposit,omitempty"` From be26dc7e28c8a33d0836f25afcb9ee3bdfa1840b Mon Sep 17 00:00:00 2001 From: atheesh Date: Wed, 27 Jul 2022 13:10:36 +0530 Subject: [PATCH 25/33] rename migration packages --- core/appconfig/debug_container.dot | 3 +++ x/genutil/migrations/v043/migrate.go | 12 +++++----- x/genutil/migrations/v046/migrate.go | 14 ++++++------ x/gov/keeper/grpc_query.go | 16 +++++++------- x/gov/keeper/grpc_query_test.go | 4 ++-- x/gov/keeper/migrations.go | 8 +++---- x/gov/migrations/{v042 => v1}/types.go | 2 +- x/gov/migrations/{v043 => v2}/json.go | 2 +- x/gov/migrations/{v043 => v2}/json_test.go | 6 ++--- x/gov/migrations/{v043 => v2}/keys.go | 2 +- x/gov/migrations/{v043 => v2}/store.go | 2 +- x/gov/migrations/{v043 => v2}/store_test.go | 22 +++++++++---------- x/gov/migrations/{v046 => v3}/convert.go | 2 +- x/gov/migrations/{v046 => v3}/convert_test.go | 12 +++++----- x/gov/migrations/{v046 => v3}/json.go | 2 +- x/gov/migrations/{v046 => v3}/json_test.go | 6 ++--- x/gov/migrations/{v046 => v3}/keys.go | 2 +- x/gov/migrations/{v046 => v3}/store.go | 22 +++++++++---------- x/gov/migrations/{v046 => v3}/store_test.go | 18 +++++++-------- 19 files changed, 80 insertions(+), 77 deletions(-) create mode 100644 core/appconfig/debug_container.dot rename x/gov/migrations/{v042 => v1}/types.go (99%) rename x/gov/migrations/{v043 => v2}/json.go (98%) rename x/gov/migrations/{v043 => v2}/json_test.go (96%) rename x/gov/migrations/{v043 => v2}/keys.go (84%) rename x/gov/migrations/{v043 => v2}/store.go (99%) rename x/gov/migrations/{v043 => v2}/store_test.go (80%) rename x/gov/migrations/{v046 => v3}/convert.go (99%) rename x/gov/migrations/{v046 => v3}/convert_test.go (93%) rename x/gov/migrations/{v046 => v3}/json.go (98%) rename x/gov/migrations/{v046 => v3}/json_test.go (97%) rename x/gov/migrations/{v046 => v3}/keys.go (91%) rename x/gov/migrations/{v046 => v3}/store.go (78%) rename x/gov/migrations/{v046 => v3}/store_test.go (88%) diff --git a/core/appconfig/debug_container.dot b/core/appconfig/debug_container.dot new file mode 100644 index 000000000000..f246d9aba416 --- /dev/null +++ b/core/appconfig/debug_container.dot @@ -0,0 +1,3 @@ +digraph "" { +} + diff --git a/x/genutil/migrations/v043/migrate.go b/x/genutil/migrations/v043/migrate.go index 16a433c9efb9..bbb78e5f0769 100644 --- a/x/genutil/migrations/v043/migrate.go +++ b/x/genutil/migrations/v043/migrate.go @@ -6,25 +6,25 @@ import ( v2bank "github.com/cosmos/cosmos-sdk/x/bank/migrations/v2" bank "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/genutil/types" - v042gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v042" - v043gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v043" + v1gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v1" + v2gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v2" gov "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) // Migrate migrates exported state from v0.40 to a v0.43 genesis state. func Migrate(appState types.AppMap, clientCtx client.Context) types.AppMap { // Migrate x/gov. - if appState[v042gov.ModuleName] != nil { + if appState[v1gov.ModuleName] != nil { // unmarshal relative source genesis application state var oldGovState gov.GenesisState - clientCtx.Codec.MustUnmarshalJSON(appState[v042gov.ModuleName], &oldGovState) + clientCtx.Codec.MustUnmarshalJSON(appState[v1gov.ModuleName], &oldGovState) // delete deprecated x/gov genesis state - delete(appState, v042gov.ModuleName) + delete(appState, v1gov.ModuleName) // Migrate relative source genesis application state and marshal it into // the respective key. - appState[v043gov.ModuleName] = clientCtx.Codec.MustMarshalJSON(v043gov.MigrateJSON(&oldGovState)) + appState[v2gov.ModuleName] = clientCtx.Codec.MustMarshalJSON(v2gov.MigrateJSON(&oldGovState)) } if appState[v1bank.ModuleName] != nil { diff --git a/x/genutil/migrations/v046/migrate.go b/x/genutil/migrations/v046/migrate.go index 52a73ec03bc7..c13a24746627 100644 --- a/x/genutil/migrations/v046/migrate.go +++ b/x/genutil/migrations/v046/migrate.go @@ -3,8 +3,8 @@ package v046 import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/x/genutil/types" - v043gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v043" - v046gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v046" + v2gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v2" + v3gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v3" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" stakingv2 "github.com/cosmos/cosmos-sdk/x/staking/migrations/v2" stakingv3 "github.com/cosmos/cosmos-sdk/x/staking/migrations/v3" @@ -14,21 +14,21 @@ import ( // Migrate migrates exported state from v0.43 to a v0.46 genesis state. func Migrate(appState types.AppMap, clientCtx client.Context) types.AppMap { // Migrate x/gov. - if appState[v043gov.ModuleName] != nil { + if appState[v2gov.ModuleName] != nil { // unmarshal relative source genesis application state var old govv1beta1.GenesisState - clientCtx.Codec.MustUnmarshalJSON(appState[v043gov.ModuleName], &old) + clientCtx.Codec.MustUnmarshalJSON(appState[v2gov.ModuleName], &old) // delete deprecated x/gov genesis state - delete(appState, v043gov.ModuleName) + delete(appState, v2gov.ModuleName) // Migrate relative source genesis application state and marshal it into // the respective key. - new, err := v046gov.MigrateJSON(&old) + new, err := v3gov.MigrateJSON(&old) if err != nil { panic(err) } - appState[v046gov.ModuleName] = clientCtx.Codec.MustMarshalJSON(new) + appState[v3gov.ModuleName] = clientCtx.Codec.MustMarshalJSON(new) } // Migrate x/staking. diff --git a/x/gov/keeper/grpc_query.go b/x/gov/keeper/grpc_query.go index ca22848b8659..a8e859798edd 100644 --- a/x/gov/keeper/grpc_query.go +++ b/x/gov/keeper/grpc_query.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" - v046 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v046" + v3 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v3" "github.com/cosmos/cosmos-sdk/x/gov/types" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" @@ -298,7 +298,7 @@ func (q legacyQueryServer) Proposal(c context.Context, req *v1beta1.QueryProposa return nil, err } - proposal, err := v046.ConvertToLegacyProposal(*resp.Proposal) + proposal, err := v3.ConvertToLegacyProposal(*resp.Proposal) if err != nil { return nil, err } @@ -319,7 +319,7 @@ func (q legacyQueryServer) Proposals(c context.Context, req *v1beta1.QueryPropos legacyProposals := make([]v1beta1.Proposal, len(resp.Proposals)) for idx, proposal := range resp.Proposals { - legacyProposals[idx], err = v046.ConvertToLegacyProposal(*proposal) + legacyProposals[idx], err = v3.ConvertToLegacyProposal(*proposal) if err != nil { return nil, err } @@ -340,7 +340,7 @@ func (q legacyQueryServer) Vote(c context.Context, req *v1beta1.QueryVoteRequest return nil, err } - vote, err := v046.ConvertToLegacyVote(*resp.Vote) + vote, err := v3.ConvertToLegacyVote(*resp.Vote) if err != nil { return nil, err } @@ -359,7 +359,7 @@ func (q legacyQueryServer) Votes(c context.Context, req *v1beta1.QueryVotesReque votes := make([]v1beta1.Vote, len(resp.Votes)) for i, v := range resp.Votes { - votes[i], err = v046.ConvertToLegacyVote(*v) + votes[i], err = v3.ConvertToLegacyVote(*v) if err != nil { return nil, err } @@ -420,7 +420,7 @@ func (q legacyQueryServer) Deposit(c context.Context, req *v1beta1.QueryDepositR return nil, err } - deposit := v046.ConvertToLegacyDeposit(resp.Deposit) + deposit := v3.ConvertToLegacyDeposit(resp.Deposit) return &v1beta1.QueryDepositResponse{Deposit: deposit}, nil } @@ -434,7 +434,7 @@ func (q legacyQueryServer) Deposits(c context.Context, req *v1beta1.QueryDeposit } deposits := make([]v1beta1.Deposit, len(resp.Deposits)) for idx, deposit := range resp.Deposits { - deposits[idx] = v046.ConvertToLegacyDeposit(deposit) + deposits[idx] = v3.ConvertToLegacyDeposit(deposit) } return &v1beta1.QueryDepositsResponse{Deposits: deposits, Pagination: resp.Pagination}, nil @@ -448,7 +448,7 @@ func (q legacyQueryServer) TallyResult(c context.Context, req *v1beta1.QueryTall return nil, err } - tally, err := v046.ConvertToLegacyTallyResult(resp.Tally) + tally, err := v3.ConvertToLegacyTallyResult(resp.Tally) if err != nil { return nil, err } diff --git a/x/gov/keeper/grpc_query_test.go b/x/gov/keeper/grpc_query_test.go index 8ae60dd0f2d3..81017d0b10bf 100644 --- a/x/gov/keeper/grpc_query_test.go +++ b/x/gov/keeper/grpc_query_test.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" - v046 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v046" + v3 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v3" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) @@ -131,7 +131,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryProposal() { suite.Require().NoError(err) suite.Require().NotEmpty(submittedProposal) - expProposal, err = v046.ConvertToLegacyProposal(submittedProposal) + expProposal, err = v3.ConvertToLegacyProposal(submittedProposal) suite.Require().NoError(err) }, true, diff --git a/x/gov/keeper/migrations.go b/x/gov/keeper/migrations.go index 7bbde01a8d82..ecffe318ecf5 100644 --- a/x/gov/keeper/migrations.go +++ b/x/gov/keeper/migrations.go @@ -3,8 +3,8 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/gov/exported" - v043 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v043" - v046 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v046" + v2 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v2" + v3 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v3" ) // Migrator is a struct for handling in-place store migrations. @@ -23,10 +23,10 @@ func NewMigrator(keeper *Keeper, legacySubspace exported.ParamSubspace) Migrator // Migrate1to2 migrates from version 1 to 2. func (m Migrator) Migrate1to2(ctx sdk.Context) error { - return v043.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc) + return v2.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc) } // Migrate2to3 migrates from version 2 to 3. func (m Migrator) Migrate2to3(ctx sdk.Context) error { - return v046.MigrateStore(ctx, m.keeper.storeKey, m.legacySubspace, m.keeper.cdc) + return v3.MigrateStore(ctx, m.keeper.storeKey, m.legacySubspace, m.keeper.cdc) } diff --git a/x/gov/migrations/v042/types.go b/x/gov/migrations/v1/types.go similarity index 99% rename from x/gov/migrations/v042/types.go rename to x/gov/migrations/v1/types.go index 417b2401fac6..48c5a75bf067 100644 --- a/x/gov/migrations/v042/types.go +++ b/x/gov/migrations/v1/types.go @@ -1,4 +1,4 @@ -package v042 +package v1 // Package v040 is copy-pasted from: // https://github.com/cosmos/cosmos-sdk/blob/v0.41.0/x/gov/types/keys.go diff --git a/x/gov/migrations/v043/json.go b/x/gov/migrations/v2/json.go similarity index 98% rename from x/gov/migrations/v043/json.go rename to x/gov/migrations/v2/json.go index f5eca24d9a39..8eab93981b1a 100644 --- a/x/gov/migrations/v043/json.go +++ b/x/gov/migrations/v2/json.go @@ -1,4 +1,4 @@ -package v043 +package v2 import ( "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" diff --git a/x/gov/migrations/v043/json_test.go b/x/gov/migrations/v2/json_test.go similarity index 96% rename from x/gov/migrations/v043/json_test.go rename to x/gov/migrations/v2/json_test.go index 4202752aada6..3eb234c40f1c 100644 --- a/x/gov/migrations/v043/json_test.go +++ b/x/gov/migrations/v2/json_test.go @@ -1,4 +1,4 @@ -package v043_test +package v2_test import ( "encoding/json" @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" - v043gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v043" + v2 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v2" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) @@ -32,7 +32,7 @@ func TestMigrateJSON(t *testing.T) { }, } - migrated := v043gov.MigrateJSON(govGenState) + migrated := v2.MigrateJSON(govGenState) bz, err := clientCtx.Codec.MarshalJSON(migrated) require.NoError(t, err) diff --git a/x/gov/migrations/v043/keys.go b/x/gov/migrations/v2/keys.go similarity index 84% rename from x/gov/migrations/v043/keys.go rename to x/gov/migrations/v2/keys.go index 8a2528ce5cdf..fcedde0a5f46 100644 --- a/x/gov/migrations/v043/keys.go +++ b/x/gov/migrations/v2/keys.go @@ -1,4 +1,4 @@ -package v043 +package v2 const ( // ModuleName is the name of the module diff --git a/x/gov/migrations/v043/store.go b/x/gov/migrations/v2/store.go similarity index 99% rename from x/gov/migrations/v043/store.go rename to x/gov/migrations/v2/store.go index 72658f39c268..916f4dc3cef5 100644 --- a/x/gov/migrations/v043/store.go +++ b/x/gov/migrations/v2/store.go @@ -1,4 +1,4 @@ -package v043 +package v2 import ( "fmt" diff --git a/x/gov/migrations/v043/store_test.go b/x/gov/migrations/v2/store_test.go similarity index 80% rename from x/gov/migrations/v043/store_test.go rename to x/gov/migrations/v2/store_test.go index 1ae662d818eb..05f217f390cc 100644 --- a/x/gov/migrations/v043/store_test.go +++ b/x/gov/migrations/v2/store_test.go @@ -1,4 +1,4 @@ -package v043_test +package v2_test import ( "bytes" @@ -11,8 +11,8 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" - v042gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v042" - v043gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v043" + v1 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v1" + v2 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v2" "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) @@ -40,32 +40,32 @@ func TestMigrateStore(t *testing.T) { }{ { "ProposalKey", - v042gov.ProposalKey(proposalID), dummyValue, + v1.ProposalKey(proposalID), dummyValue, types.ProposalKey(proposalID), dummyValue, }, { "ActiveProposalQueue", - v042gov.ActiveProposalQueueKey(proposalID, now), dummyValue, + v1.ActiveProposalQueueKey(proposalID, now), dummyValue, types.ActiveProposalQueueKey(proposalID, now), dummyValue, }, { "InactiveProposalQueue", - v042gov.InactiveProposalQueueKey(proposalID, now), dummyValue, + v1.InactiveProposalQueueKey(proposalID, now), dummyValue, types.InactiveProposalQueueKey(proposalID, now), dummyValue, }, { "ProposalIDKey", - v042gov.ProposalIDKey, dummyValue, + v1.ProposalIDKey, dummyValue, types.ProposalIDKey, dummyValue, }, { "DepositKey", - v042gov.DepositKey(proposalID, addr1), dummyValue, + v1.DepositKey(proposalID, addr1), dummyValue, types.DepositKey(proposalID, addr1), dummyValue, }, { "VotesKeyPrefix", - v042gov.VoteKey(proposalID, addr1), oldVoteValue, + v1.VoteKey(proposalID, addr1), oldVoteValue, types.VoteKey(proposalID, addr1), newVoteValue, }, } @@ -75,8 +75,8 @@ func TestMigrateStore(t *testing.T) { store.Set(tc.oldKey, tc.oldValue) } - // Run migrations. - err := v043gov.MigrateStore(ctx, govKey, cdc) + // Run migratio + err := v2.MigrateStore(ctx, govKey, cdc) require.NoError(t, err) // Make sure the new keys are set and old keys are deleted. diff --git a/x/gov/migrations/v046/convert.go b/x/gov/migrations/v3/convert.go similarity index 99% rename from x/gov/migrations/v046/convert.go rename to x/gov/migrations/v3/convert.go index 5cc159e6a37d..0e7ae37359d4 100644 --- a/x/gov/migrations/v046/convert.go +++ b/x/gov/migrations/v3/convert.go @@ -1,4 +1,4 @@ -package v046 +package v3 import ( "fmt" diff --git a/x/gov/migrations/v046/convert_test.go b/x/gov/migrations/v3/convert_test.go similarity index 93% rename from x/gov/migrations/v046/convert_test.go rename to x/gov/migrations/v3/convert_test.go index 64375e796aef..c50d1191fb81 100644 --- a/x/gov/migrations/v046/convert_test.go +++ b/x/gov/migrations/v3/convert_test.go @@ -1,4 +1,4 @@ -package v046_test +package v3_test import ( "testing" @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx" - v046 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v046" + v3 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v3" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/stretchr/testify/require" @@ -46,7 +46,7 @@ func TestConvertToLegacyProposal(t *testing.T) { for name, tc := range testCases { t.Run(name, func(t *testing.T) { proposal.FinalTallyResult = &tc.tallyResult - v1beta1Proposal, err := v046.ConvertToLegacyProposal(proposal) + v1beta1Proposal, err := v3.ConvertToLegacyProposal(proposal) if tc.expErr { require.Error(t, err) } else { @@ -113,7 +113,7 @@ func TestConvertToLegacyTallyResult(t *testing.T) { } for name, tc := range testCases { t.Run(name, func(t *testing.T) { - _, err := v046.ConvertToLegacyTallyResult(&tc.tallyResult) + _, err := v3.ConvertToLegacyTallyResult(&tc.tallyResult) if tc.expErr { require.Error(t, err) } else { @@ -146,7 +146,7 @@ func TestConvertToLegacyVote(t *testing.T) { for name, tc := range testCases { t.Run(name, func(t *testing.T) { vote.Options = tc.options - v1beta1Vote, err := v046.ConvertToLegacyVote(vote) + v1beta1Vote, err := v3.ConvertToLegacyVote(vote) if tc.expErr { require.Error(t, err) } else { @@ -167,7 +167,7 @@ func TestConvertToLegacyDeposit(t *testing.T) { Amount: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(1))), } - v1beta1Deposit := v046.ConvertToLegacyDeposit(&deposit) + v1beta1Deposit := v3.ConvertToLegacyDeposit(&deposit) require.Equal(t, v1beta1Deposit.ProposalId, deposit.ProposalId) require.Equal(t, v1beta1Deposit.Depositor, deposit.Depositor) require.Equal(t, v1beta1Deposit.Amount[0], deposit.Amount[0]) diff --git a/x/gov/migrations/v046/json.go b/x/gov/migrations/v3/json.go similarity index 98% rename from x/gov/migrations/v046/json.go rename to x/gov/migrations/v3/json.go index 763875f0827e..94116b776564 100644 --- a/x/gov/migrations/v046/json.go +++ b/x/gov/migrations/v3/json.go @@ -1,4 +1,4 @@ -package v046 +package v3 import ( v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" diff --git a/x/gov/migrations/v046/json_test.go b/x/gov/migrations/v3/json_test.go similarity index 97% rename from x/gov/migrations/v046/json_test.go rename to x/gov/migrations/v3/json_test.go index 02187e2a9885..0507429cdf53 100644 --- a/x/gov/migrations/v046/json_test.go +++ b/x/gov/migrations/v3/json_test.go @@ -1,4 +1,4 @@ -package v046_test +package v3_test import ( "encoding/json" @@ -13,7 +13,7 @@ import ( "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - v046 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v046" + v3 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v3" "github.com/cosmos/cosmos-sdk/x/gov/types" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" @@ -51,7 +51,7 @@ func TestMigrateJSON(t *testing.T) { v1beta1.Vote{ProposalId: 2, Voter: voter.String(), Options: v1beta1.NewNonSplitVoteOption(v1beta1.OptionNo)}, } - migrated, err := v046.MigrateJSON(govGenState) + migrated, err := v3.MigrateJSON(govGenState) require.NoError(t, err) // Make sure the migrated proposal's Msg signer is the gov acct. diff --git a/x/gov/migrations/v046/keys.go b/x/gov/migrations/v3/keys.go similarity index 91% rename from x/gov/migrations/v046/keys.go rename to x/gov/migrations/v3/keys.go index caa7c65cd002..9ccb1c2840f4 100644 --- a/x/gov/migrations/v046/keys.go +++ b/x/gov/migrations/v3/keys.go @@ -1,4 +1,4 @@ -package v046 +package v3 const ( // ModuleName is the name of the module diff --git a/x/gov/migrations/v046/store.go b/x/gov/migrations/v3/store.go similarity index 78% rename from x/gov/migrations/v046/store.go rename to x/gov/migrations/v3/store.go index 6d7f502fb27a..5344d0a6dd35 100644 --- a/x/gov/migrations/v046/store.go +++ b/x/gov/migrations/v3/store.go @@ -1,4 +1,4 @@ -package v046 +package v3 import ( "github.com/cosmos/cosmos-sdk/codec" @@ -6,15 +6,15 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/gov/exported" - v042 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v042" - v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + v1 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v1" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) // migrateProposals migrates all legacy proposals into MsgExecLegacyContent // proposals. func migrateProposals(store sdk.KVStore, cdc codec.BinaryCodec) error { - propStore := prefix.NewStore(store, v042.ProposalsKeyPrefix) + propStore := prefix.NewStore(store, v1.ProposalsKeyPrefix) iter := propStore.Iterator(nil, nil) defer iter.Close() @@ -45,14 +45,14 @@ func migrateProposals(store sdk.KVStore, cdc codec.BinaryCodec) error { func migrateParams(ctx sdk.Context, storeKey storetypes.StoreKey, legacySubspace exported.ParamSubspace, cdc codec.BinaryCodec) error { store := ctx.KVStore(storeKey) - dp := v1.DepositParams{} - vp := v1.VotingParams{} - tp := v1.TallyParams{} - legacySubspace.Get(ctx, v1.ParamStoreKeyDepositParams, &dp) - legacySubspace.Get(ctx, v1.ParamStoreKeyVotingParams, &vp) - legacySubspace.Get(ctx, v1.ParamStoreKeyTallyParams, &tp) + dp := govv1.DepositParams{} + vp := govv1.VotingParams{} + tp := govv1.TallyParams{} + legacySubspace.Get(ctx, govv1.ParamStoreKeyDepositParams, &dp) + legacySubspace.Get(ctx, govv1.ParamStoreKeyVotingParams, &vp) + legacySubspace.Get(ctx, govv1.ParamStoreKeyTallyParams, &tp) - params := v1.NewParams( + params := govv1.NewParams( dp.MinDeposit, *dp.MaxDepositPeriod, *vp.VotingPeriod, diff --git a/x/gov/migrations/v046/store_test.go b/x/gov/migrations/v3/store_test.go similarity index 88% rename from x/gov/migrations/v046/store_test.go rename to x/gov/migrations/v3/store_test.go index ee77e4b59c91..9a59e0230d4b 100644 --- a/x/gov/migrations/v046/store_test.go +++ b/x/gov/migrations/v3/store_test.go @@ -1,4 +1,4 @@ -package v046_test +package v3_test import ( "testing" @@ -9,8 +9,8 @@ import ( "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" - v042gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v042" - v046gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v046" + v1gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v1" + v3gov "github.com/cosmos/cosmos-sdk/x/gov/migrations/v3" v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" @@ -70,26 +70,26 @@ func TestMigrateStore(t *testing.T) { prop2Bz, err := cdc.Marshal(&prop2) require.NoError(t, err) - store.Set(v042gov.ProposalKey(prop1.ProposalId), prop1Bz) - store.Set(v042gov.ProposalKey(prop2.ProposalId), prop2Bz) + store.Set(v1gov.ProposalKey(prop1.ProposalId), prop1Bz) + store.Set(v1gov.ProposalKey(prop2.ProposalId), prop2Bz) legacySubspace := newMockSubspace(v1.DefaultParams()) // Run migrations. - err = v046gov.MigrateStore(ctx, govKey, legacySubspace, cdc) + err = v3gov.MigrateStore(ctx, govKey, legacySubspace, cdc) require.NoError(t, err) var newProp1 v1.Proposal - err = cdc.Unmarshal(store.Get(v042gov.ProposalKey(prop1.ProposalId)), &newProp1) + err = cdc.Unmarshal(store.Get(v1gov.ProposalKey(prop1.ProposalId)), &newProp1) require.NoError(t, err) compareProps(t, prop1, newProp1) var newProp2 v1.Proposal - err = cdc.Unmarshal(store.Get(v042gov.ProposalKey(prop2.ProposalId)), &newProp2) + err = cdc.Unmarshal(store.Get(v1gov.ProposalKey(prop2.ProposalId)), &newProp2) require.NoError(t, err) compareProps(t, prop2, newProp2) var params v1.Params - bz := store.Get(v046gov.ParamsKey) + bz := store.Get(v3gov.ParamsKey) require.NoError(t, cdc.Unmarshal(bz, ¶ms)) require.NotNil(t, params) require.Equal(t, legacySubspace.dp.MinDeposit, params.MinDeposit) From d1d9aa6a580e7a15256c6c6eae6c4fc09d47e3fb Mon Sep 17 00:00:00 2001 From: atheesh Date: Thu, 28 Jul 2022 16:07:10 +0530 Subject: [PATCH 26/33] review changes --- CHANGELOG.md | 1 + core/appconfig/debug_container.dot | 3 --- proto/cosmos/gov/v1/genesis.proto | 2 ++ proto/cosmos/gov/v1/gov.proto | 12 +++++------- proto/cosmos/gov/v1/query.proto | 2 ++ x/gov/types/v1/codec.go | 2 +- x/gov/types/v1/genesis.pb.go | 2 ++ x/gov/types/v1/params.go | 12 +++--------- 8 files changed, 16 insertions(+), 20 deletions(-) delete mode 100644 core/appconfig/debug_container.dot diff --git a/CHANGELOG.md b/CHANGELOG.md index dbce320ac100..b0a46c6279f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -85,6 +85,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/staking) [#12409](https://github.com/cosmos/cosmos-sdk/pull/12409) `x/staking` module `SetParams` keeper method definition is now updated to return `error`. * (x/crisis) [#12445](https://github.com/cosmos/cosmos-sdk/pull/12445) `x/crisis` module `SetConstantFee` keeper method definition is now updated to return `error`. * (x/gov) [#12631](https://github.com/cosmos/cosmos-sdk/pull/12631) `x/gov` module refactored to use `Params` as single struct instead of `DepositParams`, `TallyParams` & `VotingParams`. +* (x/gov) [#12631](https://github.com/cosmos/cosmos-sdk/pull/12631) Migrate `x/gov` to self-managed parameters and deprecate it's usage of `x/params`. * (x/bank) [#12630](https://github.com/cosmos/cosmos-sdk/pull/12630) `x/bank` module `SetParams` keeper method definition is now updated to return `error`. * (x/bank) [\#11859](https://github.com/cosmos/cosmos-sdk/pull/11859) Move the SendEnabled information out of the Params and into the state store directly. The information can now be accessed using the BankKeeper. diff --git a/core/appconfig/debug_container.dot b/core/appconfig/debug_container.dot deleted file mode 100644 index f246d9aba416..000000000000 --- a/core/appconfig/debug_container.dot +++ /dev/null @@ -1,3 +0,0 @@ -digraph "" { -} - diff --git a/proto/cosmos/gov/v1/genesis.proto b/proto/cosmos/gov/v1/genesis.proto index a3e76d7f0c31..0a87271b2e51 100644 --- a/proto/cosmos/gov/v1/genesis.proto +++ b/proto/cosmos/gov/v1/genesis.proto @@ -27,5 +27,7 @@ message GenesisState { // tally_params defines all the paramaters of related to tally. TallyParams tally_params = 7 [deprecated=true]; // params defines all the paramaters of x/gov module. + // + // Since: cosmos-sdk 0.47 Params params = 8; } diff --git a/proto/cosmos/gov/v1/gov.proto b/proto/cosmos/gov/v1/gov.proto index 181320afb972..8c1e64860026 100644 --- a/proto/cosmos/gov/v1/gov.proto +++ b/proto/cosmos/gov/v1/gov.proto @@ -136,25 +136,23 @@ message TallyParams { // Since: cosmos-sdk 0.47 message Params { // Minimum deposit for a proposal to enter voting period. - repeated cosmos.base.v1beta1.Coin min_deposit = 1 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "min_deposit,omitempty"]; + repeated cosmos.base.v1beta1.Coin min_deposit = 1 [(gogoproto.nullable) = false]; // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 // months. - google.protobuf.Duration max_deposit_period = 2 - [(gogoproto.stdduration) = true, (gogoproto.jsontag) = "max_deposit_period,omitempty"]; + google.protobuf.Duration max_deposit_period = 2 [(gogoproto.stdduration) = true]; // Length of the voting period. google.protobuf.Duration voting_period = 3 [(gogoproto.stdduration) = true]; // Minimum percentage of total stake needed to vote for a result to be // considered valid. - string quorum = 4 [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.jsontag) = "quorum,omitempty"]; + string quorum = 4 [(cosmos_proto.scalar) = "cosmos.Dec"]; // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - string threshold = 5 [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.jsontag) = "threshold,omitempty"]; + string threshold = 5 [(cosmos_proto.scalar) = "cosmos.Dec"]; // Minimum value of Veto votes to Total votes ratio for proposal to be // vetoed. Default value: 1/3. - string veto_threshold = 6 [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.jsontag) = "veto_threshold,omitempty"]; + string veto_threshold = 6 [(cosmos_proto.scalar) = "cosmos.Dec"]; } diff --git a/proto/cosmos/gov/v1/query.proto b/proto/cosmos/gov/v1/query.proto index 8c81066019b8..5890bcbea7bb 100644 --- a/proto/cosmos/gov/v1/query.proto +++ b/proto/cosmos/gov/v1/query.proto @@ -140,6 +140,8 @@ message QueryParamsResponse { // tally_params defines the parameters related to tally. TallyParams tally_params = 3 [deprecated=true]; // params defines all the paramaters of x/gov module. + // + // Since: cosmos-sdk 0.47 Params params = 4; } diff --git a/x/gov/types/v1/codec.go b/x/gov/types/v1/codec.go index 51bc036a194d..8b45b2098346 100644 --- a/x/gov/types/v1/codec.go +++ b/x/gov/types/v1/codec.go @@ -19,7 +19,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { legacy.RegisterAminoMsg(cdc, &MsgVote{}, "cosmos-sdk/v1/MsgVote") legacy.RegisterAminoMsg(cdc, &MsgVoteWeighted{}, "cosmos-sdk/v1/MsgVoteWeighted") legacy.RegisterAminoMsg(cdc, &MsgExecLegacyContent{}, "cosmos-sdk/v1/MsgExecLegacyContent") - legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "cosmos-sdk/v1/MsgUpdateParams") + legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "cosmos-sdk/x/gov/v1/MsgUpdateParams") } func RegisterInterfaces(registry codectypes.InterfaceRegistry) { diff --git a/x/gov/types/v1/genesis.pb.go b/x/gov/types/v1/genesis.pb.go index 0d31b301b393..5d0d3dea13e7 100644 --- a/x/gov/types/v1/genesis.pb.go +++ b/x/gov/types/v1/genesis.pb.go @@ -42,6 +42,8 @@ type GenesisState struct { // tally_params defines all the paramaters of related to tally. TallyParams *TallyParams `protobuf:"bytes,7,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` // Deprecated: Do not use. // params defines all the paramaters of x/gov module. + // + // Since: cosmos-sdk 0.47 Params *Params `protobuf:"bytes,8,opt,name=params,proto3" json:"params,omitempty"` } diff --git a/x/gov/types/v1/params.go b/x/gov/types/v1/params.go index 547b0d814e27..a41799f05cb8 100644 --- a/x/gov/types/v1/params.go +++ b/x/gov/types/v1/params.go @@ -20,13 +20,7 @@ var ( DefaultVetoThreshold = sdk.NewDecWithPrec(334, 3) ) -func (p Params) Equal(p2 Params) bool { - return sdk.Coins(p.MinDeposit).IsEqual(p2.MinDeposit) && p.MaxDepositPeriod == p2.MaxDepositPeriod && - p.Quorum == p2.Quorum && p.Threshold == p2.Threshold && p.VetoThreshold == p2.VetoThreshold && - p.VotingPeriod == p2.VotingPeriod -} - -// NewDepositParams creates a new DepositParams object +// Deprecated: NewDepositParams creates a new DepositParams object func NewDepositParams(minDeposit sdk.Coins, maxDepositPeriod *time.Duration) DepositParams { return DepositParams{ MinDeposit: minDeposit, @@ -34,7 +28,7 @@ func NewDepositParams(minDeposit sdk.Coins, maxDepositPeriod *time.Duration) Dep } } -// NewTallyParams creates a new TallyParams object +// Deprecated: NewTallyParams creates a new TallyParams object func NewTallyParams(quorum, threshold, vetoThreshold string) TallyParams { return TallyParams{ Quorum: quorum, @@ -43,7 +37,7 @@ func NewTallyParams(quorum, threshold, vetoThreshold string) TallyParams { } } -// NewVotingParams creates a new VotingParams object +// Deprecated: NewVotingParams creates a new VotingParams object func NewVotingParams(votingPeriod *time.Duration) VotingParams { return VotingParams{ VotingPeriod: votingPeriod, From 8d2e954acfa1642b346dea7379a10913d77e200b Mon Sep 17 00:00:00 2001 From: atheesh Date: Thu, 28 Jul 2022 16:07:50 +0530 Subject: [PATCH 27/33] proto --- api/cosmos/gov/v1/genesis.pulsar.go | 2 + api/cosmos/gov/v1/gov.pulsar.go | 48 ++++----- api/cosmos/gov/v1/query.pulsar.go | 2 + x/gov/types/v1/gov.pb.go | 149 ++++++++++++++-------------- x/gov/types/v1/query.pb.go | 2 + 5 files changed, 101 insertions(+), 102 deletions(-) diff --git a/api/cosmos/gov/v1/genesis.pulsar.go b/api/cosmos/gov/v1/genesis.pulsar.go index 0259ac955bb7..645e02ec192e 100644 --- a/api/cosmos/gov/v1/genesis.pulsar.go +++ b/api/cosmos/gov/v1/genesis.pulsar.go @@ -1191,6 +1191,8 @@ type GenesisState struct { // Deprecated: Do not use. TallyParams *TallyParams `protobuf:"bytes,7,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` // params defines all the paramaters of x/gov module. + // + // Since: cosmos-sdk 0.47 Params *Params `protobuf:"bytes,8,opt,name=params,proto3" json:"params,omitempty"` } diff --git a/api/cosmos/gov/v1/gov.pulsar.go b/api/cosmos/gov/v1/gov.pulsar.go index e9563b8113d7..b1d9862b4201 100644 --- a/api/cosmos/gov/v1/gov.pulsar.go +++ b/api/cosmos/gov/v1/gov.pulsar.go @@ -6795,36 +6795,28 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{ 0x18, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0xec, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x59, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0xec, 0x02, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, - 0x6e, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x15, 0x6d, 0x69, 0x6e, 0x5f, 0x64, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, - 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x6d, 0x0a, 0x12, - 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, - 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x24, 0xea, 0xde, 0x1f, 0x1c, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x2c, 0x6f, 0x6d, 0x69, 0x74, - 0x65, 0x6d, 0x70, 0x74, 0x79, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x44, 0x0a, 0x0d, 0x76, - 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, - 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, - 0x64, 0x12, 0x3a, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x22, 0xea, 0xde, 0x1f, 0x10, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x2c, 0x6f, 0x6d, - 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x43, 0x0a, - 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x25, 0xea, 0xde, 0x1f, 0x13, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2c, - 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, - 0x6c, 0x64, 0x12, 0x51, 0x0a, 0x0e, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, - 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xea, 0xde, 0x1f, 0x18, - 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2c, 0x6f, - 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, + 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x12, 0x4d, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, + 0x52, 0x10, 0x6d, 0x61, 0x78, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x12, 0x44, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, + 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x26, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, + 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, + 0x12, 0x2c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x44, 0x65, 0x63, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x35, + 0x0a, 0x0e, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x2a, 0x89, 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, diff --git a/api/cosmos/gov/v1/query.pulsar.go b/api/cosmos/gov/v1/query.pulsar.go index 4b307a5f9ac3..677db1c20190 100644 --- a/api/cosmos/gov/v1/query.pulsar.go +++ b/api/cosmos/gov/v1/query.pulsar.go @@ -8320,6 +8320,8 @@ type QueryParamsResponse struct { // Deprecated: Do not use. TallyParams *TallyParams `protobuf:"bytes,3,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` // params defines all the paramaters of x/gov module. + // + // Since: cosmos-sdk 0.47 Params *Params `protobuf:"bytes,4,opt,name=params,proto3" json:"params,omitempty"` } diff --git a/x/gov/types/v1/gov.pb.go b/x/gov/types/v1/gov.pb.go index 3bede1d59b62..8cbdf616f9f1 100644 --- a/x/gov/types/v1/gov.pb.go +++ b/x/gov/types/v1/gov.pb.go @@ -669,7 +669,7 @@ func (m *TallyParams) GetVetoThreshold() string { // Since: cosmos-sdk 0.47 type Params struct { // Minimum deposit for a proposal to enter voting period. - MinDeposit []types.Coin `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3" json:"min_deposit,omitempty"` + MinDeposit []types.Coin `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3" json:"min_deposit"` // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 // months. MaxDepositPeriod *time.Duration `protobuf:"bytes,2,opt,name=max_deposit_period,json=maxDepositPeriod,proto3,stdduration" json:"max_deposit_period,omitempty"` @@ -777,79 +777,80 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1/gov.proto", fileDescriptor_e05cb1c0d030febb) } var fileDescriptor_e05cb1c0d030febb = []byte{ - // 1138 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0xcd, 0x6e, 0xdb, 0x46, - 0x17, 0x35, 0x25, 0x5a, 0x96, 0xaf, 0x2c, 0x85, 0xdf, 0xc4, 0x5f, 0x4d, 0x3b, 0xb1, 0xe4, 0x08, - 0x6d, 0xe1, 0x3a, 0xb5, 0x54, 0x27, 0x68, 0x0b, 0x34, 0x2b, 0xc9, 0x62, 0x6a, 0x19, 0x86, 0xa5, - 0x92, 0x8c, 0x8c, 0x74, 0x43, 0x50, 0x26, 0x23, 0x11, 0x15, 0x39, 0x2a, 0x67, 0xa4, 0x58, 0x8f, - 0xd0, 0x5d, 0x96, 0x05, 0xfa, 0x1a, 0x41, 0x9f, 0x21, 0xab, 0x22, 0xc8, 0xa2, 0x3f, 0x1b, 0xb5, - 0xb5, 0x77, 0x46, 0x1f, 0xa2, 0xe0, 0x70, 0x68, 0x49, 0xb4, 0x03, 0x1b, 0x4d, 0x57, 0x5d, 0x89, - 0xbc, 0xf7, 0x9c, 0x73, 0xef, 0xcc, 0x3d, 0x1c, 0x0d, 0xac, 0x1c, 0x63, 0xe2, 0x62, 0x52, 0xee, - 0xe0, 0x61, 0x79, 0xb8, 0x13, 0xfc, 0x94, 0xfa, 0x3e, 0xa6, 0x18, 0x65, 0xc3, 0x44, 0x29, 0x88, - 0x0c, 0x77, 0xd6, 0xf2, 0x1c, 0xd7, 0x36, 0x89, 0x5d, 0x1e, 0xee, 0xb4, 0x6d, 0x6a, 0xee, 0x94, - 0x8f, 0xb1, 0xe3, 0x85, 0xf0, 0xb5, 0xe5, 0x0e, 0xee, 0x60, 0xf6, 0x58, 0x0e, 0x9e, 0x78, 0xb4, - 0xd0, 0xc1, 0xb8, 0xd3, 0xb3, 0xcb, 0xec, 0xad, 0x3d, 0x78, 0x56, 0xa6, 0x8e, 0x6b, 0x13, 0x6a, - 0xba, 0x7d, 0x0e, 0x58, 0x8d, 0x03, 0x4c, 0x6f, 0xc4, 0x53, 0xf9, 0x78, 0xca, 0x1a, 0xf8, 0x26, - 0x75, 0x70, 0x54, 0x71, 0x35, 0xec, 0xc8, 0x08, 0x8b, 0xf2, 0x6e, 0xd9, 0x4b, 0x11, 0x03, 0x3a, - 0xb2, 0x9d, 0x4e, 0x97, 0xda, 0x56, 0x0b, 0x53, 0xbb, 0xd1, 0x0f, 0x68, 0x68, 0x07, 0x52, 0x98, - 0x3d, 0xc9, 0xc2, 0x86, 0xb0, 0x99, 0x7b, 0xb0, 0x5a, 0x9a, 0x59, 0x62, 0x69, 0x02, 0x55, 0x39, - 0x10, 0x7d, 0x08, 0xa9, 0xe7, 0x4c, 0x48, 0x4e, 0x6c, 0x08, 0x9b, 0x8b, 0xd5, 0xdc, 0x9b, 0x97, - 0xdb, 0xc0, 0x59, 0x35, 0xfb, 0x58, 0xe5, 0xd9, 0xe2, 0x0f, 0x02, 0x2c, 0xd4, 0xec, 0x3e, 0x26, - 0x0e, 0x45, 0x05, 0xc8, 0xf4, 0x7d, 0xdc, 0xc7, 0xc4, 0xec, 0x19, 0x8e, 0xc5, 0x6a, 0x89, 0x2a, - 0x44, 0xa1, 0xba, 0x85, 0x3e, 0x83, 0x45, 0x2b, 0xc4, 0x62, 0x9f, 0xeb, 0xca, 0x6f, 0x5e, 0x6e, - 0x2f, 0x73, 0xdd, 0x8a, 0x65, 0xf9, 0x36, 0x21, 0x1a, 0xf5, 0x1d, 0xaf, 0xa3, 0x4e, 0xa0, 0xe8, - 0x73, 0x48, 0x99, 0x2e, 0x1e, 0x78, 0x54, 0x4e, 0x6e, 0x24, 0x37, 0x33, 0x93, 0xfe, 0x83, 0x99, - 0x94, 0xf8, 0x4c, 0x4a, 0xbb, 0xd8, 0xf1, 0xaa, 0xe2, 0xab, 0x71, 0x61, 0x4e, 0xe5, 0xf0, 0xe2, - 0xcf, 0x22, 0xa4, 0x9b, 0xbc, 0x3e, 0xca, 0x41, 0xe2, 0xa2, 0xab, 0x84, 0x63, 0xa1, 0x4f, 0x20, - 0xed, 0xda, 0x84, 0x98, 0x1d, 0x9b, 0xc8, 0x09, 0xa6, 0xbb, 0x5c, 0x0a, 0x77, 0xbe, 0x14, 0xed, - 0x7c, 0xa9, 0xe2, 0x8d, 0xd4, 0x0b, 0x14, 0xfa, 0x14, 0x52, 0x84, 0x9a, 0x74, 0x40, 0xe4, 0x24, - 0xdb, 0xc7, 0xf5, 0xd8, 0x3e, 0x46, 0xa5, 0x34, 0x06, 0x52, 0x39, 0x18, 0xed, 0x01, 0x7a, 0xe6, - 0x78, 0x66, 0xcf, 0xa0, 0x66, 0xaf, 0x37, 0x32, 0x7c, 0x9b, 0x0c, 0x7a, 0x54, 0x16, 0x37, 0x84, - 0xcd, 0xcc, 0x83, 0xb5, 0x98, 0x84, 0x1e, 0x40, 0x54, 0x86, 0x50, 0x25, 0xc6, 0x9a, 0x8a, 0xa0, - 0x0a, 0x64, 0xc8, 0xa0, 0xed, 0x3a, 0xd4, 0x08, 0xec, 0x24, 0xcf, 0x73, 0x89, 0x78, 0xd7, 0x7a, - 0xe4, 0xb5, 0xaa, 0xf8, 0xe2, 0xf7, 0x82, 0xa0, 0x42, 0x48, 0x0a, 0xc2, 0x68, 0x1f, 0x24, 0xbe, - 0xb1, 0x86, 0xed, 0x59, 0xa1, 0x4e, 0xea, 0x86, 0x3a, 0x39, 0xce, 0x54, 0x3c, 0x8b, 0x69, 0xd5, - 0x20, 0x4b, 0x31, 0x35, 0x7b, 0x06, 0x8f, 0xcb, 0x0b, 0x37, 0x1b, 0xcf, 0x12, 0x63, 0x45, 0xb6, - 0x39, 0x80, 0xff, 0x0d, 0x31, 0x75, 0xbc, 0x8e, 0x41, 0xa8, 0xe9, 0xf3, 0xa5, 0xa5, 0x6f, 0xd8, - 0xd2, 0xad, 0x90, 0xaa, 0x05, 0x4c, 0xd6, 0xd3, 0x1e, 0xf0, 0xd0, 0x64, 0x79, 0x8b, 0x37, 0xd4, - 0xca, 0x86, 0xc4, 0x68, 0x75, 0x6b, 0x81, 0x3f, 0xa8, 0x69, 0x99, 0xd4, 0x94, 0x21, 0x30, 0xab, - 0x7a, 0xf1, 0x5e, 0xfc, 0x45, 0x80, 0xcc, 0xf4, 0x60, 0xee, 0xc3, 0xe2, 0xc8, 0x26, 0xc6, 0x31, - 0x33, 0xa9, 0x70, 0xe9, 0x8b, 0xa9, 0x7b, 0x54, 0x4d, 0x8f, 0x6c, 0xb2, 0x1b, 0xe4, 0xd1, 0x43, - 0xc8, 0x9a, 0x6d, 0x42, 0x4d, 0xc7, 0xe3, 0x84, 0xc4, 0x95, 0x84, 0x25, 0x0e, 0x0a, 0x49, 0x1f, - 0x41, 0xda, 0xc3, 0x1c, 0x9f, 0xbc, 0x12, 0xbf, 0xe0, 0xe1, 0x10, 0xfa, 0x08, 0x90, 0x87, 0x8d, - 0xe7, 0x0e, 0xed, 0x1a, 0x43, 0x9b, 0x46, 0x24, 0xf1, 0x4a, 0xd2, 0x2d, 0x0f, 0x1f, 0x39, 0xb4, - 0xdb, 0xb2, 0x69, 0x48, 0x2e, 0xfe, 0x28, 0x80, 0x18, 0x9c, 0x07, 0xd7, 0x7f, 0xcd, 0x25, 0x98, - 0x1f, 0x62, 0x6a, 0x5f, 0xff, 0x25, 0x87, 0x30, 0xf4, 0x08, 0x16, 0xc2, 0xc3, 0x85, 0xc8, 0x22, - 0xf3, 0xc9, 0xbd, 0x98, 0xf7, 0x2f, 0x9f, 0x5c, 0x6a, 0xc4, 0x98, 0x19, 0xc6, 0xfc, 0xec, 0x30, - 0xf6, 0xc5, 0x74, 0x52, 0x12, 0x8b, 0xbf, 0x09, 0x90, 0xe5, 0x96, 0x6a, 0x9a, 0xbe, 0xe9, 0x12, - 0xf4, 0x14, 0x32, 0xae, 0xe3, 0x5d, 0x98, 0x53, 0xb8, 0xce, 0x9c, 0xeb, 0x81, 0x39, 0xcf, 0xc7, - 0x85, 0xff, 0x4f, 0xb1, 0x3e, 0xc6, 0xae, 0x43, 0x6d, 0xb7, 0x4f, 0x47, 0x2a, 0xb8, 0x8e, 0x17, - 0x79, 0xd6, 0x05, 0xe4, 0x9a, 0x27, 0x11, 0xc8, 0xe8, 0xdb, 0xbe, 0x83, 0x2d, 0xb6, 0x11, 0x41, - 0x85, 0xb8, 0xd1, 0x6a, 0xfc, 0xfc, 0xae, 0xbe, 0x7f, 0x3e, 0x2e, 0xdc, 0xbd, 0x4c, 0x9c, 0x14, - 0xf9, 0x3e, 0xf0, 0xa1, 0xe4, 0x9a, 0x27, 0xd1, 0x4a, 0x58, 0xbe, 0xa8, 0xc3, 0x52, 0x8b, 0x79, - 0x93, 0xaf, 0xac, 0x06, 0xdc, 0xab, 0x51, 0x65, 0xe1, 0xba, 0xca, 0x22, 0x53, 0x5e, 0x0a, 0x59, - 0x5c, 0xf5, 0xcf, 0xc8, 0xc4, 0x5c, 0xf5, 0x0b, 0x48, 0x7d, 0x3b, 0xc0, 0xfe, 0xc0, 0xe5, 0x0e, - 0x2e, 0x9e, 0x8f, 0x0b, 0x52, 0x18, 0x99, 0x74, 0x18, 0xff, 0x1f, 0x08, 0xf3, 0x68, 0x17, 0x16, - 0x69, 0xd7, 0xb7, 0x49, 0x17, 0xf7, 0x2c, 0x6e, 0x88, 0x0f, 0xce, 0xc7, 0x85, 0xdb, 0x17, 0xc1, - 0xb7, 0x2a, 0x4c, 0x78, 0xe8, 0x2b, 0xc8, 0x31, 0xc3, 0x4e, 0x94, 0x42, 0xa7, 0x6f, 0x9d, 0x8f, - 0x0b, 0xf2, 0x6c, 0xe6, 0xad, 0x72, 0xd9, 0x00, 0xa7, 0x47, 0xb0, 0xe2, 0x5f, 0x49, 0x48, 0xfd, - 0xd7, 0xec, 0x70, 0x79, 0xfc, 0xc9, 0x7f, 0x30, 0xfe, 0xa9, 0x71, 0x8b, 0xef, 0x36, 0xee, 0xf9, - 0x7f, 0x6d, 0xdc, 0xa9, 0x77, 0x1c, 0xf7, 0xd6, 0x77, 0x02, 0xc0, 0xd4, 0xc5, 0xe7, 0x0e, 0xac, - 0xb4, 0x1a, 0xba, 0x62, 0x34, 0x9a, 0x7a, 0xbd, 0x71, 0x68, 0x3c, 0x39, 0xd4, 0x9a, 0xca, 0x6e, - 0xfd, 0x71, 0x5d, 0xa9, 0x49, 0x73, 0xe8, 0x36, 0xdc, 0x9a, 0x4e, 0x3e, 0x55, 0x34, 0x49, 0x40, - 0x2b, 0x70, 0x7b, 0x3a, 0x58, 0xa9, 0x6a, 0x7a, 0xa5, 0x7e, 0x28, 0x25, 0x10, 0x82, 0xdc, 0x74, - 0xe2, 0xb0, 0x21, 0x25, 0xd1, 0x5d, 0x90, 0x67, 0x63, 0xc6, 0x51, 0x5d, 0xdf, 0x33, 0x5a, 0x8a, - 0xde, 0x90, 0xc4, 0xad, 0x9f, 0x04, 0xc8, 0xcd, 0xde, 0x08, 0x50, 0x01, 0xee, 0x34, 0xd5, 0x46, - 0xb3, 0xa1, 0x55, 0x0e, 0x0c, 0x4d, 0xaf, 0xe8, 0x4f, 0xb4, 0x58, 0x4f, 0x45, 0xc8, 0xc7, 0x01, - 0x35, 0xa5, 0xd9, 0xd0, 0xea, 0xba, 0xd1, 0x54, 0xd4, 0x7a, 0xa3, 0x26, 0x09, 0xe8, 0x1e, 0xac, - 0xc7, 0x31, 0xad, 0x86, 0x5e, 0x3f, 0xfc, 0x32, 0x82, 0x24, 0xd0, 0x1a, 0xbc, 0x17, 0x87, 0x34, - 0x2b, 0x9a, 0xa6, 0xd4, 0xc2, 0xa6, 0xe3, 0x39, 0x55, 0xd9, 0x57, 0x76, 0x75, 0xa5, 0x26, 0x89, - 0x57, 0x31, 0x1f, 0x57, 0xea, 0x07, 0x4a, 0x4d, 0x9a, 0xaf, 0x2a, 0xaf, 0x4e, 0xf3, 0xc2, 0xeb, - 0xd3, 0xbc, 0xf0, 0xc7, 0x69, 0x5e, 0x78, 0x71, 0x96, 0x9f, 0x7b, 0x7d, 0x96, 0x9f, 0xfb, 0xf5, - 0x2c, 0x3f, 0xf7, 0xf5, 0xfd, 0x8e, 0x43, 0xbb, 0x83, 0x76, 0xe9, 0x18, 0xbb, 0xfc, 0x3e, 0xca, - 0x7f, 0xb6, 0x89, 0xf5, 0x4d, 0xf9, 0x84, 0xdd, 0xb1, 0xe9, 0xa8, 0x6f, 0x93, 0xe0, 0x02, 0x9d, - 0x62, 0xf6, 0x7c, 0xf8, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x03, 0xbe, 0xcf, 0x81, 0x0b, - 0x00, 0x00, + // 1166 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x6e, 0xdb, 0x46, + 0x17, 0x35, 0x25, 0x5a, 0x96, 0xaf, 0x2c, 0x85, 0xdf, 0x24, 0x5f, 0xc3, 0x38, 0xb1, 0xe4, 0x08, + 0x6d, 0xe1, 0x3a, 0xb1, 0x54, 0x27, 0x48, 0x0b, 0x34, 0x9b, 0x4a, 0x16, 0x53, 0xcb, 0x70, 0x2d, + 0x95, 0x64, 0x64, 0xa4, 0x1b, 0x82, 0x32, 0x19, 0x89, 0xa8, 0xc8, 0x51, 0x39, 0x23, 0xc5, 0x7a, + 0x84, 0xee, 0xb2, 0x2c, 0xd0, 0xd7, 0x08, 0xfa, 0x0c, 0x59, 0x15, 0x41, 0x16, 0xfd, 0xd9, 0xa8, + 0xad, 0xbd, 0x33, 0xfa, 0x10, 0x05, 0x87, 0x43, 0x4b, 0xa2, 0x15, 0xd8, 0xcd, 0x8a, 0xe4, 0xbd, + 0xe7, 0xdc, 0x7b, 0x67, 0xce, 0xe1, 0x90, 0x70, 0xf3, 0x08, 0x13, 0x17, 0x93, 0x72, 0x07, 0x0f, + 0xcb, 0xc3, 0xed, 0xe0, 0x52, 0xea, 0xfb, 0x98, 0x62, 0x94, 0x0d, 0x13, 0xa5, 0x20, 0x32, 0xdc, + 0x5e, 0xcd, 0x73, 0x5c, 0xdb, 0x24, 0x76, 0x79, 0xb8, 0xdd, 0xb6, 0xa9, 0xb9, 0x5d, 0x3e, 0xc2, + 0x8e, 0x17, 0xc2, 0x57, 0x6f, 0x74, 0x70, 0x07, 0xb3, 0xdb, 0x72, 0x70, 0xc7, 0xa3, 0x85, 0x0e, + 0xc6, 0x9d, 0x9e, 0x5d, 0x66, 0x4f, 0xed, 0xc1, 0xf3, 0x32, 0x75, 0x5c, 0x9b, 0x50, 0xd3, 0xed, + 0x73, 0xc0, 0xad, 0x38, 0xc0, 0xf4, 0x46, 0x3c, 0x95, 0x8f, 0xa7, 0xac, 0x81, 0x6f, 0x52, 0x07, + 0x47, 0x1d, 0x6f, 0x85, 0x13, 0x19, 0x61, 0x53, 0x3e, 0x2d, 0x7b, 0x28, 0x62, 0x40, 0x87, 0xb6, + 0xd3, 0xe9, 0x52, 0xdb, 0x6a, 0x61, 0x6a, 0x37, 0xfa, 0x01, 0x0d, 0x6d, 0x43, 0x0a, 0xb3, 0x3b, + 0x59, 0x58, 0x17, 0x36, 0x72, 0x0f, 0x6e, 0x95, 0x66, 0x96, 0x58, 0x9a, 0x40, 0x55, 0x0e, 0x44, + 0x1f, 0x43, 0xea, 0x05, 0x2b, 0x24, 0x27, 0xd6, 0x85, 0x8d, 0xe5, 0x6a, 0xee, 0xed, 0xab, 0x2d, + 0xe0, 0xac, 0x9a, 0x7d, 0xa4, 0xf2, 0x6c, 0xf1, 0x27, 0x01, 0x96, 0x6a, 0x76, 0x1f, 0x13, 0x87, + 0xa2, 0x02, 0x64, 0xfa, 0x3e, 0xee, 0x63, 0x62, 0xf6, 0x0c, 0xc7, 0x62, 0xbd, 0x44, 0x15, 0xa2, + 0x50, 0xdd, 0x42, 0x9f, 0xc1, 0xb2, 0x15, 0x62, 0xb1, 0xcf, 0xeb, 0xca, 0x6f, 0x5f, 0x6d, 0xdd, + 0xe0, 0x75, 0x2b, 0x96, 0xe5, 0xdb, 0x84, 0x68, 0xd4, 0x77, 0xbc, 0x8e, 0x3a, 0x81, 0xa2, 0xcf, + 0x21, 0x65, 0xba, 0x78, 0xe0, 0x51, 0x39, 0xb9, 0x9e, 0xdc, 0xc8, 0x4c, 0xe6, 0x0f, 0x34, 0x29, + 0x71, 0x4d, 0x4a, 0x3b, 0xd8, 0xf1, 0xaa, 0xe2, 0xeb, 0x71, 0x61, 0x41, 0xe5, 0xf0, 0xe2, 0xaf, + 0x22, 0xa4, 0x9b, 0xbc, 0x3f, 0xca, 0x41, 0xe2, 0x7c, 0xaa, 0x84, 0x63, 0xa1, 0x4f, 0x21, 0xed, + 0xda, 0x84, 0x98, 0x1d, 0x9b, 0xc8, 0x09, 0x56, 0xf7, 0x46, 0x29, 0xdc, 0xf9, 0x52, 0xb4, 0xf3, + 0xa5, 0x8a, 0x37, 0x52, 0xcf, 0x51, 0xe8, 0x11, 0xa4, 0x08, 0x35, 0xe9, 0x80, 0xc8, 0x49, 0xb6, + 0x8f, 0x6b, 0xb1, 0x7d, 0x8c, 0x5a, 0x69, 0x0c, 0xa4, 0x72, 0x30, 0xda, 0x05, 0xf4, 0xdc, 0xf1, + 0xcc, 0x9e, 0x41, 0xcd, 0x5e, 0x6f, 0x64, 0xf8, 0x36, 0x19, 0xf4, 0xa8, 0x2c, 0xae, 0x0b, 0x1b, + 0x99, 0x07, 0xab, 0xb1, 0x12, 0x7a, 0x00, 0x51, 0x19, 0x42, 0x95, 0x18, 0x6b, 0x2a, 0x82, 0x2a, + 0x90, 0x21, 0x83, 0xb6, 0xeb, 0x50, 0x23, 0xb0, 0x93, 0xbc, 0xc8, 0x4b, 0xc4, 0xa7, 0xd6, 0x23, + 0xaf, 0x55, 0xc5, 0x97, 0x7f, 0x16, 0x04, 0x15, 0x42, 0x52, 0x10, 0x46, 0x7b, 0x20, 0xf1, 0x8d, + 0x35, 0x6c, 0xcf, 0x0a, 0xeb, 0xa4, 0xae, 0x58, 0x27, 0xc7, 0x99, 0x8a, 0x67, 0xb1, 0x5a, 0x35, + 0xc8, 0x52, 0x4c, 0xcd, 0x9e, 0xc1, 0xe3, 0xf2, 0xd2, 0xd5, 0xe4, 0x59, 0x61, 0xac, 0xc8, 0x36, + 0xfb, 0xf0, 0xbf, 0x21, 0xa6, 0x8e, 0xd7, 0x31, 0x08, 0x35, 0x7d, 0xbe, 0xb4, 0xf4, 0x15, 0x47, + 0xba, 0x16, 0x52, 0xb5, 0x80, 0xc9, 0x66, 0xda, 0x05, 0x1e, 0x9a, 0x2c, 0x6f, 0xf9, 0x8a, 0xb5, + 0xb2, 0x21, 0x31, 0x5a, 0xdd, 0x6a, 0xe0, 0x0f, 0x6a, 0x5a, 0x26, 0x35, 0x65, 0x08, 0xcc, 0xaa, + 0x9e, 0x3f, 0x17, 0x7f, 0x13, 0x20, 0x33, 0x2d, 0xcc, 0x3d, 0x58, 0x1e, 0xd9, 0xc4, 0x38, 0x62, + 0x26, 0x15, 0x2e, 0xbc, 0x31, 0x75, 0x8f, 0xaa, 0xe9, 0x91, 0x4d, 0x76, 0x82, 0x3c, 0x7a, 0x08, + 0x59, 0xb3, 0x4d, 0xa8, 0xe9, 0x78, 0x9c, 0x90, 0x98, 0x4b, 0x58, 0xe1, 0xa0, 0x90, 0xf4, 0x09, + 0xa4, 0x3d, 0xcc, 0xf1, 0xc9, 0xb9, 0xf8, 0x25, 0x0f, 0x87, 0xd0, 0xc7, 0x80, 0x3c, 0x6c, 0xbc, + 0x70, 0x68, 0xd7, 0x18, 0xda, 0x34, 0x22, 0x89, 0x73, 0x49, 0xd7, 0x3c, 0x7c, 0xe8, 0xd0, 0x6e, + 0xcb, 0xa6, 0x21, 0xb9, 0xf8, 0xb3, 0x00, 0x62, 0x70, 0x1e, 0x5c, 0xfe, 0x36, 0x97, 0x60, 0x71, + 0x88, 0xa9, 0x7d, 0xf9, 0x9b, 0x1c, 0xc2, 0xd0, 0x63, 0x58, 0x0a, 0x0f, 0x17, 0x22, 0x8b, 0xcc, + 0x27, 0x77, 0x63, 0xde, 0xbf, 0x78, 0x72, 0xa9, 0x11, 0x63, 0x46, 0x8c, 0xc5, 0x59, 0x31, 0xf6, + 0xc4, 0x74, 0x52, 0x12, 0x8b, 0x7f, 0x08, 0x90, 0xe5, 0x96, 0x6a, 0x9a, 0xbe, 0xe9, 0x12, 0xf4, + 0x0c, 0x32, 0xae, 0xe3, 0x9d, 0x9b, 0x53, 0xb8, 0xcc, 0x9c, 0x6b, 0x81, 0x39, 0xcf, 0xc6, 0x85, + 0xff, 0x4f, 0xb1, 0xee, 0x63, 0xd7, 0xa1, 0xb6, 0xdb, 0xa7, 0x23, 0x15, 0x5c, 0xc7, 0x8b, 0x3c, + 0xeb, 0x02, 0x72, 0xcd, 0xe3, 0x08, 0x64, 0xf4, 0x6d, 0xdf, 0xc1, 0x16, 0xdb, 0x88, 0xa0, 0x43, + 0xdc, 0x68, 0x35, 0x7e, 0x7e, 0x57, 0x3f, 0x3c, 0x1b, 0x17, 0xee, 0x5c, 0x24, 0x4e, 0x9a, 0xfc, + 0x18, 0xf8, 0x50, 0x72, 0xcd, 0xe3, 0x68, 0x25, 0x2c, 0x5f, 0xd4, 0x61, 0xa5, 0xc5, 0xbc, 0xc9, + 0x57, 0x56, 0x03, 0xee, 0xd5, 0xa8, 0xb3, 0x70, 0x59, 0x67, 0x91, 0x55, 0x5e, 0x09, 0x59, 0xbc, + 0xea, 0xdf, 0x91, 0x89, 0x79, 0xd5, 0x2f, 0x20, 0xf5, 0xfd, 0x00, 0xfb, 0x03, 0x97, 0x3b, 0xb8, + 0x78, 0x36, 0x2e, 0x48, 0x61, 0x64, 0x32, 0x61, 0xfc, 0x3b, 0x10, 0xe6, 0xd1, 0x0e, 0x2c, 0xd3, + 0xae, 0x6f, 0x93, 0x2e, 0xee, 0x59, 0xdc, 0x10, 0x1f, 0x9d, 0x8d, 0x0b, 0xd7, 0xcf, 0x83, 0xef, + 0xac, 0x30, 0xe1, 0xa1, 0x6f, 0x20, 0xc7, 0x0c, 0x3b, 0xa9, 0x14, 0x3a, 0x7d, 0xf3, 0x6c, 0x5c, + 0x90, 0x67, 0x33, 0xef, 0x2c, 0x97, 0x0d, 0x70, 0x7a, 0x04, 0x2b, 0xfe, 0x93, 0x80, 0x14, 0x5f, + 0xde, 0x97, 0xff, 0xd1, 0x0e, 0xe1, 0x59, 0x35, 0xad, 0xfa, 0xd7, 0xef, 0xa7, 0xba, 0x38, 0x5f, + 0xd5, 0x8b, 0x2a, 0x26, 0xdf, 0x43, 0xc5, 0xe0, 0x4b, 0xcd, 0x55, 0x13, 0xe7, 0x7f, 0xa9, 0xb9, + 0x42, 0xf7, 0xa7, 0x15, 0x5a, 0x9c, 0x0b, 0x9d, 0x92, 0xe2, 0xd1, 0x05, 0x29, 0x52, 0x73, 0x29, + 0xb3, 0xdb, 0xbd, 0xf9, 0x83, 0x00, 0x30, 0xf5, 0xe3, 0x71, 0x1b, 0x6e, 0xb6, 0x1a, 0xba, 0x62, + 0x34, 0x9a, 0x7a, 0xbd, 0x71, 0x60, 0x3c, 0x3d, 0xd0, 0x9a, 0xca, 0x4e, 0xfd, 0x49, 0x5d, 0xa9, + 0x49, 0x0b, 0xe8, 0x3a, 0x5c, 0x9b, 0x4e, 0x3e, 0x53, 0x34, 0x49, 0x40, 0x37, 0xe1, 0xfa, 0x74, + 0xb0, 0x52, 0xd5, 0xf4, 0x4a, 0xfd, 0x40, 0x4a, 0x20, 0x04, 0xb9, 0xe9, 0xc4, 0x41, 0x43, 0x4a, + 0xa2, 0x3b, 0x20, 0xcf, 0xc6, 0x8c, 0xc3, 0xba, 0xbe, 0x6b, 0xb4, 0x14, 0xbd, 0x21, 0x89, 0x9b, + 0xbf, 0x08, 0x90, 0x9b, 0xfd, 0x22, 0xa3, 0x02, 0xdc, 0x6e, 0xaa, 0x8d, 0x66, 0x43, 0xab, 0xec, + 0x1b, 0x9a, 0x5e, 0xd1, 0x9f, 0x6a, 0xb1, 0x99, 0x8a, 0x90, 0x8f, 0x03, 0x6a, 0x4a, 0xb3, 0xa1, + 0xd5, 0x75, 0xa3, 0xa9, 0xa8, 0xf5, 0x46, 0x4d, 0x12, 0xd0, 0x5d, 0x58, 0x8b, 0x63, 0x5a, 0x0d, + 0xbd, 0x7e, 0xf0, 0x55, 0x04, 0x49, 0xa0, 0x55, 0xf8, 0x20, 0x0e, 0x69, 0x56, 0x34, 0x4d, 0xa9, + 0x85, 0x43, 0xc7, 0x73, 0xaa, 0xb2, 0xa7, 0xec, 0xe8, 0x4a, 0x4d, 0x12, 0xe7, 0x31, 0x9f, 0x54, + 0xea, 0xfb, 0x4a, 0x4d, 0x5a, 0xac, 0x2a, 0xaf, 0x4f, 0xf2, 0xc2, 0x9b, 0x93, 0xbc, 0xf0, 0xd7, + 0x49, 0x5e, 0x78, 0x79, 0x9a, 0x5f, 0x78, 0x73, 0x9a, 0x5f, 0xf8, 0xfd, 0x34, 0xbf, 0xf0, 0xed, + 0xbd, 0x8e, 0x43, 0xbb, 0x83, 0x76, 0xe9, 0x08, 0xbb, 0xfc, 0x7f, 0x90, 0x5f, 0xb6, 0x88, 0xf5, + 0x5d, 0xf9, 0x98, 0xfd, 0xe3, 0xd2, 0x51, 0xdf, 0x26, 0xc1, 0x0f, 0x6c, 0x8a, 0xf9, 0xea, 0xe1, + 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x25, 0x68, 0xda, 0x01, 0x0b, 0x00, 0x00, } func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error) { diff --git a/x/gov/types/v1/query.pb.go b/x/gov/types/v1/query.pb.go index 74105fcde5f8..948563680c76 100644 --- a/x/gov/types/v1/query.pb.go +++ b/x/gov/types/v1/query.pb.go @@ -519,6 +519,8 @@ type QueryParamsResponse struct { // tally_params defines the parameters related to tally. TallyParams *TallyParams `protobuf:"bytes,3,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"` // Deprecated: Do not use. // params defines all the paramaters of x/gov module. + // + // Since: cosmos-sdk 0.47 Params *Params `protobuf:"bytes,4,opt,name=params,proto3" json:"params,omitempty"` } From 353cb25787c7af5e7374d8adab896c6b5fe9b008 Mon Sep 17 00:00:00 2001 From: atheesh Date: Thu, 28 Jul 2022 16:35:55 +0530 Subject: [PATCH 28/33] review changes --- x/gov/migrations/v4/keys.go | 9 ++++ x/gov/migrations/v4/store.go | 46 ++++++++++++++++++++ x/gov/migrations/v4/store_test.go | 72 +++++++++++++++++++++++++++++++ x/gov/module.go | 2 +- 4 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 x/gov/migrations/v4/keys.go create mode 100644 x/gov/migrations/v4/store.go create mode 100644 x/gov/migrations/v4/store_test.go diff --git a/x/gov/migrations/v4/keys.go b/x/gov/migrations/v4/keys.go new file mode 100644 index 000000000000..1c5163a82c4a --- /dev/null +++ b/x/gov/migrations/v4/keys.go @@ -0,0 +1,9 @@ +package v4 + +const ( + // ModuleName is the name of the module + ModuleName = "gov" +) + +// ParamsKey is the key of x/gov params +var ParamsKey = []byte{0x30} diff --git a/x/gov/migrations/v4/store.go b/x/gov/migrations/v4/store.go new file mode 100644 index 000000000000..07e524b2d17b --- /dev/null +++ b/x/gov/migrations/v4/store.go @@ -0,0 +1,46 @@ +package v4 + +import ( + "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/gov/exported" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" +) + +func migrateParams(ctx sdk.Context, storeKey storetypes.StoreKey, legacySubspace exported.ParamSubspace, cdc codec.BinaryCodec) error { + store := ctx.KVStore(storeKey) + + dp := govv1.DepositParams{} + vp := govv1.VotingParams{} + tp := govv1.TallyParams{} + legacySubspace.Get(ctx, govv1.ParamStoreKeyDepositParams, &dp) + legacySubspace.Get(ctx, govv1.ParamStoreKeyVotingParams, &vp) + legacySubspace.Get(ctx, govv1.ParamStoreKeyTallyParams, &tp) + + params := govv1.NewParams( + dp.MinDeposit, + *dp.MaxDepositPeriod, + *vp.VotingPeriod, + tp.Quorum, + tp.Threshold, + tp.VetoThreshold, + ) + + bz, err := cdc.Marshal(¶ms) + if err != nil { + return err + } + + store.Set(ParamsKey, bz) + + return nil +} + +// MigrateStore performs in-place store migrations from v3 (v0.46) to v4 (v0.47). The +// migration includes: +// +// Params migrations from x/params to gov +func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, legacySubspace exported.ParamSubspace, cdc codec.BinaryCodec) error { + return migrateParams(ctx, storeKey, legacySubspace, cdc) +} diff --git a/x/gov/migrations/v4/store_test.go b/x/gov/migrations/v4/store_test.go new file mode 100644 index 000000000000..28076792715c --- /dev/null +++ b/x/gov/migrations/v4/store_test.go @@ -0,0 +1,72 @@ +package v4_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + "github.com/cosmos/cosmos-sdk/x/gov" + v4 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v4" + v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + "github.com/cosmos/cosmos-sdk/x/upgrade" +) + +type mockSubspace struct { + dp v1.DepositParams + vp v1.VotingParams + tp v1.TallyParams +} + +func newMockSubspace(p v1.Params) mockSubspace { + return mockSubspace{ + dp: v1.DepositParams{ + MinDeposit: p.MinDeposit, + MaxDepositPeriod: p.MaxDepositPeriod, + }, + vp: v1.VotingParams{ + VotingPeriod: p.VotingPeriod, + }, + tp: v1.TallyParams{ + Quorum: p.Quorum, + Threshold: p.Threshold, + VetoThreshold: p.VetoThreshold, + }, + } +} + +func (ms mockSubspace) Get(ctx sdk.Context, key []byte, ptr interface{}) { + switch string(key) { + case string(v1.ParamStoreKeyDepositParams): + *ptr.(*v1.DepositParams) = ms.dp + case string(v1.ParamStoreKeyVotingParams): + *ptr.(*v1.VotingParams) = ms.vp + case string(v1.ParamStoreKeyTallyParams): + *ptr.(*v1.TallyParams) = ms.tp + } +} + +func TestMigrateStore(t *testing.T) { + cdc := moduletestutil.MakeTestEncodingConfig(upgrade.AppModuleBasic{}, gov.AppModuleBasic{}).Codec + govKey := sdk.NewKVStoreKey("gov") + ctx := testutil.DefaultContext(govKey, sdk.NewTransientStoreKey("transient_test")) + store := ctx.KVStore(govKey) + + legacySubspace := newMockSubspace(v1.DefaultParams()) + // Run migrations. + err := v4.MigrateStore(ctx, govKey, legacySubspace, cdc) + require.NoError(t, err) + + var params v1.Params + bz := store.Get(v4.ParamsKey) + require.NoError(t, cdc.Unmarshal(bz, ¶ms)) + require.NotNil(t, params) + require.Equal(t, legacySubspace.dp.MinDeposit, params.MinDeposit) + require.Equal(t, legacySubspace.dp.MaxDepositPeriod, params.MaxDepositPeriod) + require.Equal(t, legacySubspace.vp.VotingPeriod, params.VotingPeriod) + require.Equal(t, legacySubspace.tp.Quorum, params.Quorum) + require.Equal(t, legacySubspace.tp.Threshold, params.Threshold) + require.Equal(t, legacySubspace.tp.VetoThreshold, params.VetoThreshold) +} diff --git a/x/gov/module.go b/x/gov/module.go index 424807a0c6b9..e0b4a635b3e6 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -39,7 +39,7 @@ import ( paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) -const ConsensusVersion = 3 +const ConsensusVersion = 4 var ( _ module.AppModule = AppModule{} From 9e5655bd28c3be17e2711c710a59d477e1194475 Mon Sep 17 00:00:00 2001 From: atheesh Date: Thu, 28 Jul 2022 16:40:05 +0530 Subject: [PATCH 29/33] review changes --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 146e44fc94f5..7b61533f6e14 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,5 @@ dependency-graph.png *.synctex.gz /x/genutil/config/priv_validator_key.json /x/genutil/data/priv_validator_state.json + +debug_container.dot From 47d86c0e3952d45f64e8aa13ecb60c1c3b626b54 Mon Sep 17 00:00:00 2001 From: atheesh Date: Thu, 28 Jul 2022 16:49:00 +0530 Subject: [PATCH 30/33] review changes --- x/gov/spec/02_state.md | 4 +++- x/gov/types/keys.go | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/x/gov/spec/02_state.md b/x/gov/spec/02_state.md index 66514ec2c54c..a61e1f9ed6b2 100644 --- a/x/gov/spec/02_state.md +++ b/x/gov/spec/02_state.md @@ -127,7 +127,9 @@ We will use one KVStore `Governance` to store two mappings: * A mapping from `proposalID|'addresses'|address` to `Vote`. This mapping allows us to query all addresses that voted on the proposal along with their vote by doing a range query on `proposalID:addresses`. - +* A mapping from `ParamsKey|'Params'` to `Params`. This map allows to query all + x/gov params. + For pseudocode purposes, here are the two function we will use to read or write in stores: * `load(StoreKey, Key)`: Retrieve item stored at key `Key` in store found at key `StoreKey` in the multistore diff --git a/x/gov/types/keys.go b/x/gov/types/keys.go index 0e57200f66ec..b8e8bb29c879 100644 --- a/x/gov/types/keys.go +++ b/x/gov/types/keys.go @@ -49,7 +49,7 @@ var ( VotesKeyPrefix = []byte{0x20} - // ParamsKey is the querier route for gov + // ParamsKey is the key to query all gov params ParamsKey = []byte{0x30} ) From 82bdca8d4410dd7acb6651087b247f225f461419 Mon Sep 17 00:00:00 2001 From: atheesh Date: Mon, 1 Aug 2022 20:19:43 +0530 Subject: [PATCH 31/33] review changes --- x/gov/keeper/keeper.go | 4 ++++ x/gov/migrations/v3/store.go | 36 +----------------------------------- 2 files changed, 5 insertions(+), 35 deletions(-) diff --git a/x/gov/keeper/keeper.go b/x/gov/keeper/keeper.go index 14ea32bd5616..5cbb3e78ed12 100644 --- a/x/gov/keeper/keeper.go +++ b/x/gov/keeper/keeper.go @@ -71,6 +71,10 @@ func NewKeeper( panic(fmt.Sprintf("%s module account has not been set", types.ModuleName)) } + if _, err := sdk.AccAddressFromBech32(authority); err != nil { + panic(fmt.Sprintf("invalid authority address: %s", authority)) + } + // If MaxMetadataLen not set by app developer, set to default value. if config.MaxMetadataLen == 0 { config.MaxMetadataLen = types.DefaultConfig().MaxMetadataLen diff --git a/x/gov/migrations/v3/store.go b/x/gov/migrations/v3/store.go index 5344d0a6dd35..443ca9e691a2 100644 --- a/x/gov/migrations/v3/store.go +++ b/x/gov/migrations/v3/store.go @@ -7,7 +7,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/gov/exported" v1 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v1" - govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) @@ -42,35 +41,6 @@ func migrateProposals(store sdk.KVStore, cdc codec.BinaryCodec) error { return nil } -func migrateParams(ctx sdk.Context, storeKey storetypes.StoreKey, legacySubspace exported.ParamSubspace, cdc codec.BinaryCodec) error { - store := ctx.KVStore(storeKey) - - dp := govv1.DepositParams{} - vp := govv1.VotingParams{} - tp := govv1.TallyParams{} - legacySubspace.Get(ctx, govv1.ParamStoreKeyDepositParams, &dp) - legacySubspace.Get(ctx, govv1.ParamStoreKeyVotingParams, &vp) - legacySubspace.Get(ctx, govv1.ParamStoreKeyTallyParams, &tp) - - params := govv1.NewParams( - dp.MinDeposit, - *dp.MaxDepositPeriod, - *vp.VotingPeriod, - tp.Quorum, - tp.Threshold, - tp.VetoThreshold, - ) - - bz, err := cdc.Marshal(¶ms) - if err != nil { - return err - } - - store.Set(ParamsKey, bz) - - return nil -} - // MigrateStore performs in-place store migrations from v0.43 to v0.46. The // migration includes: // @@ -78,9 +48,5 @@ func migrateParams(ctx sdk.Context, storeKey storetypes.StoreKey, legacySubspace func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, legacySubspace exported.ParamSubspace, cdc codec.BinaryCodec) error { store := ctx.KVStore(storeKey) - if err := migrateProposals(store, cdc); err != nil { - return err - } - - return migrateParams(ctx, storeKey, legacySubspace, cdc) + return migrateProposals(store, cdc) } From b46f81ea49d7d455a3257dc226e9afa2f172d7e2 Mon Sep 17 00:00:00 2001 From: atheesh Date: Mon, 1 Aug 2022 20:29:54 +0530 Subject: [PATCH 32/33] review changes --- x/gov/keeper/migrations.go | 8 +++++- x/gov/migrations/v3/store.go | 3 +- x/gov/migrations/v3/store_test.go | 48 +------------------------------ x/gov/module.go | 5 ++++ 4 files changed, 14 insertions(+), 50 deletions(-) diff --git a/x/gov/keeper/migrations.go b/x/gov/keeper/migrations.go index ecffe318ecf5..f17088eaaeb4 100644 --- a/x/gov/keeper/migrations.go +++ b/x/gov/keeper/migrations.go @@ -5,6 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/gov/exported" v2 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v2" v3 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v3" + v4 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v4" ) // Migrator is a struct for handling in-place store migrations. @@ -28,5 +29,10 @@ func (m Migrator) Migrate1to2(ctx sdk.Context) error { // Migrate2to3 migrates from version 2 to 3. func (m Migrator) Migrate2to3(ctx sdk.Context) error { - return v3.MigrateStore(ctx, m.keeper.storeKey, m.legacySubspace, m.keeper.cdc) + return v3.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc) +} + +// Migrate2to3 migrates from version 2 to 3. +func (m Migrator) Migrate3to4(ctx sdk.Context) error { + return v4.MigrateStore(ctx, m.keeper.storeKey, m.legacySubspace, m.keeper.cdc) } diff --git a/x/gov/migrations/v3/store.go b/x/gov/migrations/v3/store.go index 443ca9e691a2..2fbecac5363e 100644 --- a/x/gov/migrations/v3/store.go +++ b/x/gov/migrations/v3/store.go @@ -5,7 +5,6 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/gov/exported" v1 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v1" "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) @@ -45,7 +44,7 @@ func migrateProposals(store sdk.KVStore, cdc codec.BinaryCodec) error { // migration includes: // // - Migrate proposals to be Msg-based. -func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, legacySubspace exported.ParamSubspace, cdc codec.BinaryCodec) error { +func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error { store := ctx.KVStore(storeKey) return migrateProposals(store, cdc) diff --git a/x/gov/migrations/v3/store_test.go b/x/gov/migrations/v3/store_test.go index b37032b093be..ce5448cbca01 100644 --- a/x/gov/migrations/v3/store_test.go +++ b/x/gov/migrations/v3/store_test.go @@ -18,40 +18,6 @@ import ( upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) -type mockSubspace struct { - dp v1.DepositParams - vp v1.VotingParams - tp v1.TallyParams -} - -func newMockSubspace(p v1.Params) mockSubspace { - return mockSubspace{ - dp: v1.DepositParams{ - MinDeposit: p.MinDeposit, - MaxDepositPeriod: p.MaxDepositPeriod, - }, - vp: v1.VotingParams{ - VotingPeriod: p.VotingPeriod, - }, - tp: v1.TallyParams{ - Quorum: p.Quorum, - Threshold: p.Threshold, - VetoThreshold: p.VetoThreshold, - }, - } -} - -func (ms mockSubspace) Get(ctx sdk.Context, key []byte, ptr interface{}) { - switch string(key) { - case string(v1.ParamStoreKeyDepositParams): - *ptr.(*v1.DepositParams) = ms.dp - case string(v1.ParamStoreKeyVotingParams): - *ptr.(*v1.VotingParams) = ms.vp - case string(v1.ParamStoreKeyTallyParams): - *ptr.(*v1.TallyParams) = ms.tp - } -} - func TestMigrateStore(t *testing.T) { cdc := moduletestutil.MakeTestEncodingConfig(upgrade.AppModuleBasic{}, gov.AppModuleBasic{}).Codec govKey := sdk.NewKVStoreKey("gov") @@ -75,9 +41,8 @@ func TestMigrateStore(t *testing.T) { store.Set(v1gov.ProposalKey(prop1.ProposalId), prop1Bz) store.Set(v1gov.ProposalKey(prop2.ProposalId), prop2Bz) - legacySubspace := newMockSubspace(v1.DefaultParams()) // Run migrations. - err = v3gov.MigrateStore(ctx, govKey, legacySubspace, cdc) + err = v3gov.MigrateStore(ctx, govKey, cdc) require.NoError(t, err) var newProp1 v1.Proposal @@ -89,17 +54,6 @@ func TestMigrateStore(t *testing.T) { err = cdc.Unmarshal(store.Get(v1gov.ProposalKey(prop2.ProposalId)), &newProp2) require.NoError(t, err) compareProps(t, prop2, newProp2) - - var params v1.Params - bz := store.Get(v3gov.ParamsKey) - require.NoError(t, cdc.Unmarshal(bz, ¶ms)) - require.NotNil(t, params) - require.Equal(t, legacySubspace.dp.MinDeposit, params.MinDeposit) - require.Equal(t, legacySubspace.dp.MaxDepositPeriod, params.MaxDepositPeriod) - require.Equal(t, legacySubspace.vp.VotingPeriod, params.VotingPeriod) - require.Equal(t, legacySubspace.tp.Quorum, params.Quorum) - require.Equal(t, legacySubspace.tp.Threshold, params.Threshold) - require.Equal(t, legacySubspace.tp.VetoThreshold, params.VetoThreshold) } func compareProps(t *testing.T, oldProp v1beta1.Proposal, newProp v1.Proposal) { diff --git a/x/gov/module.go b/x/gov/module.go index 0fcd4e298c3e..2b799b493713 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -289,6 +289,11 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { if err != nil { panic(err) } + + err = cfg.RegisterMigration(types.ModuleName, 3, m.Migrate3to4) + if err != nil { + panic(err) + } } // InitGenesis performs genesis initialization for the gov module. It returns From 45e10edae8e93c5eadb9f05deff77bc26f860344 Mon Sep 17 00:00:00 2001 From: atheeshp <59333759+atheeshp@users.noreply.github.com> Date: Mon, 1 Aug 2022 20:43:14 +0530 Subject: [PATCH 33/33] Update x/gov/migrations/v3/keys.go Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> --- x/gov/migrations/v3/keys.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/x/gov/migrations/v3/keys.go b/x/gov/migrations/v3/keys.go index 9ccb1c2840f4..a4aa0fe28a70 100644 --- a/x/gov/migrations/v3/keys.go +++ b/x/gov/migrations/v3/keys.go @@ -4,6 +4,3 @@ const ( // ModuleName is the name of the module ModuleName = "gov" ) - -// ParamsKey is the key of x/gov params -var ParamsKey = []byte{0x30}