From 9d9f7df3d6e734ae9b806716ab1c4a18d3946237 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Thu, 20 Oct 2022 15:28:15 +0200 Subject: [PATCH 01/26] chore: add minor versions changelog (#13556) --- CHANGELOG.md | 103 ++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 93 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 049aad3c18eb..462a55943c53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,10 +41,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (core) [#13306](https://github.com/cosmos/cosmos-sdk/pull/13306) Add a `FormatCoins` function to in `core/coins` to format sdk Coins following the Value Renderers spec. * (math) [#13306](https://github.com/cosmos/cosmos-sdk/pull/13306) Add `FormatInt` and `FormatDec` functiosn in `math` to format integers and decimals following the Value Renderers spec. -* (grpc) [#13485](https://github.com/cosmos/cosmos-sdk/pull/13485) Implement a new gRPC query, `/cosmos/base/node/v1beta1/config`, which provides operator configuration. * (x/staking) [#13122](https://github.com/cosmos/cosmos-sdk/pull/13122) Add `UnbondingCanComplete` and `PutUnbondingOnHold` to `x/staking` module. * [#13437](https://github.com/cosmos/cosmos-sdk/pull/13437) Add new flag `--modules-to-export` in `simd export` command to export only selected modules. -* [#13435](https://github.com/cosmos/cosmos-sdk/pull/13435) Extend error context when a simulation fails. * [#13298](https://github.com/cosmos/cosmos-sdk/pull/13298) Add `AddGenesisAccount` helper func in x/auth module which helps adding accounts to genesis state. * (x/authz) [#12648](https://github.com/cosmos/cosmos-sdk/pull/12648) Add an allow list, an optional list of addresses allowed to receive bank assets via authz MsgSend grant. * (sdk.Coins) [#12627](https://github.com/cosmos/cosmos-sdk/pull/12627) Make a Denoms method on sdk.Coins. @@ -54,9 +52,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (ledger) [#12935](https://github.com/cosmos/cosmos-sdk/pull/12935) Generalize Ledger integration to allow for different apps or keytypes that use SECP256k1. * (x/bank) [#11981](https://github.com/cosmos/cosmos-sdk/pull/11981) Create the `SetSendEnabled` endpoint for managing the bank's SendEnabled settings. * (x/auth) [#13210](https://github.com/cosmos/cosmos-sdk/pull/13210) Add `Query/AccountInfo` endpoint for simplified access to basic account info. -* (cli) [#13147](https://github.com/cosmos/cosmos-sdk/pull/13147) Add the `--append` flag to the `sign-batch` CLI cmd to combine the messages and sign those txs which are created with `--generate-only`. * (x/consensus) [#12905](https://github.com/cosmos/cosmos-sdk/pull/12905) Create a new `x/consensus` module that is now responsible for maintaining Tendermint consensus parameters instead of `x/param`. Legacy types remain in order to facilitate parameter migration from the deprecated `x/params`. App developers should ensure that they execute `baseapp.MigrateParams` during their chain upgrade. These legacy types will be removed in a future release. -* (cli) [#13454](https://github.com/cosmos/cosmos-sdk/pull/13454) `sign-batch` CLI can now read multiple transaction files. ### Improvements @@ -83,7 +79,6 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#13168](https://github.com/cosmos/cosmos-sdk/pull/13168) Migrate tendermintdev/proto-builder to ghcr.io. New image `ghcr.io/cosmos/proto-builder:0.8` * [#13178](https://github.com/cosmos/cosmos-sdk/pull/13178) Add `cosmos.msg.v1.service` protobuf annotation to allow tooling to distinguish between Msg and Query services via reflection. * [#13236](https://github.com/cosmos/cosmos-sdk/pull/13236) Integrate Filter Logging -* [#13433](https://github.com/cosmos/cosmos-sdk/pull/13433) Remove dead code in cacheMergeIterator `Domain()`. * [#13528](https://github.com/cosmos/cosmos-sdk/pull/13528) Update `ValidateMemoDecorator` to only check memo against `MaxMemoCharacters` param when a memo is present. ### State Machine Breaking @@ -154,7 +149,6 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/staking) [#12973](https://github.com/cosmos/cosmos-sdk/pull/12973) Removed `stakingkeeper.RandomValidator`. Use `testutil.RandSliceElem(r, sk.GetAllValidators(ctx))` instead. * (x/gov) [#13160](https://github.com/cosmos/cosmos-sdk/pull/13160) Remove custom marshaling of proposl and voteoption. * (types) [#13430](https://github.com/cosmos/cosmos-sdk/pull/13430) Remove unused code `ResponseCheckTx` and `ResponseDeliverTx` -* (auth) [#13460](https://github.com/cosmos/cosmos-sdk/pull/13460) The `q auth address-by-id` CLI command has been renamed to `q auth address-by-acc-num` to be more explicit. However, the old `address-by-id` version is still kept as an alias, for backwards compatibility. * (store) [#13529](https://github.com/cosmos/cosmos-sdk/pull/13529) Add method `LatestVersion` to `MultiStore` interface, add method `SetQueryMultiStore` to baesapp to support alternative `MultiStore` implementation for query service. ### CLI Breaking Changes @@ -167,7 +161,6 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#13553](https://github.com/cosmos/cosmos-sdk/pull/13553) Ensure all parameter validation for decimal types handles nil decimal values. * [#13145](https://github.com/cosmos/cosmos-sdk/pull/13145) Fix panic when calling `String()` to a Record struct type. * [#13116](https://github.com/cosmos/cosmos-sdk/pull/13116) Fix a dead-lock in the `Group-TotalWeight` `x/group` invariant. -* [#12548](https://github.com/cosmos/cosmos-sdk/pull/12548) Prevent signing from wrong key while using multisig. * (genutil) [#12140](https://github.com/cosmos/cosmos-sdk/pull/12140) Fix staking's genesis JSON migrate in the `simd migrate v0.46` CLI command. * (types) [#12154](https://github.com/cosmos/cosmos-sdk/pull/12154) Add `baseAccountGetter` to avoid invalid account error when create vesting account. * (x/authz) [#12184](https://github.com/cosmos/cosmos-sdk/pull/12184) Fix MsgExec not verifying the validity of nested messages. @@ -179,7 +172,6 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/gov) [#13051](https://github.com/cosmos/cosmos-sdk/pull/13051) In SubmitPropsal, when a legacy msg fails it's handler call, wrap the error as ErrInvalidProposalContent (instead of ErrNoProposalHandlerExists). * (x/gov) [#13045](https://github.com/cosmos/cosmos-sdk/pull/13045) Fix gov migrations for v3(0.46). * (snapshot) [#13400](https://github.com/cosmos/cosmos-sdk/pull/13400) Fix snapshot checksum issue in golang 1.19. -* (store) [#13459](https://github.com/cosmos/cosmos-sdk/pull/13459) Don't let state listener observe the uncommitted writes. ### Deprecated @@ -188,6 +180,44 @@ Ref: https://keepachangelog.com/en/1.0.0/ Setting can be done using MsgSetSendEnabled as a governance proposal. A SendEnabled query has been added to both GRPC and CLI. +## [v0.46.3](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.3) - 2022-10-20 + +ATTENTION: + +This is a security release for the [Dragonberry security advisory](https://forum.cosmos.network/t/ibc-security-advisory-dragonberry/7702). + +All users should upgrade immediately. + +Users *must* add a replace directive in their go.mod for the new `ics23` package in the SDK: + +```go +replace github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v8.0.0 +``` + +### Features + +* [#13435](https://github.com/cosmos/cosmos-sdk/pull/13435) Extend error context when a simulation fails. +* (grpc) [#13485](https://github.com/cosmos/cosmos-sdk/pull/13485) Implement a new gRPC query, `/cosmos/base/node/v1beta1/config`, which provides operator configuration. +* (cli) [#13147](https://github.com/cosmos/cosmos-sdk/pull/13147) Add the `--append` flag to the `sign-batch` CLI cmd to combine the messages and sign those txs which are created with `--generate-only`. +* (cli) [#13454](https://github.com/cosmos/cosmos-sdk/pull/13454) `sign-batch` CLI can now read multiple transaction files. + +### Improvements + +* [#13586](https://github.com/cosmos/cosmos-sdk/pull/13586) Bump Tendermint to `v0.34.22`. +* (auth) [#13460](https://github.com/cosmos/cosmos-sdk/pull/13460) The `q auth address-by-id` CLI command has been renamed to `q auth address-by-acc-num` to be more explicit. However, the old `address-by-id` version is still kept as an alias, for backwards compatibility. +* [#13433](https://github.com/cosmos/cosmos-sdk/pull/13433) Remove dead code in cacheMergeIterator `Domain()`. + +### Bug Fixes + +* Implement dragonberry security patch. + * For applying the patch please refer to the [RELEASE NOTES](./RELEASE_NOTES.md) +* (store) [#13459](https://github.com/cosmos/cosmos-sdk/pull/13459) Don't let state listener observe the uncommitted writes. +* [#12548](https://github.com/cosmos/cosmos-sdk/pull/12548) Prevent signing from wrong key while using multisig. + +### API Breaking Changes + +* (server) [#13485](https://github.com/cosmos/cosmos-sdk/pull/13485) The `Application` service now requires the `RegisterNodeService` method to be implemented. + ## [v0.46.2](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.2) - 2022-10-03 ### API Breaking Changes @@ -527,8 +557,47 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/upgrade) [#9906](https://github.com/cosmos/cosmos-sdk/pull/9906) Deprecate `UpgradeConsensusState` gRPC query since this functionality is only used for IBC, which now has its own [IBC replacement](https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) * (types) [#10948](https://github.com/cosmos/cosmos-sdk/issues/10948) Deprecate the types.DBBackend variable and types.NewLevelDB function. They are replaced by a new entry in `app.toml`: `app-db-backend` and `tendermint/tm-db`s `NewDB` function. If `app-db-backend` is defined, then it is used. Otherwise, if `types.DBBackend` is defined, it is used (until removed: [#11241](https://github.com/cosmos/cosmos-sdk/issues/11241)). Otherwise, Tendermint config's `db-backend` is used. +## [v0.45.9](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.9) - 2022-10-14 + +ATTENTION: + +This is a security release for the [Dragonberry security advisory](https://forum.cosmos.network/t/ibc-security-advisory-dragonberry/7702). + +All users should upgrade immediately. -## v0.45.8 - 2022-08-25 +Users _must_ add a replace directive in their go.mod for the new `ics23` package in the SDK: + +```go +replace github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 +``` + +### Features + +* [#13435](https://github.com/cosmos/cosmos-sdk/pull/13435) Extend error context when a simulation fails. + +### Improvements + +* [#13369](https://github.com/cosmos/cosmos-sdk/pull/13369) Improve UX for `keyring.List` by returning all retrieved keys. +* [#13323](https://github.com/cosmos/cosmos-sdk/pull/13323) Ensure `withdraw_rewards` rewards are emitted from all actions that result in rewards being withdrawn. +* [#13321](https://github.com/cosmos/cosmos-sdk/pull/13321) Add flag to disable fast node migration and usage. +* (store) [#13326](https://github.com/cosmos/cosmos-sdk/pull/13326) Implementation of ADR-038 file StreamingService, backport #8664. +* (store) [#13540](https://github.com/cosmos/cosmos-sdk/pull/13540) Default fastnode migration to false to prevent suprises. Operators must enable it, unless they have it enabled already. + +### API Breaking Changes + +* (cli) [#13089](https://github.com/cosmos/cosmos-sdk/pull/13089) Fix rollback command don't actually delete multistore versions, added method `RollbackToVersion` to interface `CommitMultiStore` and added method `CommitMultiStore` to `Application` interface. + +### Bug Fixes + +* Implement dragonberry security patch. + * For applying the patch please refer to the [RELEASE NOTES](./RELEASE_NOTES.md) +* (store) [#13459](https://github.com/cosmos/cosmos-sdk/pull/13459) Don't let state listener observe the uncommitted writes. + +### Notes + +Reverted #12437 due to API breaking changes. + +## [v0.45.8](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.8) - 2022-08-25 ### Improvements @@ -541,7 +610,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#13046](https://github.com/cosmos/cosmos-sdk/pull/13046) Fix missing return statement in BaseApp.Query. -## v0.45.7 - 2022-08-04 +## [v0.45.7](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.7) - 2022-08-04 ### Features @@ -751,6 +820,20 @@ empty coins slice before it is used to create `banktype.MsgSend`. * [#10823](https://github.com/cosmos/cosmos-sdk/pull/10823) updated ambiguous cli description for creating feegrant. +## [v0.44.5-patch](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.5-patch) - 2021-10-14 + +ATTENTION: + +This is a security release for the [Dragonberry security advisory](https://forum.cosmos.network/t/ibc-security-advisory-dragonberry/7702). + +All users should upgrade immediately. + +Users _must_ add a replace directive in their go.mod for the new `ics23` package in the SDK: + +```go +replace github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 +``` + ## [v0.44.5](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.5) - 2021-12-02 ### Improvements From 1dae922fe0c01ce87f129b247166323ee080521c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Oct 2022 18:11:38 +0200 Subject: [PATCH 02/26] build(deps): Bump bufbuild/buf-setup-action from 1.8.0 to 1.9.0 (#13602) Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.8.0 to 1.9.0. - [Release notes](https://github.com/bufbuild/buf-setup-action/releases) - [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.8.0...v1.9.0) --- updated-dependencies: - dependency-name: bufbuild/buf-setup-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/proto-registry.yml | 2 +- .github/workflows/proto.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/proto-registry.yml b/.github/workflows/proto-registry.yml index 5548fe346e63..aac369021d3e 100644 --- a/.github/workflows/proto-registry.yml +++ b/.github/workflows/proto-registry.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: bufbuild/buf-setup-action@v1.8.0 + - uses: bufbuild/buf-setup-action@v1.9.0 - uses: bufbuild/buf-push-action@v1 with: input: "proto" diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index 70149e1fd361..601310a79380 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -15,7 +15,7 @@ jobs: timeout-minutes: 5 steps: - uses: actions/checkout@v3 - - uses: bufbuild/buf-setup-action@v1.8.0 + - uses: bufbuild/buf-setup-action@v1.9.0 - uses: bufbuild/buf-lint-action@v1 with: input: "proto" @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: bufbuild/buf-setup-action@v1.8.0 + - uses: bufbuild/buf-setup-action@v1.9.0 - uses: bufbuild/buf-breaking-action@v1 with: input: "proto" From 6a371842df255e855cfa58c1de2d87c186fd46ee Mon Sep 17 00:00:00 2001 From: Emmanuel T Odeke Date: Fri, 21 Oct 2022 07:50:52 -0700 Subject: [PATCH 03/26] fix: core/coins: skip 2 int64(uint32) casts by comparison checks and silence gosec warnings (#13611) --- core/coins/format.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/coins/format.go b/core/coins/format.go index 53a5ae0ff1bd..b363ecb2e2b0 100644 --- a/core/coins/format.go +++ b/core/coins/format.go @@ -44,17 +44,15 @@ func formatCoin(coin *basev1beta1.Coin, metadata *bankv1beta1.Metadata) (string, return vr + " " + coin.Denom, err } - exponentDiff := int64(coinExp) - int64(dispExp) - dispAmount, err := math.LegacyNewDecFromStr(coin.Amount) if err != nil { return "", err } - if exponentDiff > 0 { - dispAmount = dispAmount.Mul(math.LegacyNewDec(10).Power(uint64(exponentDiff))) + if coinExp > dispExp { + dispAmount = dispAmount.Mul(math.LegacyNewDec(10).Power(uint64(coinExp - dispExp))) } else { - dispAmount = dispAmount.Quo(math.LegacyNewDec(10).Power(uint64(-exponentDiff))) + dispAmount = dispAmount.Quo(math.LegacyNewDec(10).Power(uint64(dispExp - coinExp))) } vr, err := math.FormatDec(dispAmount.String()) From 7d6601e1fb8644ee592a996b303073d675661126 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 21 Oct 2022 17:15:20 +0200 Subject: [PATCH 04/26] refactor: clean-up SDK tools (#13603) --- .github/dependabot.yml | 9 +- CHANGELOG.md | 1 + Makefile | 2 +- contrib/images/simd-dlv/Dockerfile | 1 - contrib/images/simd-env/Dockerfile | 1 - cosmovisor/RELEASE_NOTES.md | 7 - docs/pre.sh | 2 +- ...al_proofs_createnonmembershipproof_test.go | 43 ---- go.mod | 3 +- go.sum | 6 +- go.work.example | 3 +- store/tools/ics23/Makefile | 44 ---- store/tools/ics23/go.mod | 43 ---- store/tools/ics23/go.sum | 210 --------------- store/tools/ics23/helpers.go | 62 ----- store/tools/ics23/iavl/Makefile | 18 -- store/tools/ics23/iavl/README.md | 44 ---- .../tools/ics23/iavl/cmd/testgen-iavl/main.go | 201 --------------- store/tools/ics23/iavl/convert.go | 98 ------- store/tools/ics23/iavl/convert_test.go | 30 --- store/tools/ics23/iavl/create.go | 102 -------- store/tools/ics23/iavl/create_test.go | 80 ------ store/tools/ics23/iavl/helpers/helpers.go | 108 -------- store/tools/ics23/smt/Makefile | 24 -- store/tools/ics23/smt/README.md | 39 --- store/tools/ics23/smt/cmd/testgen-smt/main.go | 214 ---------------- store/tools/ics23/smt/create.go | 126 --------- store/tools/ics23/smt/create_test.go | 84 ------ store/tools/ics23/smt/helpers/helpers.go | 131 ---------- store/tools/ics23/smt/helpers/random.go | 34 --- store/tools/ics23/tendermint/Makefile | 24 -- store/tools/ics23/tendermint/README.md | 39 --- .../tendermint/cmd/testgen-simple/main.go | 241 ------------------ {cosmovisor => tools/cosmovisor}/.gitignore | 0 .../cosmovisor}/.goreleaser.yml | 0 {cosmovisor => tools/cosmovisor}/CHANGELOG.md | 6 + {cosmovisor => tools/cosmovisor}/Makefile | 0 {cosmovisor => tools/cosmovisor}/README.md | 2 +- tools/cosmovisor/RELEASE_NOTES.md | 7 + {cosmovisor => tools/cosmovisor}/args.go | 2 +- {cosmovisor => tools/cosmovisor}/args_test.go | 2 +- .../cosmovisor}/buffer_test.go | 0 .../cosmovisor}/cmd/cosmovisor/help.go | 2 +- .../cosmovisor}/cmd/cosmovisor/help_test.go | 2 +- .../cosmovisor}/cmd/cosmovisor/init.go | 4 +- .../cosmovisor}/cmd/cosmovisor/init_test.go | 2 +- .../cosmovisor}/cmd/cosmovisor/main.go | 4 +- .../cosmovisor}/cmd/cosmovisor/root.go | 0 .../cosmovisor}/cmd/cosmovisor/run.go | 2 +- .../cosmovisor}/cmd/cosmovisor/run_config.go | 0 .../cosmovisor}/cmd/cosmovisor/run_test.go | 0 .../cosmovisor}/cmd/cosmovisor/version.go | 2 +- .../cmd/cosmovisor/version_test.go | 2 +- .../cosmovisor}/errors/multi.go | 0 .../cosmovisor}/errors/multi_test.go | 0 {cosmovisor => tools/cosmovisor}/go.mod | 2 +- {cosmovisor => tools/cosmovisor}/go.sum | 0 {cosmovisor => tools/cosmovisor}/logger.go | 0 {cosmovisor => tools/cosmovisor}/process.go | 0 .../cosmovisor}/process_test.go | 2 +- {cosmovisor => tools/cosmovisor}/scanner.go | 0 .../cosmovisor}/scanner_test.go | 0 .../download/cosmovisor/genesis/bin/autod | 0 .../testdata/download/data/.gitkeep | 0 .../testdata/repo/chain2-zip_bin/autod | 0 .../testdata/repo/chain2-zip_bin/autod.zip | Bin .../testdata/repo/chain3-zip_dir/autod.zip | Bin .../testdata/repo/chain3-zip_dir/bin/autod | 0 .../testdata/repo/raw_binary/autod | 0 .../testdata/repo/ref_to_chain3-zip_dir.json | 0 .../testdata/repo/zip_directory/autod.zip | Bin .../testdata/upgrade-files/f1-good.json | 0 .../testdata/upgrade-files/f2-bad-type-2.json | 0 .../testdata/upgrade-files/f2-bad-type.json | 0 .../upgrade-files/f2-normalized-name.json | 0 .../testdata/upgrade-files/f3-empty.json | 0 .../testdata/upgrade-files/f4-empty-obj.json | 0 .../upgrade-files/f5-partial-obj-1.json | 0 .../upgrade-files/f5-partial-obj-2.json | 0 .../validate/cosmovisor/genesis/bin/dummyd | 0 .../cosmovisor/upgrades/chain2/bin/dummyd | 0 .../cosmovisor/upgrades/chain3/bin/dummyd | 0 .../cosmovisor/upgrades/nobin/bin/.keep | 0 .../cosmovisor/upgrades/noexec/bin/dummyd | 0 .../testdata/validate/data/.gitkeep | 0 {cosmovisor => tools/cosmovisor}/upgrade.go | 0 .../cosmovisor}/upgrade_test.go | 2 +- x/gov/README.md | 2 +- x/upgrade/README.md | 2 +- 89 files changed, 41 insertions(+), 2082 deletions(-) delete mode 100644 cosmovisor/RELEASE_NOTES.md delete mode 100644 fuzz/tests/store_internal_proofs_createnonmembershipproof_test.go delete mode 100644 store/tools/ics23/Makefile delete mode 100644 store/tools/ics23/go.mod delete mode 100644 store/tools/ics23/go.sum delete mode 100644 store/tools/ics23/helpers.go delete mode 100644 store/tools/ics23/iavl/Makefile delete mode 100644 store/tools/ics23/iavl/README.md delete mode 100644 store/tools/ics23/iavl/cmd/testgen-iavl/main.go delete mode 100644 store/tools/ics23/iavl/convert.go delete mode 100644 store/tools/ics23/iavl/convert_test.go delete mode 100644 store/tools/ics23/iavl/create.go delete mode 100644 store/tools/ics23/iavl/create_test.go delete mode 100644 store/tools/ics23/iavl/helpers/helpers.go delete mode 100644 store/tools/ics23/smt/Makefile delete mode 100644 store/tools/ics23/smt/README.md delete mode 100644 store/tools/ics23/smt/cmd/testgen-smt/main.go delete mode 100644 store/tools/ics23/smt/create.go delete mode 100644 store/tools/ics23/smt/create_test.go delete mode 100644 store/tools/ics23/smt/helpers/helpers.go delete mode 100644 store/tools/ics23/smt/helpers/random.go delete mode 100644 store/tools/ics23/tendermint/Makefile delete mode 100644 store/tools/ics23/tendermint/README.md delete mode 100644 store/tools/ics23/tendermint/cmd/testgen-simple/main.go rename {cosmovisor => tools/cosmovisor}/.gitignore (100%) rename {cosmovisor => tools/cosmovisor}/.goreleaser.yml (100%) rename {cosmovisor => tools/cosmovisor}/CHANGELOG.md (96%) rename {cosmovisor => tools/cosmovisor}/Makefile (100%) rename {cosmovisor => tools/cosmovisor}/README.md (99%) create mode 100644 tools/cosmovisor/RELEASE_NOTES.md rename {cosmovisor => tools/cosmovisor}/args.go (99%) rename {cosmovisor => tools/cosmovisor}/args_test.go (99%) rename {cosmovisor => tools/cosmovisor}/buffer_test.go (100%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/help.go (95%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/help_test.go (98%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/init.go (97%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/init_test.go (99%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/main.go (73%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/root.go (100%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/run.go (97%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/run_config.go (100%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/run_test.go (100%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/version.go (97%) rename {cosmovisor => tools/cosmovisor}/cmd/cosmovisor/version_test.go (91%) rename {cosmovisor => tools/cosmovisor}/errors/multi.go (100%) rename {cosmovisor => tools/cosmovisor}/errors/multi_test.go (100%) rename {cosmovisor => tools/cosmovisor}/go.mod (99%) rename {cosmovisor => tools/cosmovisor}/go.sum (100%) rename {cosmovisor => tools/cosmovisor}/logger.go (100%) rename {cosmovisor => tools/cosmovisor}/process.go (100%) rename {cosmovisor => tools/cosmovisor}/process_test.go (99%) rename {cosmovisor => tools/cosmovisor}/scanner.go (100%) rename {cosmovisor => tools/cosmovisor}/scanner_test.go (100%) rename {cosmovisor => tools/cosmovisor}/testdata/download/cosmovisor/genesis/bin/autod (100%) rename {cosmovisor => tools/cosmovisor}/testdata/download/data/.gitkeep (100%) rename {cosmovisor => tools/cosmovisor}/testdata/repo/chain2-zip_bin/autod (100%) rename {cosmovisor => tools/cosmovisor}/testdata/repo/chain2-zip_bin/autod.zip (100%) rename {cosmovisor => tools/cosmovisor}/testdata/repo/chain3-zip_dir/autod.zip (100%) rename {cosmovisor => tools/cosmovisor}/testdata/repo/chain3-zip_dir/bin/autod (100%) rename {cosmovisor => tools/cosmovisor}/testdata/repo/raw_binary/autod (100%) rename {cosmovisor => tools/cosmovisor}/testdata/repo/ref_to_chain3-zip_dir.json (100%) rename {cosmovisor => tools/cosmovisor}/testdata/repo/zip_directory/autod.zip (100%) rename {cosmovisor => tools/cosmovisor}/testdata/upgrade-files/f1-good.json (100%) rename {cosmovisor => tools/cosmovisor}/testdata/upgrade-files/f2-bad-type-2.json (100%) rename {cosmovisor => tools/cosmovisor}/testdata/upgrade-files/f2-bad-type.json (100%) rename {cosmovisor => tools/cosmovisor}/testdata/upgrade-files/f2-normalized-name.json (100%) rename {cosmovisor => tools/cosmovisor}/testdata/upgrade-files/f3-empty.json (100%) rename {cosmovisor => tools/cosmovisor}/testdata/upgrade-files/f4-empty-obj.json (100%) rename {cosmovisor => tools/cosmovisor}/testdata/upgrade-files/f5-partial-obj-1.json (100%) rename {cosmovisor => tools/cosmovisor}/testdata/upgrade-files/f5-partial-obj-2.json (100%) rename {cosmovisor => tools/cosmovisor}/testdata/validate/cosmovisor/genesis/bin/dummyd (100%) rename {cosmovisor => tools/cosmovisor}/testdata/validate/cosmovisor/upgrades/chain2/bin/dummyd (100%) rename {cosmovisor => tools/cosmovisor}/testdata/validate/cosmovisor/upgrades/chain3/bin/dummyd (100%) rename {cosmovisor => tools/cosmovisor}/testdata/validate/cosmovisor/upgrades/nobin/bin/.keep (100%) rename {cosmovisor => tools/cosmovisor}/testdata/validate/cosmovisor/upgrades/noexec/bin/dummyd (100%) rename {cosmovisor => tools/cosmovisor}/testdata/validate/data/.gitkeep (100%) rename {cosmovisor => tools/cosmovisor}/upgrade.go (100%) rename {cosmovisor => tools/cosmovisor}/upgrade_test.go (99%) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7e8bef0d5f2c..b3dde78c89fb 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -56,7 +56,7 @@ updates: - "A:automerge" - dependencies - package-ecosystem: gomod - directory: "/cosmovisor" + directory: "/tools/cosmovisor" schedule: interval: weekly labels: @@ -90,13 +90,6 @@ updates: labels: - "A:automerge" - dependencies - - package-ecosystem: gomod - directory: "/store/tools/ics23" - schedule: - interval: weekly - labels: - - "A:automerge" - - dependencies - package-ecosystem: gomod directory: "/tx" schedule: diff --git a/CHANGELOG.md b/CHANGELOG.md index 462a55943c53..8e0289c0d09d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements +* (tools) [#13603](https://github.com/cosmos/cosmos-sdk/pull/13603) Rename cosmovisor package name to `cosmossdk.io/tools/cosmovisor`. The new tool directory contains Cosmos SDK tools. * (deps) [#13397](https://github.com/cosmos/cosmos-sdk/pull/13397) Bump Go version minimum requirement to `1.19`. * [#13070](https://github.com/cosmos/cosmos-sdk/pull/13070) Migrate from `gogo/protobuf` to `cosmos/gogoproto`. * [#12995](https://github.com/cosmos/cosmos-sdk/pull/12995) Add `FormatTime` and `ParseTimeString` methods. diff --git a/Makefile b/Makefile index 337311a3b577..130cbfeeadc1 100644 --- a/Makefile +++ b/Makefile @@ -138,7 +138,7 @@ $(BUILDDIR)/: mkdir -p $(BUILDDIR)/ cosmovisor: - $(MAKE) -C cosmovisor cosmovisor + $(MAKE) -C tools/cosmovisor cosmovisor .PHONY: build build-linux-amd64 build-linux-arm64 cosmovisor diff --git a/contrib/images/simd-dlv/Dockerfile b/contrib/images/simd-dlv/Dockerfile index 1a25c4d31a7a..85850839e692 100644 --- a/contrib/images/simd-dlv/Dockerfile +++ b/contrib/images/simd-dlv/Dockerfile @@ -10,7 +10,6 @@ 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 5df38271cd53..f0c75954bccf 100644 --- a/contrib/images/simd-env/Dockerfile +++ b/contrib/images/simd-env/Dockerfile @@ -9,7 +9,6 @@ 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/cosmovisor/RELEASE_NOTES.md b/cosmovisor/RELEASE_NOTES.md deleted file mode 100644 index 828eee43bd19..000000000000 --- a/cosmovisor/RELEASE_NOTES.md +++ /dev/null @@ -1,7 +0,0 @@ -# Cosmovisor v1.3.0 Release Notes - -* Fix failure when installing cosmovisor via `go install`. - -### Changelog - -For more details, please see the [CHANGELOG](https://github.com/cosmos/cosmos-sdk/blob/cosmovisor/v1.2.1/cosmovisor/CHANGELOG.md). diff --git a/docs/pre.sh b/docs/pre.sh index 284457ed9320..5498927cc05a 100755 --- a/docs/pre.sh +++ b/docs/pre.sh @@ -21,7 +21,7 @@ cp -r ../x/auth/vesting/README.md ./docs/modules/vesting/README.md cat ../x/README.md | sed 's/\.\.\/docs\/building-modules\/README\.md/\/building-modules\/intro\.html/g' > ./docs/modules/README.md ## Add Cosmovisor documentation -cp ../cosmovisor/README.md ./docs/tooling/01-cosmovisor.md +cp ../tools/cosmovisor/README.md ./docs/tooling/01-cosmovisor.md ## Add depinject documentation cp ../depinject/README.md ./docs/building-apps/01-depinject.md diff --git a/fuzz/tests/store_internal_proofs_createnonmembershipproof_test.go b/fuzz/tests/store_internal_proofs_createnonmembershipproof_test.go deleted file mode 100644 index 74210b576c36..000000000000 --- a/fuzz/tests/store_internal_proofs_createnonmembershipproof_test.go +++ /dev/null @@ -1,43 +0,0 @@ -//go:build gofuzz || go1.18 - -package tests - -import ( - "encoding/json" - "testing" - - iavlproofs "github.com/cosmos/cosmos-sdk/store/tools/ics23/iavl" - "github.com/cosmos/iavl" - db "github.com/tendermint/tm-db" -) - -type serialize struct { - Data map[string][]byte - Key string -} - -func FuzzStoreInternalProofsCreateNonmembershipProof(f *testing.F) { - f.Fuzz(func(t *testing.T, data []byte) { - sz := new(serialize) - if err := json.Unmarshal(data, sz); err != nil { - return - } - if len(sz.Data) == 0 || len(sz.Key) == 0 { - return - } - tree, err := iavl.NewMutableTree(db.NewMemDB(), 0, false) - if err != nil { - t.Fatal(err) - } - for k, v := range sz.Data { - tree.Set([]byte(k), v) - } - icp, err := iavlproofs.CreateNonMembershipProof(tree, []byte(sz.Key)) - if err != nil { - return - } - if icp == nil { - panic("nil CommitmentProof with nil error") - } - }) -} diff --git a/go.mod b/go.mod index 73e6a4a1ff68..1e3a5341c1c8 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,6 @@ require ( github.com/cosmos/btcutil v1.0.4 github.com/cosmos/cosmos-proto v1.0.0-alpha8 github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1.0.20220726092710-f848e4300a8a - github.com/cosmos/cosmos-sdk/store/tools/ics23 v0.0.0-20220820010601-dc361be9e3ff github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/gogoproto v1.4.2 github.com/cosmos/iavl v0.19.3 @@ -126,7 +125,7 @@ require ( github.com/mitchellh/go-testing-interface v1.0.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/nxadm/tail v1.4.8 // indirect + github.com/onsi/ginkgo v1.16.4 // indirect github.com/onsi/gomega v1.20.0 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.0.5 // indirect diff --git a/go.sum b/go.sum index 6ebb0528a17e..e827564001cc 100644 --- a/go.sum +++ b/go.sum @@ -189,8 +189,6 @@ github.com/cosmos/cosmos-proto v1.0.0-alpha8 h1:d3pCRuMYYvGA5bM0ZbbjKn+AoQD4A7dy github.com/cosmos/cosmos-proto v1.0.0-alpha8/go.mod h1:6/p+Bc4O8JKeZqe0VqUGTX31eoYqemTT4C1hLCWsO7I= github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1.0.20220726092710-f848e4300a8a h1:2humuGPw3O5riJVFq/E2FRjF57UrO97W1qJcGVmK+6k= github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1.0.20220726092710-f848e4300a8a/go.mod h1:c8IO23vgNxueCCJlSI9awQtcxsvc+buzaeThB85qfBU= -github.com/cosmos/cosmos-sdk/store/tools/ics23 v0.0.0-20220820010601-dc361be9e3ff h1:bK16sWoQcV03WnZiX9ljUWumWEzMFB3SWpZ0uKhIiXQ= -github.com/cosmos/cosmos-sdk/store/tools/ics23 v0.0.0-20220820010601-dc361be9e3ff/go.mod h1:oY2d/HzjjpHVVNlz5quA0is2Zj/v1CI7mu4bkgMg2Yc= 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= @@ -304,6 +302,7 @@ github.com/go-playground/validator/v10 v10.10.0 h1:I7mrTYv78z8k8VXa/qJlOlEXn/nBh github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= 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/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= @@ -633,6 +632,7 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W 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.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= 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= @@ -1048,6 +1048,7 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w 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-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= @@ -1158,6 +1159,7 @@ golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82u 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-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= diff --git a/go.work.example b/go.work.example index 60ddf15344ca..e5deca6ce161 100644 --- a/go.work.example +++ b/go.work.example @@ -5,12 +5,11 @@ use ( ./api ./client/v2 ./core - ./cosmovisor + ./tools/cosmovisor ./depinject ./errors ./math ./orm - ./store/tools/ics23 ./tx ./simapp ./tests diff --git a/store/tools/ics23/Makefile b/store/tools/ics23/Makefile deleted file mode 100644 index 3ee116d9c2eb..000000000000 --- a/store/tools/ics23/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -GO_RUN= go run -mod=readonly -GENDIR ?= ./testdata - -.PHONY: testgen testgen-iavl testgen-smt testgen-simple - -# make sure we turn on go modules -export GO111MODULE := on - -# Usage: GENDIR=/path/to/ics23/testdata/iavl make testgen-iavl - -testgen: testgen-iavl testgen-smt testgen-simple - -testgen-iavl: - @mkdir -p "$(GENDIR)" - $(GO_RUN) ./iavl/cmd/testgen-iavl exist left 987 > "$(GENDIR)"/exist_left.json - $(GO_RUN) ./iavl/cmd/testgen-iavl exist middle 812 > "$(GENDIR)"/exist_middle.json - $(GO_RUN) ./iavl/cmd/testgen-iavl exist right 1261 > "$(GENDIR)"/exist_right.json - $(GO_RUN) ./iavl/cmd/testgen-iavl nonexist left 813 > "$(GENDIR)"/nonexist_left.json - $(GO_RUN) ./iavl/cmd/testgen-iavl nonexist middle 691 > "$(GENDIR)"/nonexist_middle.json - $(GO_RUN) ./iavl/cmd/testgen-iavl nonexist right 1535 > "$(GENDIR)"/nonexist_right.json - $(GO_RUN) ./iavl/cmd/testgen-iavl batch 1801 20 0 > "$(GENDIR)"/batch_exist.json - $(GO_RUN) ./iavl/cmd/testgen-iavl batch 1807 0 20 > "$(GENDIR)"/batch_nonexist.json - -testgen-smt: - @mkdir -p "$(GENDIR)" - $(GO_RUN) ./smt/cmd/testgen-smt exist left 987 > "$(GENDIR)"/exist_left.json - $(GO_RUN) ./smt/cmd/testgen-smt exist middle 812 > "$(GENDIR)"/exist_middle.json - $(GO_RUN) ./smt/cmd/testgen-smt exist right 1261 > "$(GENDIR)"/exist_right.json - $(GO_RUN) ./smt/cmd/testgen-smt nonexist left 813 > "$(GENDIR)"/nonexist_left.json - $(GO_RUN) ./smt/cmd/testgen-smt nonexist middle 691 > "$(GENDIR)"/nonexist_middle.json - $(GO_RUN) ./smt/cmd/testgen-smt nonexist right 1535 > "$(GENDIR)"/nonexist_right.json - $(GO_RUN) ./smt/cmd/testgen-smt batch 1801 20 0 > "$(GENDIR)"/batch_exist.json - $(GO_RUN) ./smt/cmd/testgen-smt batch 1807 0 20 > "$(GENDIR)"/batch_nonexist.json - -testgen-simple: - @mkdir -p "$(GENDIR)" - $(GO_RUN) ./tendermint/cmd/testgen-simple exist left 987 > "$(GENDIR)"/exist_left.json - $(GO_RUN) ./tendermint/cmd/testgen-simple exist middle 812 > "$(GENDIR)"/exist_middle.json - $(GO_RUN) ./tendermint/cmd/testgen-simple exist right 1261 > "$(GENDIR)"/exist_right.json - $(GO_RUN) ./tendermint/cmd/testgen-simple nonexist left 813 > "$(GENDIR)"/nonexist_left.json - $(GO_RUN) ./tendermint/cmd/testgen-simple nonexist middle 691 > "$(GENDIR)"/nonexist_middle.json - $(GO_RUN) ./tendermint/cmd/testgen-simple nonexist right 1535 > "$(GENDIR)"/nonexist_right.json - $(GO_RUN) ./tendermint/cmd/testgen-simple batch 1801 20 0 > "$(GENDIR)"/batch_exist.json - $(GO_RUN) ./tendermint/cmd/testgen-simple batch 1807 0 20 > "$(GENDIR)"/batch_nonexist.json diff --git a/store/tools/ics23/go.mod b/store/tools/ics23/go.mod deleted file mode 100644 index 6af79f351aec..000000000000 --- a/store/tools/ics23/go.mod +++ /dev/null @@ -1,43 +0,0 @@ -module github.com/cosmos/cosmos-sdk/store/tools/ics23 - -go 1.19 - -require ( - github.com/confio/ics23/go v0.7.0 - github.com/cosmos/cosmos-sdk v0.46.2 - github.com/cosmos/iavl v0.19.2-0.20220916140702-9b6be3095313 - github.com/lazyledger/smt v0.2.1-0.20210709230900-03ea40719554 - github.com/tendermint/tendermint v0.37.0-alpha.2 - github.com/tendermint/tm-db v0.6.7 -) - -require ( - github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/cosmos/gogoproto v1.4.2 // indirect - github.com/cosmos/gorocksdb v1.2.0 // 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.2 // indirect - github.com/golang/glog v1.0.0 // indirect - github.com/golang/protobuf v1.5.2 // 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.9 // indirect - github.com/onsi/ginkgo v1.16.4 // indirect - github.com/onsi/gomega v1.20.0 // 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.3.1 // 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-20220722155217-630584e8d5aa // indirect - golang.org/x/net v0.0.0-20220726230323-06994584191e // indirect - golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect - google.golang.org/protobuf v1.28.1 // indirect -) - -replace github.com/cosmos/cosmos-sdk/store/tools/ics23 => ./ diff --git a/store/tools/ics23/go.sum b/store/tools/ics23/go.sum deleted file mode 100644 index 50fd6f4f4f7c..000000000000 --- a/store/tools/ics23/go.sum +++ /dev/null @@ -1,210 +0,0 @@ -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -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/confio/ics23/go v0.7.0 h1:00d2kukk7sPoHWL4zZBZwzxnpA2pec1NPdwbSokJ5w8= -github.com/confio/ics23/go v0.7.0/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= -github.com/coreos/etcd v3.3.10+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/cosmos/cosmos-sdk v0.46.2 h1:3dUNqbLas94ud5aTcJKCwxVOmNXpuGBtVQTMrYczTwY= -github.com/cosmos/cosmos-sdk v0.46.2/go.mod h1:0aUPGPU6PWaDEaHNjtgrpNhgxo9bAUrQ7BO7XCvFOfs= -github.com/cosmos/gogoproto v1.4.2 h1:UeGRcmFW41l0G0MiefWhkPEVEwvu78SZsHBvI78dAYw= -github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -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.19.2-0.20220916140702-9b6be3095313 h1:R7CnaI/0OLwOusy7n9750n8fqQ3yCQ8OJQI2L3ws9RA= -github.com/cosmos/iavl v0.19.2-0.20220916140702-9b6be3095313/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -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/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.1.0 h1:Jv3CGQHp9OjuMBSne1485aDpUkTKEcUqF+jm/LuerPI= -github.com/dgraph-io/ristretto v0.1.0/go.mod h1:fux0lOrBhrVCJd3lcTHsIJhq1T2rokOu6v9Vcb3Q9ug= -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/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= -github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= -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.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -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/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -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.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -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.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/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -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= -github.com/google/go-cmp v0.4.0/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.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= -github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY= -github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -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/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/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -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/onsi/ginkgo v1.6.0/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.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -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.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= -github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -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/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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= -github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= -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/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -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.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -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/tendermint/tendermint v0.37.0-alpha.2 h1:G82quAWZUDYMTc9G7b/tntFATfm7nm6PrsvjsuMZDPI= -github.com/tendermint/tendermint v0.37.0-alpha.2/go.mod h1:DSnBfCufF48DhIpmU2inmVo8YiEGus6uInwf46Iu01k= -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/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20220726230323-06994584191e h1:wOQNKh1uuDGRnmgF0jDxh7ctgGy/3P4rYWQRVJD4/Yg= -golang.org/x/net v0.0.0-20220726230323-06994584191e/go.mod h1:AaygXjzTFtRAg2ttMY5RMuhpJ3cNnI0XpyFJD1iQRSM= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/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-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -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/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -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= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -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.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -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= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/store/tools/ics23/helpers.go b/store/tools/ics23/helpers.go deleted file mode 100644 index bb2fe62939ef..000000000000 --- a/store/tools/ics23/helpers.go +++ /dev/null @@ -1,62 +0,0 @@ -package ics23_tools - -import ( - "fmt" - "strconv" - - tmproofs "github.com/cosmos/cosmos-sdk/store/internal/proofs" -) - -func ParseArgs(args []string) (exist bool, loc tmproofs.Where, size int, err error) { - if len(args) != 3 && len(args) != 4 { - err = fmt.Errorf("Insufficient args") - return - } - - switch args[1] { - case "exist": - exist = true - case "nonexist": - exist = false - default: - err = fmt.Errorf("Invalid arg: %s", args[1]) - return - } - - switch args[2] { - case "left": - loc = tmproofs.Left - case "middle": - loc = tmproofs.Middle - case "right": - loc = tmproofs.Right - default: - err = fmt.Errorf("Invalid arg: %s", args[2]) - return - } - - size = 400 - if len(args) == 4 { - size, err = strconv.Atoi(args[3]) - } - - return -} - -func ParseBatchArgs(args []string) (size int, exist int, nonexist int, err error) { - if len(args) != 3 { - err = fmt.Errorf("Insufficient args") - return - } - - size, err = strconv.Atoi(args[0]) - if err != nil { - return - } - exist, err = strconv.Atoi(args[1]) - if err != nil { - return - } - nonexist, err = strconv.Atoi(args[2]) - return -} diff --git a/store/tools/ics23/iavl/Makefile b/store/tools/ics23/iavl/Makefile deleted file mode 100644 index 0cb48a0edf7c..000000000000 --- a/store/tools/ics23/iavl/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -.PHONY: testgen - -GENDIR ?= ./testdata - -# make sure we turn on go modules -export GO111MODULE := on - -# Usage: GENDIR=../ics23/testdata/iavl make testgen -testgen: - @mkdir -p "$(GENDIR)" - go run -mod=readonly ./cmd/testgen-iavl exist left 987 > "$(GENDIR)"/exist_left.json - go run -mod=readonly ./cmd/testgen-iavl exist middle 812 > "$(GENDIR)"/exist_middle.json - go run -mod=readonly ./cmd/testgen-iavl exist right 1261 > "$(GENDIR)"/exist_right.json - go run -mod=readonly ./cmd/testgen-iavl nonexist left 813 > "$(GENDIR)"/nonexist_left.json - go run -mod=readonly ./cmd/testgen-iavl nonexist middle 691 > "$(GENDIR)"/nonexist_middle.json - go run -mod=readonly ./cmd/testgen-iavl nonexist right 1535 > "$(GENDIR)"/nonexist_right.json - go run -mod=readonly ./cmd/testgen-iavl batch 1801 20 0 > "$(GENDIR)"/batch_exist.json - go run -mod=readonly ./cmd/testgen-iavl batch 1807 0 20 > "$(GENDIR)"/batch_nonexist.json diff --git a/store/tools/ics23/iavl/README.md b/store/tools/ics23/iavl/README.md deleted file mode 100644 index 756f04871079..000000000000 --- a/store/tools/ics23/iavl/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# Proofs IAVL - -This is a demo project to show converting proofs from cosmos/iavl into the format -specified in confio/proofs and validating that they still work. - -## Library usage - -It exposes a two main functions : - -`func CreateMembershipProof(tree *iavl.MutableTree, key []byte) (*proofs.CommitmentProof, error)` -produces a CommitmentProof that the given key exists in the iavl tree (and contains the -current value). This returns an error if the key does not exist in the tree. - -`func CreateNonMembershipProof(tree *iavl.MutableTree, key []byte) (*proofs.CommitmentProof, error)` -produces a CommitmentProof that the given key doesn't exist in the iavl tree. -This returns an error if the key exists in the tree. - -Generalized range proofs are lower in priority, as they are just an optimization of the -two basic proof types, and don't provide any additional capabilities. -We will soon add some `Batch` capabilities that can represent these. - -## CLI usage - -We also expose a simple script to generate test data for the confio proofs package. - -```shell -go install ./cmd/testgen-iavl -testgen-iavl -``` - -Will output some json data, from a randomly generated merkle tree each time. - -```json -{ - "existence": "0a146f65436a684273735a34567543774b567a435963121e76616c75655f666f725f6f65436a684273735a34567543774b567a4359631a0d0a0b0801180120012a030002021a2d122b08011204020402201a2120d307032505383dee34ea9eadf7649c31d1ce294b6d62b273d804da478ac161da1a2d122b08011204040802201a2120306b7d51213bd93bac17c5ee3d727ec666300370b19fd55cc13d7341dc589a991a2b12290801122508160220857103d59863ac55d1f34008a681f837c01975a223c0f54883a05a446d49c7c6201a2b1229080112250a2202204498eb5c93e40934bc8bad9626f19e333c1c0be4541b9098f139585c3471bae2201a2d122b080112040e6c02201a212022648db12dbf830485cc41435ecfe37bcac26c6c305ac4304f649977ddc339d51a2c122a0801122610c60102204e0b7996a7104f5b1ac1a2caa0704c4b63f60112e0e13763b2ba03f40a54e845201a2c122a08011226129003022017858e28e0563f7252eaca19acfc1c3828c892e635f76f971b3fbdc9bbd2742e20", - "root": "cea07656c77e8655521f4c904730cf4649242b8e482be786b2b220a15150d5f0" -} -``` - -`"root"` is the hex-encoded root hash of the merkle tree - -`"existence"` is the hex-encoding of the protobuf binary encoding of a `proofs.ExistenceProof` object. This contains a (key, value) pair, -along with all steps to reach the root hash. This provides a non-trivial test case, to ensure client in multiple languages can verify the -protobuf proofs we generate from the iavl tree diff --git a/store/tools/ics23/iavl/cmd/testgen-iavl/main.go b/store/tools/ics23/iavl/cmd/testgen-iavl/main.go deleted file mode 100644 index 615a24b513ce..000000000000 --- a/store/tools/ics23/iavl/cmd/testgen-iavl/main.go +++ /dev/null @@ -1,201 +0,0 @@ -package main - -import ( - "encoding/hex" - "encoding/json" - "fmt" - "os" - - ics23 "github.com/confio/ics23/go" - - tmproofs "github.com/cosmos/cosmos-sdk/store/internal/proofs" - tools "github.com/cosmos/cosmos-sdk/store/tools/ics23" - iavlproofs "github.com/cosmos/cosmos-sdk/store/tools/ics23/iavl" - "github.com/cosmos/cosmos-sdk/store/tools/ics23/iavl/helpers" -) - -/** -testgen-iavl will generate a json struct on stdout (meant to be saved to file for testdata). -this will be an auto-generated existence proof in the form: - -{ - "root": "", - "key": "", - "value": " (empty on non-existence)", - "proof": "" -} - -It accepts two or three arguments (optional size: default 400) - - testgen-iavl [exist|nonexist] [left|right|middle] - -If you make a batch, we have a different format: - -{ - "root": "", - "proof": "", - "items": [{ - "key": "", - "value": " (empty on non-existence)", - }, ...] -} - -The batch variant accepts 5 arguments: - - testgen-iavl [batch] [size] [num exist] [num nonexist] -**/ - -func main() { - if len(os.Args) < 2 { - fmt.Println("Usage: testgen-iavl batch [size] [# exist] [# nonexist]") - fmt.Println(" testgen-iavl [exist|nonexist] [left|right|middle] ") - os.Exit(1) - } - - if os.Args[1] == "batch" { - err := doBatch(os.Args[2:]) - if err != nil { - fmt.Printf("%+v\n", err) - fmt.Println("Usage: testgen-iavl [batch] [size] [# exist] [# nonexist]") - os.Exit(1) - } - return - } - - exist, loc, size, err := tools.ParseArgs(os.Args) - if err != nil { - fmt.Printf("%+v\n", err) - fmt.Println("Usage: testgen-iavl [exist|nonexist] [left|right|middle] ") - os.Exit(1) - } - - tree, allkeys, err := helpers.BuildTree(size) - if err != nil { - fmt.Printf("%+v\n", err) - fmt.Println("Usage: testgen-iavl [exist|nonexist] [left|right|middle] ") - os.Exit(1) - } - root, _ := tree.WorkingHash() - - var key, value []byte - if exist { - key = helpers.GetKey(allkeys, loc) - value, _ = tree.Get(key) - } else { - key = helpers.GetNonKey(allkeys, loc) - } - - var proof *ics23.CommitmentProof - if exist { - proof, err = iavlproofs.CreateMembershipProof(tree, key) - } else { - proof, err = iavlproofs.CreateNonMembershipProof(tree, key) - } - if err != nil { - fmt.Printf("Error: create proof: %+v\n", err) - os.Exit(1) - } - - binary, err := proof.Marshal() - if err != nil { - fmt.Printf("Error: protobuf marshal: %+v\n", err) - os.Exit(1) - } - - res := map[string]interface{}{ - "root": hex.EncodeToString(root), - "key": hex.EncodeToString(key), - "value": hex.EncodeToString(value), - "proof": hex.EncodeToString(binary), - } - out, err := json.MarshalIndent(res, "", " ") - if err != nil { - fmt.Printf("Error: json encoding: %+v\n", err) - os.Exit(1) - } - - fmt.Println(string(out)) -} - -type item struct { - Key string `json:"key"` - Value string `json:"value"` -} - -func doBatch(args []string) error { - size, exist, nonexist, err := tools.ParseBatchArgs(args) - if err != nil { - return err - } - - tree, allkeys, err := helpers.BuildTree(size) - if err != nil { - return err - } - root, err := tree.WorkingHash() - if err != nil { - return err - } - - items := []item{} - proofs := []*ics23.CommitmentProof{} - - for i := 0; i < exist; i++ { - key := []byte(helpers.GetKey(allkeys, tmproofs.Middle)) - value, err := tree.Get(key) - if err != nil { - return err - } - proof, err := iavlproofs.CreateMembershipProof(tree, key) - if err != nil { - return fmt.Errorf("create proof: %+v", err) - } - proofs = append(proofs, proof) - item := item{ - Key: hex.EncodeToString(key), - Value: hex.EncodeToString(value), - } - items = append(items, item) - } - - for i := 0; i < nonexist; i++ { - key := []byte(helpers.GetNonKey(allkeys, tmproofs.Middle)) - proof, err := iavlproofs.CreateNonMembershipProof(tree, key) - if err != nil { - return fmt.Errorf("create proof: %+v", err) - } - proofs = append(proofs, proof) - item := item{ - Key: hex.EncodeToString(key), - } - items = append(items, item) - } - - // combine all proofs into batch and compress - proof, err := ics23.CombineProofs(proofs) - if err != nil { - fmt.Printf("Error: combine proofs: %+v\n", err) - os.Exit(1) - } - - binary, err := proof.Marshal() - if err != nil { - fmt.Printf("Error: protobuf marshal: %+v\n", err) - os.Exit(1) - } - - res := map[string]interface{}{ - "root": hex.EncodeToString(root), - "items": items, - "proof": hex.EncodeToString(binary), - } - out, err := json.MarshalIndent(res, "", " ") - if err != nil { - fmt.Printf("Error: json encoding: %+v\n", err) - os.Exit(1) - } - - fmt.Println(string(out)) - - return nil -} diff --git a/store/tools/ics23/iavl/convert.go b/store/tools/ics23/iavl/convert.go deleted file mode 100644 index 029b542eb50b..000000000000 --- a/store/tools/ics23/iavl/convert.go +++ /dev/null @@ -1,98 +0,0 @@ -package iavlproofs - -import ( - "fmt" - - ics23 "github.com/confio/ics23/go" - "github.com/cosmos/iavl" -) - -// convertExistenceProof will convert the given proof into a valid -// existence proof, if that's what it is. -// -// This is the simplest case of the range proof and we will focus on -// demoing compatibility here -func convertExistenceProof(p *iavl.RangeProof, key, value []byte) (*ics23.ExistenceProof, error) { - if len(p.Leaves) != 1 { - return nil, fmt.Errorf("Existence proof requires RangeProof to have exactly one leaf") - } - return &ics23.ExistenceProof{ - Key: key, - Value: value, - Leaf: convertLeafOp(p.Leaves[0].Version), - Path: convertInnerOps(p.LeftPath), - }, nil -} - -func convertLeafOp(version int64) *ics23.LeafOp { - // this is adapted from iavl/proof.go:proofLeafNode.Hash() - prefix := aminoVarInt(0) - prefix = append(prefix, aminoVarInt(1)...) - prefix = append(prefix, aminoVarInt(version)...) - - return &ics23.LeafOp{ - Hash: ics23.HashOp_SHA256, - PrehashValue: ics23.HashOp_SHA256, - Length: ics23.LengthOp_VAR_PROTO, - Prefix: prefix, - } -} - -// we cannot get the proofInnerNode type, so we need to do the whole path in one function -func convertInnerOps(path iavl.PathToLeaf) []*ics23.InnerOp { - steps := make([]*ics23.InnerOp, 0, len(path)) - - // lengthByte is the length prefix prepended to each of the sha256 sub-hashes - var lengthByte byte = 0x20 - - // we need to go in reverse order, iavl starts from root to leaf, - // we want to go up from the leaf to the root - for i := len(path) - 1; i >= 0; i-- { - // this is adapted from iavl/proof.go:proofInnerNode.Hash() - prefix := aminoVarInt(int64(path[i].Height)) - prefix = append(prefix, aminoVarInt(path[i].Size)...) - prefix = append(prefix, aminoVarInt(path[i].Version)...) - - var suffix []byte - if len(path[i].Left) > 0 { - // length prefixed left side - prefix = append(prefix, lengthByte) - prefix = append(prefix, path[i].Left...) - // prepend the length prefix for child - prefix = append(prefix, lengthByte) - } else { - // prepend the length prefix for child - prefix = append(prefix, lengthByte) - // length-prefixed right side - suffix = []byte{lengthByte} - suffix = append(suffix, path[i].Right...) - } - - op := &ics23.InnerOp{ - Hash: ics23.HashOp_SHA256, - Prefix: prefix, - Suffix: suffix, - } - steps = append(steps, op) - } - return steps -} - -func aminoVarInt(orig int64) []byte { - // amino-specific byte swizzling - i := uint64(orig) << 1 - if orig < 0 { - i = ^i - } - - // avoid multiple allocs for normal case - res := make([]byte, 0, 8) - - // standard protobuf encoding - for i >= 1<<7 { - res = append(res, uint8(i&0x7f|0x80)) - i >>= 7 - } - res = append(res, uint8(i)) - return res -} diff --git a/store/tools/ics23/iavl/convert_test.go b/store/tools/ics23/iavl/convert_test.go deleted file mode 100644 index 50952a1eaca7..000000000000 --- a/store/tools/ics23/iavl/convert_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package iavlproofs - -import ( - "bytes" - "testing" - - tmproofs "github.com/cosmos/cosmos-sdk/store/internal/proofs" - "github.com/cosmos/cosmos-sdk/store/tools/ics23/iavl/helpers" -) - -func TestConvertExistence(t *testing.T) { - proof, err := helpers.GenerateIavlResult(200, tmproofs.Middle) - if err != nil { - t.Fatal(err) - } - - converted, err := convertExistenceProof(proof.Proof, proof.Key, proof.Value) - if err != nil { - t.Fatal(err) - } - - calc, err := converted.Calculate() - if err != nil { - t.Fatal(err) - } - - if !bytes.Equal(calc, proof.RootHash) { - t.Errorf("Calculated: %X\nExpected: %X", calc, proof.RootHash) - } -} diff --git a/store/tools/ics23/iavl/create.go b/store/tools/ics23/iavl/create.go deleted file mode 100644 index b1d046983721..000000000000 --- a/store/tools/ics23/iavl/create.go +++ /dev/null @@ -1,102 +0,0 @@ -package iavlproofs - -import ( - "fmt" - - ics23 "github.com/confio/ics23/go" - "github.com/cosmos/iavl" -) - -// IavlSpec constrains the format from ics23-iavl (iavl merkle ics23) -var IavlSpec = &ics23.ProofSpec{ - LeafSpec: &ics23.LeafOp{ - Prefix: []byte{0}, - Hash: ics23.HashOp_SHA256, - PrehashValue: ics23.HashOp_SHA256, - Length: ics23.LengthOp_VAR_PROTO, - }, - InnerSpec: &ics23.InnerSpec{ - ChildOrder: []int32{0, 1}, - MinPrefixLength: 4, - MaxPrefixLength: 12, - ChildSize: 33, // (with length byte) - Hash: ics23.HashOp_SHA256, - }, -} - -/* -CreateMembershipProof will produce a CommitmentProof that the given key (and queries value) exists in the iavl tree. -If the key doesn't exist in the tree, this will return an error. -*/ -func CreateMembershipProof(tree *iavl.MutableTree, key []byte) (*ics23.CommitmentProof, error) { - exist, err := createExistenceProof(tree, key) - if err != nil { - return nil, err - } - proof := &ics23.CommitmentProof{ - Proof: &ics23.CommitmentProof_Exist{ - Exist: exist, - }, - } - return proof, nil -} - -/* -CreateNonMembershipProof will produce a CommitmentProof that the given key doesn't exist in the iavl tree. -If the key exists in the tree, this will return an error. -*/ -func CreateNonMembershipProof(tree *iavl.MutableTree, key []byte) (*ics23.CommitmentProof, error) { - // idx is one node right of what we want.... - idx, val, err := tree.GetWithIndex(key) - if err != nil { - return nil, err - } - if val != nil { - return nil, fmt.Errorf("Cannot create NonExistanceProof when Key in State") - } - - nonexist := &ics23.NonExistenceProof{ - Key: key, - } - - if idx >= 1 { - leftkey, _, err := tree.GetByIndex(idx - 1) - if err != nil { - return nil, err - } - nonexist.Left, err = createExistenceProof(tree, leftkey) - if err != nil { - return nil, err - } - } - - // this will be nil if nothing right of the queried key - rightkey, _, err := tree.GetByIndex(idx) - if err != nil { - return nil, err - } - if rightkey != nil { - nonexist.Right, err = createExistenceProof(tree, rightkey) - if err != nil { - return nil, err - } - } - - proof := &ics23.CommitmentProof{ - Proof: &ics23.CommitmentProof_Nonexist{ - Nonexist: nonexist, - }, - } - return proof, nil -} - -func createExistenceProof(tree *iavl.MutableTree, key []byte) (*ics23.ExistenceProof, error) { - value, proof, err := tree.GetWithProof(key) - if err != nil { - return nil, err - } - if value == nil { - return nil, fmt.Errorf("Cannot create ExistanceProof when Key not in State") - } - return convertExistenceProof(proof, key, value) -} diff --git a/store/tools/ics23/iavl/create_test.go b/store/tools/ics23/iavl/create_test.go deleted file mode 100644 index 1a1f29561612..000000000000 --- a/store/tools/ics23/iavl/create_test.go +++ /dev/null @@ -1,80 +0,0 @@ -package iavlproofs - -import ( - "testing" - - ics23 "github.com/confio/ics23/go" - - tmproofs "github.com/cosmos/cosmos-sdk/store/internal/proofs" - "github.com/cosmos/cosmos-sdk/store/tools/ics23/iavl/helpers" -) - -func TestCreateMembership(t *testing.T) { - cases := map[string]struct { - size int - loc tmproofs.Where - }{ - "small left": {size: 100, loc: tmproofs.Left}, - "small middle": {size: 100, loc: tmproofs.Middle}, - "small right": {size: 100, loc: tmproofs.Right}, - "big left": {size: 5431, loc: tmproofs.Left}, - "big middle": {size: 5431, loc: tmproofs.Middle}, - "big right": {size: 5431, loc: tmproofs.Right}, - } - - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - tree, allkeys, err := helpers.BuildTree(tc.size) - if err != nil { - t.Fatalf("Creating tree: %+v", err) - } - key := helpers.GetKey(allkeys, tc.loc) - val, err := tree.Get(key) - proof, err := CreateMembershipProof(tree, key) - if err != nil { - t.Fatalf("Creating Proof: %+v", err) - } - - root, _ := tree.WorkingHash() - valid := ics23.VerifyMembership(IavlSpec, root, proof, key, val) - if !valid { - t.Fatalf("Membership Proof Invalid") - } - }) - } -} - -func TestCreateNonMembership(t *testing.T) { - cases := map[string]struct { - size int - loc tmproofs.Where - }{ - "small left": {size: 100, loc: tmproofs.Left}, - "small middle": {size: 100, loc: tmproofs.Middle}, - "small right": {size: 100, loc: tmproofs.Right}, - "big left": {size: 5431, loc: tmproofs.Left}, - "big middle": {size: 5431, loc: tmproofs.Middle}, - "big right": {size: 5431, loc: tmproofs.Right}, - } - - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - tree, allkeys, err := helpers.BuildTree(tc.size) - if err != nil { - t.Fatalf("Creating tree: %+v", err) - } - key := helpers.GetNonKey(allkeys, tc.loc) - - proof, err := CreateNonMembershipProof(tree, key) - if err != nil { - t.Fatalf("Creating Proof: %+v", err) - } - - root, _ := tree.WorkingHash() - valid := ics23.VerifyNonMembership(IavlSpec, root, proof, key) - if !valid { - t.Fatalf("Non Membership Proof Invalid") - } - }) - } -} diff --git a/store/tools/ics23/iavl/helpers/helpers.go b/store/tools/ics23/iavl/helpers/helpers.go deleted file mode 100644 index 4f41600b65ea..000000000000 --- a/store/tools/ics23/iavl/helpers/helpers.go +++ /dev/null @@ -1,108 +0,0 @@ -/* -Package helpers contains functions to build sample data for tests/testgen - -In it's own package to avoid polluting the godoc for ics23-iavl -*/ -package helpers - -import ( - "bytes" - "fmt" - "sort" - - "github.com/cosmos/iavl" - "github.com/tendermint/tendermint/libs/rand" - db "github.com/tendermint/tm-db" - - tmproofs "github.com/cosmos/cosmos-sdk/store/internal/proofs" -) - -// IavlResult is the result of one match -type IavlResult struct { - Key []byte - Value []byte - Proof *iavl.RangeProof - RootHash []byte -} - -// GenerateIavlResult makes a tree of size and returns a range proof for one random element -// -// returns a range proof and the root hash of the tree -func GenerateIavlResult(size int, loc tmproofs.Where) (*IavlResult, error) { - tree, allkeys, err := BuildTree(size) - if err != nil { - return nil, err - } - key := GetKey(allkeys, loc) - - value, proof, err := tree.GetWithProof(key) - if err != nil { - return nil, err - } - if value == nil { - return nil, fmt.Errorf("GetWithProof returned nil value") - } - if len(proof.Leaves) != 1 { - return nil, fmt.Errorf("GetWithProof returned %d leaves", len(proof.Leaves)) - } - root, _ := tree.WorkingHash() - - res := &IavlResult{ - Key: key, - Value: value, - Proof: proof, - RootHash: root, - } - return res, nil -} - -// GetKey returns a key, on Left/Right/Middle -func GetKey(allkeys [][]byte, loc tmproofs.Where) []byte { - if loc == tmproofs.Left { - return allkeys[0] - } - if loc == tmproofs.Right { - return allkeys[len(allkeys)-1] - } - // select a random index between 1 and allkeys-2 - idx := rand.NewRand().Int()%(len(allkeys)-2) + 1 - return allkeys[idx] -} - -// GetNonKey returns a missing key - Left of all, Right of all, or in the Middle -func GetNonKey(allkeys [][]byte, loc tmproofs.Where) []byte { - if loc == tmproofs.Left { - return []byte{0, 0, 0, 1} - } - if loc == tmproofs.Right { - return []byte{0xff, 0xff, 0xff, 0xff} - } - // otherwise, next to an existing key (copy before mod) - key := append([]byte{}, GetKey(allkeys, loc)...) - key[len(key)-2] = 255 - key[len(key)-1] = 255 - return key -} - -// BuildTree creates random key/values and stores in tree -// returns a list of all keys in sorted order -func BuildTree(size int) (tree *iavl.MutableTree, keys [][]byte, err error) { - tree, err = iavl.NewMutableTree(db.NewMemDB(), 0) - if err != nil { - return nil, nil, err - } - - // insert lots of info and store the bytes - keys = make([][]byte, size) - for i := 0; i < size; i++ { - key := rand.Str(20) - value := "value_for_" + key - tree.Set([]byte(key), []byte(value)) - keys[i] = []byte(key) - } - sort.Slice(keys, func(i, j int) bool { - return bytes.Compare(keys[i], keys[j]) < 0 - }) - - return tree, keys, nil -} diff --git a/store/tools/ics23/smt/Makefile b/store/tools/ics23/smt/Makefile deleted file mode 100644 index 83d10db73ba2..000000000000 --- a/store/tools/ics23/smt/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -.PHONY: build test testgen - -GENDIR ?= ./testdata - -# make sure we turn on go modules -export GO111MODULE := on - -build: - go build -mod=readonly ./cmd/testgen-smt - -test: - go test -mod=readonly . - -# Usage: GENDIR=../ics23/testdata/smt make testgen -testgen: - @mkdir -p "$(GENDIR)" - go run -mod=readonly ./cmd/testgen-smt exist left 987 > "$(GENDIR)"/exist_left.json - go run -mod=readonly ./cmd/testgen-smt exist middle 812 > "$(GENDIR)"/exist_middle.json - go run -mod=readonly ./cmd/testgen-smt exist right 1261 > "$(GENDIR)"/exist_right.json - go run -mod=readonly ./cmd/testgen-smt nonexist left 813 > "$(GENDIR)"/nonexist_left.json - go run -mod=readonly ./cmd/testgen-smt nonexist middle 691 > "$(GENDIR)"/nonexist_middle.json - go run -mod=readonly ./cmd/testgen-smt nonexist right 1535 > "$(GENDIR)"/nonexist_right.json - go run -mod=readonly ./cmd/testgen-smt batch 1801 20 0 > "$(GENDIR)"/batch_exist.json - go run -mod=readonly ./cmd/testgen-smt batch 1807 0 20 > "$(GENDIR)"/batch_nonexist.json diff --git a/store/tools/ics23/smt/README.md b/store/tools/ics23/smt/README.md deleted file mode 100644 index 82c06eddcbf1..000000000000 --- a/store/tools/ics23/smt/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Proofs SMT - -This project demonstrates the generation and validation of ICS-23 proofs for a sparse Merkle tree (SMT) as implemented by [Celestia](https://github.com/celestiaorg/smt). - -## Library usage - -It exposes a two main functions : - -`func CreateMembershipProof(tree *smt.SparseMerkleTree, key []byte) (*ics23.CommitmentProof, error)` -produces a CommitmentProof that the given key exists in the SMT (and contains the current value). This returns an error if the key does not exist in the tree. - -`func CreateNonMembershipProof(tree *smt.SparseMerkleTree, key []byte, preimages PreimageMap) (*ics23.CommitmentProof, error)` -produces a CommitmentProof that the given key doesn't exist in the SMT. This returns an error if the key exists in the tree. -This relies on an auxiliary `PreimageMap` object which provides access to the preimages of all keys in the tree based on their (hashed) path ordering. - - -## CLI usage - -We also expose a simple script to generate test data for the confio proofs package. - -```shell -go install ./cmd/testgen-smt -testgen-smt exist left 10 -``` - -Will output some json data, from a randomly generated Merkle tree each time. - -```json -{ - "key": "574f516c4364415274743845444d397347484937", - "proof": "0a9d010a2024910c64b5b74b6b72e6b9d3310a1d0bd599032e05e8abc43112d194e1a78f30121e76616c75655f666f725f574f516c4364415274743845444d3973474849371a07080118012a0100222708011201011a20b51557119b6985d54a48a4510e528d5f929f0b1c8b57914bb6cd8f9eab035d75222708011201011a20fff8248ca9e98cbb05c81612d38e74780b2c02d9c88ee628cfbdb8ca44769a63", - "root": "f69ef3599b7f0471b61735490636608a8ff43a327b2b5a3a5528ca7f7059ffa5", - "value": "76616c75655f666f725f574f516c4364415274743845444d397347484937" -} -``` - -`"root"` is the hex-encoded root hash of the Merkle tree. - -`"proof"` is the hex-encoding of the protobuf binary encoding of a `proofs.ExistenceProof` object. This contains a (key, value) pair, along with all steps to reach the root hash. This provides a non-trivial test case, to ensure clients in multiple languages can verify the protobuf proofs we generate from the SMT. diff --git a/store/tools/ics23/smt/cmd/testgen-smt/main.go b/store/tools/ics23/smt/cmd/testgen-smt/main.go deleted file mode 100644 index e2afe2ff0913..000000000000 --- a/store/tools/ics23/smt/cmd/testgen-smt/main.go +++ /dev/null @@ -1,214 +0,0 @@ -package main - -import ( - "crypto/sha256" - "encoding/hex" - "encoding/json" - "fmt" - "os" - - ics23 "github.com/confio/ics23/go" - - tmproofs "github.com/cosmos/cosmos-sdk/store/internal/proofs" - tools "github.com/cosmos/cosmos-sdk/store/tools/ics23" - smtproofs "github.com/cosmos/cosmos-sdk/store/tools/ics23/smt" - "github.com/cosmos/cosmos-sdk/store/tools/ics23/smt/helpers" -) - -/** -testgen-smt will generate a json struct on stdout (meant to be saved to file for testdata). -this will be an auto-generated existence proof in the form: - -{ - "root": "", - "key": "", - "value": " (empty on non-existence)", - "proof": "" -} - -It accepts two or three arguments (optional size: default 400) - - testgen-smt [exist|nonexist] [left|right|middle] - -If you make a batch, we have a different format: - -{ - "root": "", - "proof": "", - "items": [{ - "key": "", - "value": " (empty on non-existence)", - }, ...] -} - -The batch variant accepts 5 arguments: - - testgen-smt [batch] [size] [num exist] [num nonexist] -**/ - -func main() { - if len(os.Args) < 2 { - fmt.Println("Usage: testgen-smt batch [size] [# exist] [# nonexist]") - fmt.Println(" testgen-smt [exist|nonexist] [left|right|middle] ") - os.Exit(1) - } - - if os.Args[1] == "batch" { - size, exist, nonexist, err := tools.ParseBatchArgs(os.Args[2:]) - if err != nil { - fmt.Printf("%+v\n", err) - fmt.Println("Usage: testgen-smt batch [size] [# exist] [# nonexist]") - os.Exit(1) - } - err = doBatch(size, exist, nonexist) - if err != nil { - fmt.Printf("Error: %+v\n", err) - os.Exit(1) - } - return - } - - exist, loc, size, err := tools.ParseArgs(os.Args) - if err != nil { - fmt.Printf("%+v\n", err) - fmt.Println("Usage: testgen-smt [exist|nonexist] [left|right|middle] ") - os.Exit(1) - } - err = doSingle(exist, loc, size) - if err != nil { - fmt.Printf("Error: %+v\n", err) - os.Exit(1) - } -} - -func doSingle(exist bool, loc tmproofs.Where, size int) error { - tree, preim, err := helpers.BuildTree(size) - if err != nil { - return err - } - root := tree.Root() - - var key, value []byte - if exist { - key = preim.GetKey(loc) - value, err = tree.Get(key) - if err != nil { - return fmt.Errorf("get key: %w", err) - } - } else { - key = preim.GetNonKey(loc) - } - - var proof *ics23.CommitmentProof - if exist { - proof, err = smtproofs.CreateMembershipProof(tree, key) - } else { - proof, err = smtproofs.CreateNonMembershipProof(tree, key, preim) - } - if err != nil { - return fmt.Errorf("create proof: %w", err) - } - - binary, err := proof.Marshal() - if err != nil { - return fmt.Errorf("protobuf marshal: %w", err) - } - - path := sha256.Sum256(key) - res := map[string]interface{}{ - "root": hex.EncodeToString(root), - "key": hex.EncodeToString(path[:]), - "value": hex.EncodeToString(value), - "proof": hex.EncodeToString(binary), - } - out, err := json.MarshalIndent(res, "", " ") - if err != nil { - return fmt.Errorf("json encoding: %w", err) - } - - fmt.Println(string(out)) - return nil -} - -type item struct { - Key string `json:"key"` - Value string `json:"value"` -} - -func pickWhere(i int) tmproofs.Where { - if i > 2 { - return tmproofs.Middle - } - return tmproofs.Where(i) -} - -func doBatch(size, exist, nonexist int) error { - tree, preim, err := helpers.BuildTree(size) - if err != nil { - return err - } - root := tree.Root() - - items := []item{} - proofs := []*ics23.CommitmentProof{} - - for i := 0; i < exist; i++ { - where := pickWhere(i) - key := []byte(preim.GetKey(where)) - value, err := tree.Get(key) - if err != nil { - return fmt.Errorf("get key: %w", err) - } - proof, err := smtproofs.CreateMembershipProof(tree, key) - if err != nil { - return fmt.Errorf("create proof: %w", err) - } - proofs = append(proofs, proof) - path := sha256.Sum256(key) - item := item{ - Key: hex.EncodeToString(path[:]), - Value: hex.EncodeToString(value), - } - items = append(items, item) - } - - for i := 0; i < nonexist; i++ { - where := pickWhere(i) - key := []byte(preim.GetNonKey(where)) - proof, err := smtproofs.CreateNonMembershipProof(tree, key, preim) - if err != nil { - return fmt.Errorf("create proof: %w", err) - } - proofs = append(proofs, proof) - path := sha256.Sum256(key) - item := item{ - Key: hex.EncodeToString(path[:]), - } - items = append(items, item) - } - - // combine all proofs into batch and compress - proof, err := ics23.CombineProofs(proofs) - if err != nil { - return fmt.Errorf("combine proofs: %w", err) - } - - binary, err := proof.Marshal() - if err != nil { - return fmt.Errorf("protobuf marshal: %w", err) - } - - res := map[string]interface{}{ - "root": hex.EncodeToString(root), - "items": items, - "proof": hex.EncodeToString(binary), - } - out, err := json.MarshalIndent(res, "", " ") - if err != nil { - return fmt.Errorf("json encoding: %w", err) - } - - fmt.Println(string(out)) - - return nil -} diff --git a/store/tools/ics23/smt/create.go b/store/tools/ics23/smt/create.go deleted file mode 100644 index 47e1024ef4ef..000000000000 --- a/store/tools/ics23/smt/create.go +++ /dev/null @@ -1,126 +0,0 @@ -package smtproofs - -import ( - "crypto/sha256" - "fmt" - - ics23 "github.com/confio/ics23/go" - "github.com/lazyledger/smt" -) - -// PreimageMap represents an interface for accessing hashed tree paths and retrieving their -// corresponding preimages. -type PreimageMap interface { - // KeyFor returns the preimage (key) for given path index. - KeyFor(int) []byte - // FindPath returns the ordered index of a given path, and whether it's contained in the tree. - // If not found, the returned index is where the path would be inserted. - FindPath([32]byte) (int, bool) - // Len returns the number of mapped paths. - Len() int -} - -// CreateMembershipProof will produce a CommitmentProof that the given key (and queries value) exists in the SMT. -// If the key doesn't exist in the tree, this will return an error. -func CreateMembershipProof(tree *smt.SparseMerkleTree, key []byte) (*ics23.CommitmentProof, error) { - exist, err := createExistenceProof(tree, key) - if err != nil { - return nil, err - } - proof := &ics23.CommitmentProof{ - Proof: &ics23.CommitmentProof_Exist{ - Exist: exist, - }, - } - return proof, nil -} - -func createExistenceProof(tree *smt.SparseMerkleTree, key []byte) (*ics23.ExistenceProof, error) { - has, err := tree.Has(key) - if err != nil { - return nil, err - } - if !has { - return nil, fmt.Errorf("Cannot create ExistenceProof when key not in state") - } - value, err := tree.Get(key) - if err != nil { - return nil, err - } - proof, err := tree.Prove(key) - if err != nil { - return nil, err - } - path := sha256.Sum256(key) - return &ics23.ExistenceProof{ - Key: path[:], - Value: value, - Leaf: ics23.SmtSpec.LeafSpec, - Path: convertInnerOps(path[:], proof.SideNodes), - }, nil -} - -// CreateNonMembershipProof will produce a CommitmentProof that the given key doesn't exist in the SMT. -// If the key exists in the tree, this will return an error. -func CreateNonMembershipProof(tree *smt.SparseMerkleTree, key []byte, preimages PreimageMap) (*ics23.CommitmentProof, error) { - path := sha256.Sum256(key) - has, err := tree.Has(key) - if err != nil { - return nil, err - } - if has { - return nil, fmt.Errorf("Cannot create NonExistenceProof when key in state") - } - nonexist := &ics23.NonExistenceProof{ - Key: path[:], - } - ix, found := preimages.FindPath(path) - if found { - return nil, fmt.Errorf("Found index for key not in state") - } - if ix > 0 { - nonexist.Left, err = createExistenceProof(tree, preimages.KeyFor(ix-1)) - if err != nil { - return nil, err - } - } - if ix < preimages.Len() { - nonexist.Right, err = createExistenceProof(tree, preimages.KeyFor(ix)) - if err != nil { - return nil, err - } - } - return &ics23.CommitmentProof{ - Proof: &ics23.CommitmentProof_Nonexist{ - nonexist, - }, - }, nil -} - -func convertInnerOps(path []byte, sideNodes [][]byte) []*ics23.InnerOp { - depth := len(sideNodes) - inners := make([]*ics23.InnerOp, 0, depth) - for i := 0; i < len(sideNodes); i++ { - op := &ics23.InnerOp{ - Hash: ics23.HashOp_SHA256, - Prefix: []byte{1}, - } - if getBitAtFromMSB(path[:], depth-1-i) == 1 { - // right child is on path - op.Prefix = append(op.Prefix, sideNodes[i]...) - } else { - op.Suffix = sideNodes[i] - } - inners = append(inners, op) - } - return inners -} - -// getBitAtFromMSB gets the bit at an offset from the most significant bit -// Copied from github.com/celestiaorg/smt -func getBitAtFromMSB(data []byte, position int) int { - if int(data[position/8])&(1<<(8-1-uint(position)%8)) > 0 { - return 1 - } - return 0 -} diff --git a/store/tools/ics23/smt/create_test.go b/store/tools/ics23/smt/create_test.go deleted file mode 100644 index 71ec7722661e..000000000000 --- a/store/tools/ics23/smt/create_test.go +++ /dev/null @@ -1,84 +0,0 @@ -package smtproofs - -import ( - "crypto/sha256" - "testing" - - ics23 "github.com/confio/ics23/go" - - tmproofs "github.com/cosmos/cosmos-sdk/store/internal/proofs" - "github.com/cosmos/cosmos-sdk/store/tools/ics23/smt/helpers" -) - -var ( - numKeys = 50 - cases = map[string]struct { - size int - loc tmproofs.Where - }{ - "tiny left": {size: 10, loc: tmproofs.Left}, - "tiny middle": {size: 10, loc: tmproofs.Middle}, - "tiny right": {size: 10, loc: tmproofs.Right}, - "small left": {size: 100, loc: tmproofs.Left}, - "small middle": {size: 100, loc: tmproofs.Middle}, - "small right": {size: 100, loc: tmproofs.Right}, - "big left": {size: 5431, loc: tmproofs.Left}, - "big middle": {size: 5431, loc: tmproofs.Middle}, - "big right": {size: 5431, loc: tmproofs.Right}, - } -) - -func TestCreateMembership(t *testing.T) { - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - tree, preim, err := helpers.BuildTree(tc.size) - if err != nil { - t.Fatalf("Creating tree: %+v", err) - } - for i := 0; i < numKeys; i++ { - key := preim.GetKey(tc.loc) - val, err := tree.Get(key) - if err != nil { - t.Fatalf("Getting key: %+v", err) - } - proof, err := CreateMembershipProof(tree, key) - if err != nil { - t.Fatalf("Creating proof: %+v", err) - } - - root := tree.Root() - path := sha256.Sum256(key) - valid := ics23.VerifyMembership(ics23.SmtSpec, root, proof, path[:], val) - if !valid { - t.Fatalf("Membership proof invalid") - } - } - }) - } -} - -func TestCreateNonMembership(t *testing.T) { - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - tree, preim, err := helpers.BuildTree(tc.size) - if err != nil { - t.Fatalf("Creating tree: %+v", err) - } - - for i := 0; i < numKeys; i++ { - key := preim.GetNonKey(tc.loc) - proof, err := CreateNonMembershipProof(tree, key, preim) - if err != nil { - t.Fatalf("Creating proof: %+v", err) - } - - root := tree.Root() - path := sha256.Sum256(key) - valid := ics23.VerifyNonMembership(ics23.SmtSpec, root, proof, path[:]) - if !valid { - t.Fatalf("Non-membership proof invalid") - } - } - }) - } -} diff --git a/store/tools/ics23/smt/helpers/helpers.go b/store/tools/ics23/smt/helpers/helpers.go deleted file mode 100644 index d444c47d61ec..000000000000 --- a/store/tools/ics23/smt/helpers/helpers.go +++ /dev/null @@ -1,131 +0,0 @@ -/* -Package helpers contains functions to build sample data for tests/testgen - -In it's own package to avoid polluting the godoc for ics23-smt -*/ -package helpers - -import ( - "bytes" - "crypto/sha256" - "math/rand" - "sort" - - "github.com/lazyledger/smt" - - tmproofs "github.com/cosmos/cosmos-sdk/store/internal/proofs" -) - -// PreimageMap maps each tree path back to its preimage -// needed because SparseMerkleTree methods take preimage as arg and hash internally -type PreimageMap struct { - paths []preimageMapping - keys [][]byte - // known non-keys at left and rightmost positions - nonKeys []preimageMapping -} -type preimageMapping struct { - path [32]byte - keyIdx int // index of preimage in keys list -} - -// BuildTree creates random key/values and stores in tree -// returns a list of all keys in sorted order -func BuildTree(size int) (*smt.SparseMerkleTree, *PreimageMap, error) { - nodes, values := smt.NewSimpleMap(), smt.NewSimpleMap() - tree := smt.NewSparseMerkleTree(nodes, values, sha256.New()) - - // insert lots of info and store the bytes - keys := make([][]byte, size+2) - for i := 0; i < len(keys); i++ { - key := randStr(20) - - value := "value_for_" + key - _, err := tree.Update([]byte(key), []byte(value)) - if err != nil { - return nil, nil, err - } - keys[i] = []byte(key) - } - - var paths []preimageMapping - for i, key := range keys { - paths = append(paths, preimageMapping{sha256.Sum256(key), i}) - } - sort.Slice(paths, func(i, j int) bool { - return bytes.Compare(paths[i].path[:], paths[j].path[:]) < 0 - }) - - // now, find the edge paths and remove them from the tree - leftmost, rightmost := paths[0], paths[len(paths)-1] - _, err := tree.Delete(keys[leftmost.keyIdx]) - if err != nil { - return nil, nil, err - } - _, err = tree.Delete(keys[rightmost.keyIdx]) - if err != nil { - return nil, nil, err - } - - pim := PreimageMap{ - keys: keys, - paths: paths[1 : len(paths)-1], - nonKeys: []preimageMapping{leftmost, rightmost}, - } - return tree, &pim, nil -} - -// FindPath returns the closest index to path in paths, and whether it's a match. -// If not found, the returned index is where the path would be. -func (pim PreimageMap) FindPath(path [32]byte) (int, bool) { - var mid int - from, to := 0, len(pim.paths)-1 - for from <= to { - mid = (from + to) / 2 - switch bytes.Compare(pim.paths[mid].path[:], path[:]) { - case -1: - from = mid + 1 - case 1: - to = mid - 1 - default: - return mid, true - } - } - return from, false -} - -// Len returns the number of mapped paths. -func (pim PreimageMap) Len() int { return len(pim.paths) } - -// KeyFor returns the preimage (key) for given path index. -func (pim PreimageMap) KeyFor(pathIx int) []byte { - return pim.keys[pim.paths[pathIx].keyIdx] -} - -// GetKey this returns a key, on Left/Right/Middle -func (pim PreimageMap) GetKey(loc tmproofs.Where) []byte { - if loc == tmproofs.Left { - return pim.KeyFor(0) - } - if loc == tmproofs.Right { - return pim.KeyFor(len(pim.paths) - 1) - } - // select a random index between 1 and len-2 - idx := rand.Int()%(len(pim.paths)-2) + 1 - return pim.KeyFor(idx) -} - -// GetNonKey returns a missing key - Left of all, Right of all, or in the Middle -func (pim PreimageMap) GetNonKey(loc tmproofs.Where) []byte { - if loc == tmproofs.Left { - return pim.keys[pim.nonKeys[0].keyIdx] - } - if loc == tmproofs.Right { - return pim.keys[pim.nonKeys[1].keyIdx] - } - // otherwise, next to an existing key (copy before mod) - key := append([]byte{}, pim.GetKey(tmproofs.Middle)...) - key[len(key)-2] = 255 - key[len(key)-1] = 255 - return key -} diff --git a/store/tools/ics23/smt/helpers/random.go b/store/tools/ics23/smt/helpers/random.go deleted file mode 100644 index 85a963c9e2a0..000000000000 --- a/store/tools/ics23/smt/helpers/random.go +++ /dev/null @@ -1,34 +0,0 @@ -package helpers - -import ( - crand "crypto/rand" - "encoding/binary" - "fmt" - rand "math/rand" -) - -const ( - strChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" -) - -func init() { - rand.Seed(42) - // rand.Seed(crandSeed()) -} - -func randStr(n int) string { - b := make([]byte, n) - for i := range b { - b[i] = strChars[rand.Intn(len(strChars))] - } - return string(b) -} - -func crandSeed() int64 { - var seed int64 - err := binary.Read(crand.Reader, binary.BigEndian, &seed) - if err != nil { - panic(fmt.Sprintf("could not read random seed from crypto/rand: %v", err)) - } - return seed -} diff --git a/store/tools/ics23/tendermint/Makefile b/store/tools/ics23/tendermint/Makefile deleted file mode 100644 index 5d355d1ff47c..000000000000 --- a/store/tools/ics23/tendermint/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -.PHONY: build test testgen - -GENDIR ?= ./testdata - -# make sure we turn on go modules -export GO111MODULE := on - -build: - go build -mod=readonly ./cmd/testgen-simple - -test: - go test -mod=readonly . - -testgen: - # Usage: GENDIR=../ics23/testdata/tendermint make testgen - @mkdir -p "$(GENDIR)" - go run -mod=readonly ./cmd/testgen-simple exist left 987 > "$(GENDIR)"/exist_left.json - go run -mod=readonly ./cmd/testgen-simple exist middle 812 > "$(GENDIR)"/exist_middle.json - go run -mod=readonly ./cmd/testgen-simple exist right 1261 > "$(GENDIR)"/exist_right.json - go run -mod=readonly ./cmd/testgen-simple nonexist left 813 > "$(GENDIR)"/nonexist_left.json - go run -mod=readonly ./cmd/testgen-simple nonexist middle 691 > "$(GENDIR)"/nonexist_middle.json - go run -mod=readonly ./cmd/testgen-simple nonexist right 1535 > "$(GENDIR)"/nonexist_right.json - go run -mod=readonly ./cmd/testgen-simple batch 1801 20 0 > "$(GENDIR)"/batch_exist.json - go run -mod=readonly ./cmd/testgen-simple batch 1807 0 20 > "$(GENDIR)"/batch_nonexist.json diff --git a/store/tools/ics23/tendermint/README.md b/store/tools/ics23/tendermint/README.md deleted file mode 100644 index 09d85ccdc953..000000000000 --- a/store/tools/ics23/tendermint/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Proofs Tendermint - -This is an adapter library to convert the `SimpleProof` from -[tendermint/crypto/merkle](https://github.com/tendermint/tendermint/tree/master/crypto/merkle) -into the standard confio/proofs format. - -As non-existence proofs depend on ordered keys, and all proofs require the key-value pair -to be encoded in a predictable format in the leaves, we will only support proofs generated -from `SimpleProofsFromMap`, which handles the key-value pairs for leafs in a standard format. - -## Library usage - -It exposes a top-level function `func ConvertSimpleProof(p *merkle.SimpleProof, key, value []byte) (*proofs.ExistenceProof, error)` -that can convert from `merkle.SimpleProof` with the KVPair encoding for leafs, into confio/proof protobuf objects. - -It currently only works for existence proofs. We plan to soon support non-existence proofs. - -## CLI usage - -We also expose a simple script to generate test data for the confio proofs package. - -```shell -make testgen -``` - -Will output some json data, from a randomly generated merkle tree each time. - -```json -{ - "existence": "0a146f65436a684273735a34567543774b567a435963121e76616c75655f666f725f6f65436a684273735a34567543774b567a4359631a0d0a0b0801180120012a030002021a2d122b08011204020402201a2120d307032505383dee34ea9eadf7649c31d1ce294b6d62b273d804da478ac161da1a2d122b08011204040802201a2120306b7d51213bd93bac17c5ee3d727ec666300370b19fd55cc13d7341dc589a991a2b12290801122508160220857103d59863ac55d1f34008a681f837c01975a223c0f54883a05a446d49c7c6201a2b1229080112250a2202204498eb5c93e40934bc8bad9626f19e333c1c0be4541b9098f139585c3471bae2201a2d122b080112040e6c02201a212022648db12dbf830485cc41435ecfe37bcac26c6c305ac4304f649977ddc339d51a2c122a0801122610c60102204e0b7996a7104f5b1ac1a2caa0704c4b63f60112e0e13763b2ba03f40a54e845201a2c122a08011226129003022017858e28e0563f7252eaca19acfc1c3828c892e635f76f971b3fbdc9bbd2742e20", - "root": "cea07656c77e8655521f4c904730cf4649242b8e482be786b2b220a15150d5f0" -} -``` - -`"root"` is the hex-encoded root hash of the merkle tree - -`"existence"` is the hex-encoding of the protobuf binary encoding of a `proofs.ExistenceProof` object. This contains a (key, value) pair, -along with all steps to reach the root hash. This provides a non-trivial test case, to ensure client in multiple languages can verify the -protobuf proofs we generate from the iavl tree diff --git a/store/tools/ics23/tendermint/cmd/testgen-simple/main.go b/store/tools/ics23/tendermint/cmd/testgen-simple/main.go deleted file mode 100644 index b5fb104ebb60..000000000000 --- a/store/tools/ics23/tendermint/cmd/testgen-simple/main.go +++ /dev/null @@ -1,241 +0,0 @@ -package main - -import ( - "encoding/hex" - "encoding/json" - "fmt" - "os" - "strconv" - - tmproofs "github.com/cosmos/cosmos-sdk/store/internal/proofs" - - ics23 "github.com/confio/ics23/go" -) - -/** -testgen-simple will generate a json struct on stdout (meant to be saved to file for testdata). -this will be an auto-generated existence proof in the form: - -{ - "root": "", - "key": "", - "value": " (empty on non-existence)", - "proof": "" -} - -It accepts two or three arguments (optional size: default 400) - - testgen-simple [exist|nonexist] [left|right|middle] - -If you make a batch, we have a different format: - -{ - "root": "", - "proof": "", - "items": [{ - "key": "", - "value": " (empty on non-existence)", - }, ...] -} - -The batch variant accepts 5 arguments: - - testgen-simple [batch] [size] [num exist] [num nonexist] -**/ - -func main() { - if len(os.Args) < 2 { - fmt.Println("Usage: testgen-simple batch [size] [# exist] [# nonexist]") - fmt.Println(" testgen-simple [exist|nonexist] [left|right|middle] ") - os.Exit(1) - } - - if os.Args[1] == "batch" { - err := doBatch(os.Args[2:]) - if err != nil { - fmt.Printf("%+v\n", err) - fmt.Println("Usage: testgen-simple [batch] [size] [# exist] [# nonexist]") - os.Exit(1) - } - return - } - - exist, loc, size, err := parseArgs(os.Args) - if err != nil { - fmt.Printf("%+v\n", err) - fmt.Println("Usage: testgen-simple [exist|nonexist] [left|right|middle] ") - os.Exit(1) - } - - data := tmproofs.BuildMap(size) - allkeys := tmproofs.SortedKeys(data) - root := tmproofs.CalcRoot(data) - - var key, value []byte - if exist { - key = []byte(tmproofs.GetKey(allkeys, loc)) - value = data[string(key)] - } else { - key = []byte(tmproofs.GetNonKey(allkeys, loc)) - } - - var proof *ics23.CommitmentProof - if exist { - proof, err = tmproofs.CreateMembershipProof(data, key) - } else { - proof, err = tmproofs.CreateNonMembershipProof(data, key) - } - if err != nil { - fmt.Printf("Error: create proof: %+v\n", err) - os.Exit(1) - } - - binary, err := proof.Marshal() - if err != nil { - fmt.Printf("Error: protobuf marshal: %+v\n", err) - os.Exit(1) - } - - res := map[string]interface{}{ - "root": hex.EncodeToString(root), - "key": hex.EncodeToString(key), - "value": hex.EncodeToString(value), - "proof": hex.EncodeToString(binary), - } - out, err := json.MarshalIndent(res, "", " ") - if err != nil { - fmt.Printf("Error: json encoding: %+v\n", err) - os.Exit(1) - } - - fmt.Println(string(out)) -} - -func parseArgs(args []string) (exist bool, loc tmproofs.Where, size int, err error) { - if len(args) != 3 && len(args) != 4 { - err = fmt.Errorf("Insufficient args") - return - } - - switch args[1] { - case "exist": - exist = true - case "nonexist": - exist = false - default: - err = fmt.Errorf("Invalid arg: %s", args[1]) - return - } - - switch args[2] { - case "left": - loc = tmproofs.Left - case "middle": - loc = tmproofs.Middle - case "right": - loc = tmproofs.Right - default: - err = fmt.Errorf("Invalid arg: %s", args[2]) - return - } - - size = 400 - if len(args) == 4 { - size, err = strconv.Atoi(args[3]) - } - - return -} - -type item struct { - Key string `json:"key"` - Value string `json:"value"` -} - -func doBatch(args []string) error { - size, exist, nonexist, err := parseBatchArgs(args) - if err != nil { - return err - } - - data := tmproofs.BuildMap(size) - allkeys := tmproofs.SortedKeys(data) - root := tmproofs.CalcRoot(data) - - items := []item{} - proofs := []*ics23.CommitmentProof{} - - for i := 0; i < exist; i++ { - key := []byte(tmproofs.GetKey(allkeys, tmproofs.Middle)) - value := data[string(key)] - proof, err := tmproofs.CreateMembershipProof(data, key) - if err != nil { - return fmt.Errorf("create proof: %+v", err) - } - proofs = append(proofs, proof) - item := item{ - Key: hex.EncodeToString(key), - Value: hex.EncodeToString(value), - } - items = append(items, item) - } - - for i := 0; i < nonexist; i++ { - key := []byte(tmproofs.GetNonKey(allkeys, tmproofs.Middle)) - proof, err := tmproofs.CreateNonMembershipProof(data, key) - if err != nil { - return fmt.Errorf("create proof: %+v", err) - } - proofs = append(proofs, proof) - item := item{ - Key: hex.EncodeToString(key), - } - items = append(items, item) - } - - // combine all proofs into batch and compress - proof, err := ics23.CombineProofs(proofs) - if err != nil { - fmt.Printf("Error: combine proofs: %+v\n", err) - os.Exit(1) - } - - binary, err := proof.Marshal() - if err != nil { - fmt.Printf("Error: protobuf marshal: %+v\n", err) - os.Exit(1) - } - - res := map[string]interface{}{ - "root": hex.EncodeToString(root), - "items": items, - "proof": hex.EncodeToString(binary), - } - out, err := json.MarshalIndent(res, "", " ") - if err != nil { - fmt.Printf("Error: json encoding: %+v\n", err) - os.Exit(1) - } - - fmt.Println(string(out)) - - return nil -} - -func parseBatchArgs(args []string) (size int, exist int, nonexist int, err error) { - if len(args) != 3 { - err = fmt.Errorf("Insufficient args") - return - } - - size, err = strconv.Atoi(args[0]) - if err != nil { - return - } - exist, err = strconv.Atoi(args[1]) - if err != nil { - return - } - nonexist, err = strconv.Atoi(args[2]) - return -} diff --git a/cosmovisor/.gitignore b/tools/cosmovisor/.gitignore similarity index 100% rename from cosmovisor/.gitignore rename to tools/cosmovisor/.gitignore diff --git a/cosmovisor/.goreleaser.yml b/tools/cosmovisor/.goreleaser.yml similarity index 100% rename from cosmovisor/.goreleaser.yml rename to tools/cosmovisor/.goreleaser.yml diff --git a/cosmovisor/CHANGELOG.md b/tools/cosmovisor/CHANGELOG.md similarity index 96% rename from cosmovisor/CHANGELOG.md rename to tools/cosmovisor/CHANGELOG.md index e9e24249bbd1..d5e0a9c81e5e 100644 --- a/cosmovisor/CHANGELOG.md +++ b/tools/cosmovisor/CHANGELOG.md @@ -36,6 +36,12 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +## v1.4.0 2022-10-21 + +### API Breaking Changes + +* [#13603](https://github.com/cosmos-sdk/pull/13603) Rename cosmovisor package to `cosmossdk.io/tools/cosmovisor`. + ## v1.3.0 2022-09-11 ### Improvements diff --git a/cosmovisor/Makefile b/tools/cosmovisor/Makefile similarity index 100% rename from cosmovisor/Makefile rename to tools/cosmovisor/Makefile diff --git a/cosmovisor/README.md b/tools/cosmovisor/README.md similarity index 99% rename from cosmovisor/README.md rename to tools/cosmovisor/README.md index afaf25c38d98..cca08691b638 100644 --- a/cosmovisor/README.md +++ b/tools/cosmovisor/README.md @@ -49,7 +49,7 @@ You can download Cosmovisor from the [GitHub releases](https://github.com/cosmos To install the latest version of `cosmovisor`, run the following command: ```shell -go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@latest +go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest ``` To install a previous version, you can specify the version. IMPORTANT: Chains that use Cosmos-SDK v0.44.3 or earlier (eg v0.44.2) and want to use auto-download feature MUST use `cosmovisor v0.1.0` diff --git a/tools/cosmovisor/RELEASE_NOTES.md b/tools/cosmovisor/RELEASE_NOTES.md new file mode 100644 index 000000000000..c8f9d2e44dc8 --- /dev/null +++ b/tools/cosmovisor/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +# Cosmovisor v1.4.0 Release Notes + +* Rename cosmovisor package to `cosmossdk.io/tools/cosmovisor`. + +### Changelog + +For more details, please see the [CHANGELOG](https://github.com/cosmos/cosmos-sdk/blob/cosmovisor/v1.4.0/cosmovisor/CHANGELOG.md). diff --git a/cosmovisor/args.go b/tools/cosmovisor/args.go similarity index 99% rename from cosmovisor/args.go rename to tools/cosmovisor/args.go index 59345705dfcd..6913529c1675 100644 --- a/cosmovisor/args.go +++ b/tools/cosmovisor/args.go @@ -10,7 +10,7 @@ import ( "strings" "time" - cverrors "github.com/cosmos/cosmos-sdk/cosmovisor/errors" + cverrors "cosmossdk.io/tools/cosmovisor/errors" upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" "github.com/rs/zerolog" diff --git a/cosmovisor/args_test.go b/tools/cosmovisor/args_test.go similarity index 99% rename from cosmovisor/args_test.go rename to tools/cosmovisor/args_test.go index ed7a11cfe579..1121cd32dddf 100644 --- a/cosmovisor/args_test.go +++ b/tools/cosmovisor/args_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "github.com/cosmos/cosmos-sdk/cosmovisor/errors" + "cosmossdk.io/tools/cosmovisor/errors" ) type argsTestSuite struct { diff --git a/cosmovisor/buffer_test.go b/tools/cosmovisor/buffer_test.go similarity index 100% rename from cosmovisor/buffer_test.go rename to tools/cosmovisor/buffer_test.go diff --git a/cosmovisor/cmd/cosmovisor/help.go b/tools/cosmovisor/cmd/cosmovisor/help.go similarity index 95% rename from cosmovisor/cmd/cosmovisor/help.go rename to tools/cosmovisor/cmd/cosmovisor/help.go index dfaee7073061..cc4f38c50218 100644 --- a/cosmovisor/cmd/cosmovisor/help.go +++ b/tools/cosmovisor/cmd/cosmovisor/help.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "github.com/cosmos/cosmos-sdk/cosmovisor" + "cosmossdk.io/tools/cosmovisor" ) // GetHelpText creates the help text multi-line string. diff --git a/cosmovisor/cmd/cosmovisor/help_test.go b/tools/cosmovisor/cmd/cosmovisor/help_test.go similarity index 98% rename from cosmovisor/cmd/cosmovisor/help_test.go rename to tools/cosmovisor/cmd/cosmovisor/help_test.go index 3332cc777dd0..1b66b226cdfc 100644 --- a/cosmovisor/cmd/cosmovisor/help_test.go +++ b/tools/cosmovisor/cmd/cosmovisor/help_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "github.com/cosmos/cosmos-sdk/cosmovisor" + "cosmossdk.io/tools/cosmovisor" ) type HelpTestSuite struct { diff --git a/cosmovisor/cmd/cosmovisor/init.go b/tools/cosmovisor/cmd/cosmovisor/init.go similarity index 97% rename from cosmovisor/cmd/cosmovisor/init.go rename to tools/cosmovisor/cmd/cosmovisor/init.go index db06caa02297..6f2ea6770c9e 100644 --- a/cosmovisor/cmd/cosmovisor/init.go +++ b/tools/cosmovisor/cmd/cosmovisor/init.go @@ -10,8 +10,8 @@ import ( "github.com/rs/zerolog" "github.com/spf13/cobra" - "github.com/cosmos/cosmos-sdk/cosmovisor" - cverrors "github.com/cosmos/cosmos-sdk/cosmovisor/errors" + "cosmossdk.io/tools/cosmovisor" + cverrors "cosmossdk.io/tools/cosmovisor/errors" ) func init() { diff --git a/cosmovisor/cmd/cosmovisor/init_test.go b/tools/cosmovisor/cmd/cosmovisor/init_test.go similarity index 99% rename from cosmovisor/cmd/cosmovisor/init_test.go rename to tools/cosmovisor/cmd/cosmovisor/init_test.go index 7733bd2ae879..471721b67738 100644 --- a/cosmovisor/cmd/cosmovisor/init_test.go +++ b/tools/cosmovisor/cmd/cosmovisor/init_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "github.com/cosmos/cosmos-sdk/cosmovisor" + "cosmossdk.io/tools/cosmovisor" ) type InitTestSuite struct { diff --git a/cosmovisor/cmd/cosmovisor/main.go b/tools/cosmovisor/cmd/cosmovisor/main.go similarity index 73% rename from cosmovisor/cmd/cosmovisor/main.go rename to tools/cosmovisor/cmd/cosmovisor/main.go index 628b7da4f7f5..e032b28270bb 100644 --- a/cosmovisor/cmd/cosmovisor/main.go +++ b/tools/cosmovisor/cmd/cosmovisor/main.go @@ -4,8 +4,8 @@ import ( "context" "os" - "github.com/cosmos/cosmos-sdk/cosmovisor" - cverrors "github.com/cosmos/cosmos-sdk/cosmovisor/errors" + "cosmossdk.io/tools/cosmovisor" + cverrors "cosmossdk.io/tools/cosmovisor/errors" ) func main() { diff --git a/cosmovisor/cmd/cosmovisor/root.go b/tools/cosmovisor/cmd/cosmovisor/root.go similarity index 100% rename from cosmovisor/cmd/cosmovisor/root.go rename to tools/cosmovisor/cmd/cosmovisor/root.go diff --git a/cosmovisor/cmd/cosmovisor/run.go b/tools/cosmovisor/cmd/cosmovisor/run.go similarity index 97% rename from cosmovisor/cmd/cosmovisor/run.go rename to tools/cosmovisor/cmd/cosmovisor/run.go index 8128533161a1..904628df82ad 100644 --- a/cosmovisor/cmd/cosmovisor/run.go +++ b/tools/cosmovisor/cmd/cosmovisor/run.go @@ -1,7 +1,7 @@ package main import ( - "github.com/cosmos/cosmos-sdk/cosmovisor" + "cosmossdk.io/tools/cosmovisor" "github.com/rs/zerolog" "github.com/spf13/cobra" ) diff --git a/cosmovisor/cmd/cosmovisor/run_config.go b/tools/cosmovisor/cmd/cosmovisor/run_config.go similarity index 100% rename from cosmovisor/cmd/cosmovisor/run_config.go rename to tools/cosmovisor/cmd/cosmovisor/run_config.go diff --git a/cosmovisor/cmd/cosmovisor/run_test.go b/tools/cosmovisor/cmd/cosmovisor/run_test.go similarity index 100% rename from cosmovisor/cmd/cosmovisor/run_test.go rename to tools/cosmovisor/cmd/cosmovisor/run_test.go diff --git a/cosmovisor/cmd/cosmovisor/version.go b/tools/cosmovisor/cmd/cosmovisor/version.go similarity index 97% rename from cosmovisor/cmd/cosmovisor/version.go rename to tools/cosmovisor/cmd/cosmovisor/version.go index 0651da67250e..2a0bb5673c78 100644 --- a/cosmovisor/cmd/cosmovisor/version.go +++ b/tools/cosmovisor/cmd/cosmovisor/version.go @@ -6,7 +6,7 @@ import ( "runtime/debug" "strings" - "github.com/cosmos/cosmos-sdk/cosmovisor" + "cosmossdk.io/tools/cosmovisor" "github.com/rs/zerolog" "github.com/spf13/cobra" ) diff --git a/cosmovisor/cmd/cosmovisor/version_test.go b/tools/cosmovisor/cmd/cosmovisor/version_test.go similarity index 91% rename from cosmovisor/cmd/cosmovisor/version_test.go rename to tools/cosmovisor/cmd/cosmovisor/version_test.go index f9dfa1401443..b44be81c82f8 100644 --- a/cosmovisor/cmd/cosmovisor/version_test.go +++ b/tools/cosmovisor/cmd/cosmovisor/version_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/cosmos/cosmos-sdk/cosmovisor" + "cosmossdk.io/tools/cosmovisor" "github.com/cosmos/cosmos-sdk/testutil" "github.com/stretchr/testify/require" ) diff --git a/cosmovisor/errors/multi.go b/tools/cosmovisor/errors/multi.go similarity index 100% rename from cosmovisor/errors/multi.go rename to tools/cosmovisor/errors/multi.go diff --git a/cosmovisor/errors/multi_test.go b/tools/cosmovisor/errors/multi_test.go similarity index 100% rename from cosmovisor/errors/multi_test.go rename to tools/cosmovisor/errors/multi_test.go diff --git a/cosmovisor/go.mod b/tools/cosmovisor/go.mod similarity index 99% rename from cosmovisor/go.mod rename to tools/cosmovisor/go.mod index b7e9142b55c6..bc735432fa33 100644 --- a/cosmovisor/go.mod +++ b/tools/cosmovisor/go.mod @@ -1,4 +1,4 @@ -module github.com/cosmos/cosmos-sdk/cosmovisor +module cosmossdk.io/tools/cosmovisor go 1.19 diff --git a/cosmovisor/go.sum b/tools/cosmovisor/go.sum similarity index 100% rename from cosmovisor/go.sum rename to tools/cosmovisor/go.sum diff --git a/cosmovisor/logger.go b/tools/cosmovisor/logger.go similarity index 100% rename from cosmovisor/logger.go rename to tools/cosmovisor/logger.go diff --git a/cosmovisor/process.go b/tools/cosmovisor/process.go similarity index 100% rename from cosmovisor/process.go rename to tools/cosmovisor/process.go diff --git a/cosmovisor/process_test.go b/tools/cosmovisor/process_test.go similarity index 99% rename from cosmovisor/process_test.go rename to tools/cosmovisor/process_test.go index 1beadecc7e78..ea9b3621f10a 100644 --- a/cosmovisor/process_test.go +++ b/tools/cosmovisor/process_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "github.com/cosmos/cosmos-sdk/cosmovisor" + "cosmossdk.io/tools/cosmovisor" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) diff --git a/cosmovisor/scanner.go b/tools/cosmovisor/scanner.go similarity index 100% rename from cosmovisor/scanner.go rename to tools/cosmovisor/scanner.go diff --git a/cosmovisor/scanner_test.go b/tools/cosmovisor/scanner_test.go similarity index 100% rename from cosmovisor/scanner_test.go rename to tools/cosmovisor/scanner_test.go diff --git a/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod b/tools/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod similarity index 100% rename from cosmovisor/testdata/download/cosmovisor/genesis/bin/autod rename to tools/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod diff --git a/cosmovisor/testdata/download/data/.gitkeep b/tools/cosmovisor/testdata/download/data/.gitkeep similarity index 100% rename from cosmovisor/testdata/download/data/.gitkeep rename to tools/cosmovisor/testdata/download/data/.gitkeep diff --git a/cosmovisor/testdata/repo/chain2-zip_bin/autod b/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod similarity index 100% rename from cosmovisor/testdata/repo/chain2-zip_bin/autod rename to tools/cosmovisor/testdata/repo/chain2-zip_bin/autod diff --git a/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip b/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip similarity index 100% rename from cosmovisor/testdata/repo/chain2-zip_bin/autod.zip rename to tools/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip diff --git a/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip b/tools/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip similarity index 100% rename from cosmovisor/testdata/repo/chain3-zip_dir/autod.zip rename to tools/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip diff --git a/cosmovisor/testdata/repo/chain3-zip_dir/bin/autod b/tools/cosmovisor/testdata/repo/chain3-zip_dir/bin/autod similarity index 100% rename from cosmovisor/testdata/repo/chain3-zip_dir/bin/autod rename to tools/cosmovisor/testdata/repo/chain3-zip_dir/bin/autod diff --git a/cosmovisor/testdata/repo/raw_binary/autod b/tools/cosmovisor/testdata/repo/raw_binary/autod similarity index 100% rename from cosmovisor/testdata/repo/raw_binary/autod rename to tools/cosmovisor/testdata/repo/raw_binary/autod diff --git a/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json b/tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json similarity index 100% rename from cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json rename to tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json diff --git a/cosmovisor/testdata/repo/zip_directory/autod.zip b/tools/cosmovisor/testdata/repo/zip_directory/autod.zip similarity index 100% rename from cosmovisor/testdata/repo/zip_directory/autod.zip rename to tools/cosmovisor/testdata/repo/zip_directory/autod.zip diff --git a/cosmovisor/testdata/upgrade-files/f1-good.json b/tools/cosmovisor/testdata/upgrade-files/f1-good.json similarity index 100% rename from cosmovisor/testdata/upgrade-files/f1-good.json rename to tools/cosmovisor/testdata/upgrade-files/f1-good.json diff --git a/cosmovisor/testdata/upgrade-files/f2-bad-type-2.json b/tools/cosmovisor/testdata/upgrade-files/f2-bad-type-2.json similarity index 100% rename from cosmovisor/testdata/upgrade-files/f2-bad-type-2.json rename to tools/cosmovisor/testdata/upgrade-files/f2-bad-type-2.json diff --git a/cosmovisor/testdata/upgrade-files/f2-bad-type.json b/tools/cosmovisor/testdata/upgrade-files/f2-bad-type.json similarity index 100% rename from cosmovisor/testdata/upgrade-files/f2-bad-type.json rename to tools/cosmovisor/testdata/upgrade-files/f2-bad-type.json diff --git a/cosmovisor/testdata/upgrade-files/f2-normalized-name.json b/tools/cosmovisor/testdata/upgrade-files/f2-normalized-name.json similarity index 100% rename from cosmovisor/testdata/upgrade-files/f2-normalized-name.json rename to tools/cosmovisor/testdata/upgrade-files/f2-normalized-name.json diff --git a/cosmovisor/testdata/upgrade-files/f3-empty.json b/tools/cosmovisor/testdata/upgrade-files/f3-empty.json similarity index 100% rename from cosmovisor/testdata/upgrade-files/f3-empty.json rename to tools/cosmovisor/testdata/upgrade-files/f3-empty.json diff --git a/cosmovisor/testdata/upgrade-files/f4-empty-obj.json b/tools/cosmovisor/testdata/upgrade-files/f4-empty-obj.json similarity index 100% rename from cosmovisor/testdata/upgrade-files/f4-empty-obj.json rename to tools/cosmovisor/testdata/upgrade-files/f4-empty-obj.json diff --git a/cosmovisor/testdata/upgrade-files/f5-partial-obj-1.json b/tools/cosmovisor/testdata/upgrade-files/f5-partial-obj-1.json similarity index 100% rename from cosmovisor/testdata/upgrade-files/f5-partial-obj-1.json rename to tools/cosmovisor/testdata/upgrade-files/f5-partial-obj-1.json diff --git a/cosmovisor/testdata/upgrade-files/f5-partial-obj-2.json b/tools/cosmovisor/testdata/upgrade-files/f5-partial-obj-2.json similarity index 100% rename from cosmovisor/testdata/upgrade-files/f5-partial-obj-2.json rename to tools/cosmovisor/testdata/upgrade-files/f5-partial-obj-2.json diff --git a/cosmovisor/testdata/validate/cosmovisor/genesis/bin/dummyd b/tools/cosmovisor/testdata/validate/cosmovisor/genesis/bin/dummyd similarity index 100% rename from cosmovisor/testdata/validate/cosmovisor/genesis/bin/dummyd rename to tools/cosmovisor/testdata/validate/cosmovisor/genesis/bin/dummyd diff --git a/cosmovisor/testdata/validate/cosmovisor/upgrades/chain2/bin/dummyd b/tools/cosmovisor/testdata/validate/cosmovisor/upgrades/chain2/bin/dummyd similarity index 100% rename from cosmovisor/testdata/validate/cosmovisor/upgrades/chain2/bin/dummyd rename to tools/cosmovisor/testdata/validate/cosmovisor/upgrades/chain2/bin/dummyd diff --git a/cosmovisor/testdata/validate/cosmovisor/upgrades/chain3/bin/dummyd b/tools/cosmovisor/testdata/validate/cosmovisor/upgrades/chain3/bin/dummyd similarity index 100% rename from cosmovisor/testdata/validate/cosmovisor/upgrades/chain3/bin/dummyd rename to tools/cosmovisor/testdata/validate/cosmovisor/upgrades/chain3/bin/dummyd diff --git a/cosmovisor/testdata/validate/cosmovisor/upgrades/nobin/bin/.keep b/tools/cosmovisor/testdata/validate/cosmovisor/upgrades/nobin/bin/.keep similarity index 100% rename from cosmovisor/testdata/validate/cosmovisor/upgrades/nobin/bin/.keep rename to tools/cosmovisor/testdata/validate/cosmovisor/upgrades/nobin/bin/.keep diff --git a/cosmovisor/testdata/validate/cosmovisor/upgrades/noexec/bin/dummyd b/tools/cosmovisor/testdata/validate/cosmovisor/upgrades/noexec/bin/dummyd similarity index 100% rename from cosmovisor/testdata/validate/cosmovisor/upgrades/noexec/bin/dummyd rename to tools/cosmovisor/testdata/validate/cosmovisor/upgrades/noexec/bin/dummyd diff --git a/cosmovisor/testdata/validate/data/.gitkeep b/tools/cosmovisor/testdata/validate/data/.gitkeep similarity index 100% rename from cosmovisor/testdata/validate/data/.gitkeep rename to tools/cosmovisor/testdata/validate/data/.gitkeep diff --git a/cosmovisor/upgrade.go b/tools/cosmovisor/upgrade.go similarity index 100% rename from cosmovisor/upgrade.go rename to tools/cosmovisor/upgrade.go diff --git a/cosmovisor/upgrade_test.go b/tools/cosmovisor/upgrade_test.go similarity index 99% rename from cosmovisor/upgrade_test.go rename to tools/cosmovisor/upgrade_test.go index 13ad4669d289..7187ce7bd5ab 100644 --- a/cosmovisor/upgrade_test.go +++ b/tools/cosmovisor/upgrade_test.go @@ -17,7 +17,7 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "github.com/cosmos/cosmos-sdk/cosmovisor" + "cosmossdk.io/tools/cosmovisor" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) diff --git a/x/gov/README.md b/x/gov/README.md index 757cc25c43d1..2ab24cfb48e7 100644 --- a/x/gov/README.md +++ b/x/gov/README.md @@ -321,7 +321,7 @@ Once a block contains more than 2/3rd *precommits* where a common nodes, non-validating full nodes and light-nodes) are expected to switch to the new version of the software. -Validators and full nodes can use an automation tool, such as [Cosmovisor](https://github.com/cosmos/cosmos-sdk/blob/main/cosmovisor/README.md), for automatically switching version of the chain. +Validators and full nodes can use an automation tool, such as [Cosmovisor](https://github.com/cosmos/cosmos-sdk/blob/main/tools/cosmovisor/README.md), for automatically switching version of the chain. # State diff --git a/x/upgrade/README.md b/x/upgrade/README.md index fea951323661..7e682fb4bcb2 100644 --- a/x/upgrade/README.md +++ b/x/upgrade/README.md @@ -45,7 +45,7 @@ automatically upgrade to. If an operator running the application binary also runs a sidecar process to assist in the automatic download and upgrade of a binary, the `Info` allows this process to -be seamless. This tool is [Cosmovisor](https://github.com/cosmos/cosmos-sdk/tree/main/cosmovisor#readme). +be seamless. This tool is [Cosmovisor](https://github.com/cosmos/cosmos-sdk/tree/main/tools/cosmovisor#readme). ```go type Plan struct { From e2792711ba890607db2542e6d0671d9f8e753659 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Oct 2022 12:44:58 -0400 Subject: [PATCH 05/26] build(deps): Bump cosmossdk.io/depinject from 1.0.0-alpha.2 to 1.0.0-alpha.3 in /tests (#13596) * build(deps): Bump cosmossdk.io/depinject in /tests Bumps [cosmossdk.io/depinject](https://github.com/cosmos/cosmos-sdk) from 1.0.0-alpha.2 to 1.0.0-alpha.3. - [Release notes](https://github.com/cosmos/cosmos-sdk/releases) - [Changelog](https://github.com/cosmos/cosmos-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/cosmos/cosmos-sdk/compare/orm/v1.0.0-alpha.2...orm/v1.0.0-alpha.3) --- updated-dependencies: - dependency-name: cosmossdk.io/depinject dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * build(deps): Bump cosmossdk.io/depinject from 1.0.0-alpha.2 to 1.0.0-alpha.3 in /tests for all modules * update core version * x/consensus providers need to be exported Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Aaron Craelius Co-authored-by: Aaron Craelius --- core/go.mod | 2 +- core/go.sum | 4 ++-- go.mod | 6 +++--- go.sum | 12 ++++++------ simapp/go.mod | 6 +++--- simapp/go.sum | 12 ++++++------ tests/go.mod | 6 +++--- tests/go.sum | 12 ++++++------ tx/go.mod | 2 +- x/consensus/module.go | 12 ++++++------ 10 files changed, 37 insertions(+), 37 deletions(-) diff --git a/core/go.mod b/core/go.mod index 3807e6a20b89..7d19fe125385 100644 --- a/core/go.mod +++ b/core/go.mod @@ -21,7 +21,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 // indirect + golang.org/x/exp v0.0.0-20221019170559-20944726eadf // indirect golang.org/x/net v0.0.0-20221017152216-f25eb7ecb193 // indirect golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43 // indirect golang.org/x/text v0.3.8 // indirect diff --git a/core/go.sum b/core/go.sum index d356a87c000d..eb6a29327223 100644 --- a/core/go.sum +++ b/core/go.sum @@ -39,8 +39,8 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 h1:tnebWN09GYg9OLPss1KXj8txwZc6X6uMr6VFdcGNbHw= -golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= +golang.org/x/exp v0.0.0-20221019170559-20944726eadf h1:nFVjjKDgNY37+ZSYCJmtYf7tOlfQswHqplG2eosjOMg= +golang.org/x/exp v0.0.0-20221019170559-20944726eadf/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= diff --git a/go.mod b/go.mod index 1e3a5341c1c8..8027c305d405 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,8 @@ module github.com/cosmos/cosmos-sdk require ( cosmossdk.io/api v0.2.1 - cosmossdk.io/core v0.2.0 - cosmossdk.io/depinject v1.0.0-alpha.2 + cosmossdk.io/core v0.3.0 + cosmossdk.io/depinject v1.0.0-alpha.3 cosmossdk.io/errors v1.0.0-beta.7 cosmossdk.io/math v1.0.0-beta.3 github.com/99designs/keyring v1.2.1 @@ -54,7 +54,7 @@ require ( github.com/tendermint/tendermint v0.37.0-alpha.2 github.com/tendermint/tm-db v0.6.7 golang.org/x/crypto v0.0.0-20221010152910-d6f0a8c073c2 - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e + golang.org/x/exp v0.0.0-20221019170559-20944726eadf google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a google.golang.org/grpc v1.50.1 google.golang.org/protobuf v1.28.1 diff --git a/go.sum b/go.sum index e827564001cc..5927e92d71e0 100644 --- a/go.sum +++ b/go.sum @@ -59,10 +59,10 @@ cloud.google.com/go/storage v1.14.0 h1:6RRlFMv1omScs6iq2hfE3IvgE+l6RfJPampq8UZc5 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cosmossdk.io/api v0.2.1 h1:4m6vIHKJygrixSIfOsD3Mhij9vZlQC/+BTeb+Un9os0= cosmossdk.io/api v0.2.1/go.mod h1:kNpfY0UY7Cz4ZuLJ4hm9auUGfmj23UFpOQ/Bo8IKCFw= -cosmossdk.io/core v0.2.0 h1:gwDzEzCX4tyegDAgmNOsVaiSKG4ILg7wo2D5KW0bhMQ= -cosmossdk.io/core v0.2.0/go.mod h1:w5HHliErOpYv2LlUPA2FYYHtElsCaf9oiXM6TM+ueZI= -cosmossdk.io/depinject v1.0.0-alpha.2 h1:pVcPnqc8bY2GCHVMj77rk6Ew7uz0K3QhrUHdqoKvO5g= -cosmossdk.io/depinject v1.0.0-alpha.2/go.mod h1:Wmu0TV/H4s4s8zaJ9YnaioLyCbqlCvMQ4xTtzJzGzvA= +cosmossdk.io/core v0.3.0 h1:ief7yWnQaXiGuhu+xcs5w8T9KHwkV2dy+tk4jck2hK8= +cosmossdk.io/core v0.3.0/go.mod h1:Pgb+291E7hq552xh1a8TsYZY1BnLpherqDSfh4KgC8I= +cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= +cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= cosmossdk.io/math v1.0.0-beta.3 h1:TbZxSopz2LqjJ7aXYfn7nJSb8vNaBklW6BLpcei1qwM= @@ -875,8 +875,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 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 v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= +golang.org/x/exp v0.0.0-20221019170559-20944726eadf h1:nFVjjKDgNY37+ZSYCJmtYf7tOlfQswHqplG2eosjOMg= +golang.org/x/exp v0.0.0-20221019170559-20944726eadf/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= 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= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/simapp/go.mod b/simapp/go.mod index 801bfaf93b8f..fde90462a31b 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -4,8 +4,8 @@ go 1.19 require ( cosmossdk.io/api v0.2.1 - cosmossdk.io/core v0.2.0 - cosmossdk.io/depinject v1.0.0-alpha.2 + cosmossdk.io/core v0.3.0 + cosmossdk.io/depinject v1.0.0-alpha.3 cosmossdk.io/math v1.0.0-beta.3 github.com/cosmos/cosmos-sdk v0.0.0-00010101000000-000000000000 github.com/golang/mock v1.6.0 @@ -135,7 +135,7 @@ require ( go.etcd.io/bbolt v1.3.6 // indirect go.opencensus.io v0.23.0 // indirect golang.org/x/crypto v0.0.0-20221010152910-d6f0a8c073c2 // indirect - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect + golang.org/x/exp v0.0.0-20221019170559-20944726eadf // indirect golang.org/x/net v0.0.0-20221017152216-f25eb7ecb193 // indirect golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43 // indirect diff --git a/simapp/go.sum b/simapp/go.sum index 87fd15b1df74..7ee3572850cc 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -59,10 +59,10 @@ cloud.google.com/go/storage v1.14.0 h1:6RRlFMv1omScs6iq2hfE3IvgE+l6RfJPampq8UZc5 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cosmossdk.io/api v0.2.1 h1:4m6vIHKJygrixSIfOsD3Mhij9vZlQC/+BTeb+Un9os0= cosmossdk.io/api v0.2.1/go.mod h1:kNpfY0UY7Cz4ZuLJ4hm9auUGfmj23UFpOQ/Bo8IKCFw= -cosmossdk.io/core v0.2.0 h1:gwDzEzCX4tyegDAgmNOsVaiSKG4ILg7wo2D5KW0bhMQ= -cosmossdk.io/core v0.2.0/go.mod h1:w5HHliErOpYv2LlUPA2FYYHtElsCaf9oiXM6TM+ueZI= -cosmossdk.io/depinject v1.0.0-alpha.2 h1:pVcPnqc8bY2GCHVMj77rk6Ew7uz0K3QhrUHdqoKvO5g= -cosmossdk.io/depinject v1.0.0-alpha.2/go.mod h1:Wmu0TV/H4s4s8zaJ9YnaioLyCbqlCvMQ4xTtzJzGzvA= +cosmossdk.io/core v0.3.0 h1:ief7yWnQaXiGuhu+xcs5w8T9KHwkV2dy+tk4jck2hK8= +cosmossdk.io/core v0.3.0/go.mod h1:Pgb+291E7hq552xh1a8TsYZY1BnLpherqDSfh4KgC8I= +cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= +cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= cosmossdk.io/math v1.0.0-beta.3 h1:TbZxSopz2LqjJ7aXYfn7nJSb8vNaBklW6BLpcei1qwM= @@ -863,8 +863,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 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 v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= +golang.org/x/exp v0.0.0-20221019170559-20944726eadf h1:nFVjjKDgNY37+ZSYCJmtYf7tOlfQswHqplG2eosjOMg= +golang.org/x/exp v0.0.0-20221019170559-20944726eadf/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= 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= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/tests/go.mod b/tests/go.mod index 1590f260878d..bbed28052131 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( cosmossdk.io/api v0.2.1 - cosmossdk.io/depinject v1.0.0-alpha.2 + cosmossdk.io/depinject v1.0.0-alpha.3 cosmossdk.io/math v1.0.0-beta.3 cosmossdk.io/simapp v0.0.0-20220908203654-84d4bf5accad github.com/cosmos/cosmos-sdk v0.0.0-00010101000000-000000000000 @@ -23,7 +23,7 @@ require ( cloud.google.com/go/compute v1.6.1 // indirect cloud.google.com/go/iam v0.3.0 // indirect cloud.google.com/go/storage v1.14.0 // indirect - cosmossdk.io/core v0.2.0 // indirect + cosmossdk.io/core v0.3.0 // indirect cosmossdk.io/errors v1.0.0-beta.7 // indirect filippo.io/edwards25519 v1.0.0-rc.1 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect @@ -137,7 +137,7 @@ require ( go.etcd.io/bbolt v1.3.6 // indirect go.opencensus.io v0.23.0 // indirect golang.org/x/crypto v0.0.0-20221010152910-d6f0a8c073c2 // indirect - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect + golang.org/x/exp v0.0.0-20221019170559-20944726eadf // indirect golang.org/x/net v0.0.0-20221017152216-f25eb7ecb193 // indirect golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43 // indirect diff --git a/tests/go.sum b/tests/go.sum index b6ebda34e63d..4c99da67f992 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -59,10 +59,10 @@ cloud.google.com/go/storage v1.14.0 h1:6RRlFMv1omScs6iq2hfE3IvgE+l6RfJPampq8UZc5 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cosmossdk.io/api v0.2.1 h1:4m6vIHKJygrixSIfOsD3Mhij9vZlQC/+BTeb+Un9os0= cosmossdk.io/api v0.2.1/go.mod h1:kNpfY0UY7Cz4ZuLJ4hm9auUGfmj23UFpOQ/Bo8IKCFw= -cosmossdk.io/core v0.2.0 h1:gwDzEzCX4tyegDAgmNOsVaiSKG4ILg7wo2D5KW0bhMQ= -cosmossdk.io/core v0.2.0/go.mod h1:w5HHliErOpYv2LlUPA2FYYHtElsCaf9oiXM6TM+ueZI= -cosmossdk.io/depinject v1.0.0-alpha.2 h1:pVcPnqc8bY2GCHVMj77rk6Ew7uz0K3QhrUHdqoKvO5g= -cosmossdk.io/depinject v1.0.0-alpha.2/go.mod h1:Wmu0TV/H4s4s8zaJ9YnaioLyCbqlCvMQ4xTtzJzGzvA= +cosmossdk.io/core v0.3.0 h1:ief7yWnQaXiGuhu+xcs5w8T9KHwkV2dy+tk4jck2hK8= +cosmossdk.io/core v0.3.0/go.mod h1:Pgb+291E7hq552xh1a8TsYZY1BnLpherqDSfh4KgC8I= +cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= +cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= cosmossdk.io/math v1.0.0-beta.3 h1:TbZxSopz2LqjJ7aXYfn7nJSb8vNaBklW6BLpcei1qwM= @@ -865,8 +865,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 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 v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= +golang.org/x/exp v0.0.0-20221019170559-20944726eadf h1:nFVjjKDgNY37+ZSYCJmtYf7tOlfQswHqplG2eosjOMg= +golang.org/x/exp v0.0.0-20221019170559-20944726eadf/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= 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= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/tx/go.mod b/tx/go.mod index 51ac5b162356..f5952377a0e3 100644 --- a/tx/go.mod +++ b/tx/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( cosmossdk.io/api v0.2.1 - cosmossdk.io/core v0.0.0-00010101000000-000000000000 + cosmossdk.io/core v0.3.0 cosmossdk.io/math v1.0.0-beta.3 github.com/cosmos/cosmos-proto v1.0.0-alpha8 github.com/stretchr/testify v1.8.0 diff --git a/x/consensus/module.go b/x/consensus/module.go index 5c09fe156877..6dcef77d93ed 100644 --- a/x/consensus/module.go +++ b/x/consensus/module.go @@ -123,15 +123,15 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {} func init() { appmodule.Register( &modulev1.Module{}, - appmodule.Provide(provideModuleBasic, provideModule), + appmodule.Provide(ProvideModuleBasic, ProvideModule), ) } -func provideModuleBasic() runtime.AppModuleBasicWrapper { +func ProvideModuleBasic() runtime.AppModuleBasicWrapper { return runtime.WrapAppModuleBasic(AppModuleBasic{}) } -type consensusParamInputs struct { +type ConsensusParamInputs struct { depinject.In Cdc codec.Codec @@ -140,7 +140,7 @@ type consensusParamInputs struct { Authority map[string]sdk.AccAddress `optional:"true"` } -type consensusParamOutputs struct { +type ConsensusParamOutputs struct { depinject.Out Keeper keeper.Keeper @@ -148,7 +148,7 @@ type consensusParamOutputs struct { BaseAppOption runtime.BaseAppOption } -func provideModule(in consensusParamInputs) consensusParamOutputs { +func ProvideModule(in ConsensusParamInputs) ConsensusParamOutputs { authority, ok := in.Authority[depinject.ModuleKey(in.ModuleKey).Name()] if !ok { // default to governance authority if not provided @@ -161,7 +161,7 @@ func provideModule(in consensusParamInputs) consensusParamOutputs { app.SetParamStore(&k) } - return consensusParamOutputs{ + return ConsensusParamOutputs{ Keeper: k, Module: runtime.WrapAppModule(m), BaseAppOption: baseappOpt, From ddf5cf0d8d26f8beb504cb2fcc2d4a8b0964261c Mon Sep 17 00:00:00 2001 From: Sai Kumar <17549398+gsk967@users.noreply.github.com> Date: Sat, 22 Oct 2022 23:53:24 +0530 Subject: [PATCH 06/26] feat(cli): add module-account cli cmd and grpc get api (#13612) --- CHANGELOG.md | 1 + api/cosmos/auth/v1beta1/query.pulsar.go | 2559 +++++++++++++++------- api/cosmos/auth/v1beta1/query_grpc.pb.go | 38 + proto/cosmos/auth/v1beta1/query.proto | 38 +- tests/e2e/auth/suite.go | 63 + x/auth/client/cli/query.go | 35 + x/auth/keeper/grpc_query.go | 25 + x/auth/keeper/grpc_query_test.go | 55 + x/auth/types/query.pb.go | 815 +++++-- x/auth/types/query.pb.gw.go | 101 + 10 files changed, 2717 insertions(+), 1013 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e0289c0d09d..0c4b6cd0a733 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/bank) [#11981](https://github.com/cosmos/cosmos-sdk/pull/11981) Create the `SetSendEnabled` endpoint for managing the bank's SendEnabled settings. * (x/auth) [#13210](https://github.com/cosmos/cosmos-sdk/pull/13210) Add `Query/AccountInfo` endpoint for simplified access to basic account info. * (x/consensus) [#12905](https://github.com/cosmos/cosmos-sdk/pull/12905) Create a new `x/consensus` module that is now responsible for maintaining Tendermint consensus parameters instead of `x/param`. Legacy types remain in order to facilitate parameter migration from the deprecated `x/params`. App developers should ensure that they execute `baseapp.MigrateParams` during their chain upgrade. These legacy types will be removed in a future release. +* (x/auth) [#13612](https://github.com/cosmos/cosmos-sdk/pull/13612) Add `Query/ModuleAccountByName` endpoint for accessing the module account info by module name. ### Improvements diff --git a/api/cosmos/auth/v1beta1/query.pulsar.go b/api/cosmos/auth/v1beta1/query.pulsar.go index e645b5154e9c..5f7a90427a7a 100644 --- a/api/cosmos/auth/v1beta1/query.pulsar.go +++ b/api/cosmos/auth/v1beta1/query.pulsar.go @@ -2,13 +2,9 @@ package authv1beta1 import ( - fmt "fmt" - io "io" - reflect "reflect" - sync "sync" - v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" _ "cosmossdk.io/api/cosmos/query/v1" + fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" @@ -17,6 +13,9 @@ import ( 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 ( @@ -1448,23 +1447,25 @@ func (x *fastReflection_QueryAccountRequest) ProtoMethods() *protoiface.Methods } var ( - md_QueryModuleAccountsRequest protoreflect.MessageDescriptor + md_QueryAccountResponse protoreflect.MessageDescriptor + fd_QueryAccountResponse_account protoreflect.FieldDescriptor ) func init() { file_cosmos_auth_v1beta1_query_proto_init() - md_QueryModuleAccountsRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryModuleAccountsRequest") + md_QueryAccountResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountResponse") + fd_QueryAccountResponse_account = md_QueryAccountResponse.Fields().ByName("account") } -var _ protoreflect.Message = (*fastReflection_QueryModuleAccountsRequest)(nil) +var _ protoreflect.Message = (*fastReflection_QueryAccountResponse)(nil) -type fastReflection_QueryModuleAccountsRequest QueryModuleAccountsRequest +type fastReflection_QueryAccountResponse QueryAccountResponse -func (x *QueryModuleAccountsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryModuleAccountsRequest)(x) +func (x *QueryAccountResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAccountResponse)(x) } -func (x *QueryModuleAccountsRequest) slowProtoReflect() protoreflect.Message { +func (x *QueryAccountResponse) slowProtoReflect() protoreflect.Message { mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1476,43 +1477,43 @@ func (x *QueryModuleAccountsRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryModuleAccountsRequest_messageType fastReflection_QueryModuleAccountsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryModuleAccountsRequest_messageType{} +var _fastReflection_QueryAccountResponse_messageType fastReflection_QueryAccountResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAccountResponse_messageType{} -type fastReflection_QueryModuleAccountsRequest_messageType struct{} +type fastReflection_QueryAccountResponse_messageType struct{} -func (x fastReflection_QueryModuleAccountsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryModuleAccountsRequest)(nil) +func (x fastReflection_QueryAccountResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAccountResponse)(nil) } -func (x fastReflection_QueryModuleAccountsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryModuleAccountsRequest) +func (x fastReflection_QueryAccountResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAccountResponse) } -func (x fastReflection_QueryModuleAccountsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleAccountsRequest +func (x fastReflection_QueryAccountResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryModuleAccountsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleAccountsRequest +func (x *fastReflection_QueryAccountResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountResponse } // 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_QueryModuleAccountsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryModuleAccountsRequest_messageType +func (x *fastReflection_QueryAccountResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAccountResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryModuleAccountsRequest) New() protoreflect.Message { - return new(fastReflection_QueryModuleAccountsRequest) +func (x *fastReflection_QueryAccountResponse) New() protoreflect.Message { + return new(fastReflection_QueryAccountResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryModuleAccountsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryModuleAccountsRequest)(x) +func (x *fastReflection_QueryAccountResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAccountResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -1520,7 +1521,13 @@ func (x *fastReflection_QueryModuleAccountsRequest) Interface() protoreflect.Pro // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryModuleAccountsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QueryAccountResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Account != nil { + value := protoreflect.ValueOfMessage(x.Account.ProtoReflect()) + if !f(fd_QueryAccountResponse_account, value) { + return + } + } } // Has reports whether a field is populated. @@ -1534,13 +1541,15 @@ func (x *fastReflection_QueryModuleAccountsRequest) Range(f func(protoreflect.Fi // 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_QueryModuleAccountsRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryAccountResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountResponse.account": + return x.Account != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", fd.FullName())) } } @@ -1550,13 +1559,15 @@ func (x *fastReflection_QueryModuleAccountsRequest) Has(fd protoreflect.FieldDes // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAccountsRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryAccountResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountResponse.account": + x.Account = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", fd.FullName())) } } @@ -1566,13 +1577,16 @@ func (x *fastReflection_QueryModuleAccountsRequest) Clear(fd protoreflect.FieldD // 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_QueryModuleAccountsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAccountResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "cosmos.auth.v1beta1.QueryAccountResponse.account": + value := x.Account + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", descriptor.FullName())) } } @@ -1586,13 +1600,15 @@ func (x *fastReflection_QueryModuleAccountsRequest) Get(descriptor protoreflect. // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAccountsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryAccountResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountResponse.account": + x.Account = value.Message().Interface().(*anypb.Any) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", fd.FullName())) } } @@ -1606,36 +1622,44 @@ func (x *fastReflection_QueryModuleAccountsRequest) Set(fd protoreflect.FieldDes // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAccountsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAccountResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountResponse.account": + if x.Account == nil { + x.Account = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.Account.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse 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_QueryModuleAccountsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAccountResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryAccountResponse.account": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse 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_QueryModuleAccountsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryAccountResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryModuleAccountsRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountResponse", d.FullName())) } panic("unreachable") } @@ -1643,7 +1667,7 @@ func (x *fastReflection_QueryModuleAccountsRequest) WhichOneof(d protoreflect.On // 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_QueryModuleAccountsRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryAccountResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1654,7 +1678,7 @@ func (x *fastReflection_QueryModuleAccountsRequest) GetUnknown() protoreflect.Ra // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAccountsRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryAccountResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1666,7 +1690,7 @@ func (x *fastReflection_QueryModuleAccountsRequest) SetUnknown(fields protorefle // 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_QueryModuleAccountsRequest) IsValid() bool { +func (x *fastReflection_QueryAccountResponse) IsValid() bool { return x != nil } @@ -1676,9 +1700,9 @@ func (x *fastReflection_QueryModuleAccountsRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryModuleAccountsRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryAccountResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryModuleAccountsRequest) + x := input.Message.Interface().(*QueryAccountResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1690,6 +1714,10 @@ func (x *fastReflection_QueryModuleAccountsRequest) ProtoMethods() *protoiface.M var n int var l int _ = l + if x.Account != nil { + l = options.Size(x.Account) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1700,7 +1728,7 @@ func (x *fastReflection_QueryModuleAccountsRequest) ProtoMethods() *protoiface.M } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryModuleAccountsRequest) + x := input.Message.Interface().(*QueryAccountResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1719,6 +1747,20 @@ func (x *fastReflection_QueryModuleAccountsRequest) ProtoMethods() *protoiface.M i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Account != nil { + encoded, err := options.Marshal(x.Account) + 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 { @@ -1730,7 +1772,7 @@ func (x *fastReflection_QueryModuleAccountsRequest) ProtoMethods() *protoiface.M }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryModuleAccountsRequest) + x := input.Message.Interface().(*QueryAccountResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1762,12 +1804,48 @@ func (x *fastReflection_QueryModuleAccountsRequest) ProtoMethods() *protoiface.M fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountsRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountResponse: 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 Account", 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.Account == nil { + x.Account = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Account); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1804,25 +1882,23 @@ func (x *fastReflection_QueryModuleAccountsRequest) ProtoMethods() *protoiface.M } var ( - md_QueryParamsResponse protoreflect.MessageDescriptor - fd_QueryParamsResponse_params protoreflect.FieldDescriptor + md_QueryParamsRequest protoreflect.MessageDescriptor ) func init() { file_cosmos_auth_v1beta1_query_proto_init() - md_QueryParamsResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryParamsResponse") - fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") + md_QueryParamsRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") } -var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) -type fastReflection_QueryParamsResponse QueryParamsResponse +type fastReflection_QueryParamsRequest QueryParamsRequest -func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(x) +func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(x) } -func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { +func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1834,43 +1910,43 @@ func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} +var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} -type fastReflection_QueryParamsResponse_messageType struct{} +type fastReflection_QueryParamsRequest_messageType struct{} -func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(nil) +func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(nil) } -func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) +func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) } -func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse +func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse +func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest } // 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_QueryParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsResponse_messageType +func (x *fastReflection_QueryParamsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) +func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryParamsResponse)(x) +func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryParamsRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -1878,13 +1954,7 @@ func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessa // Range returns immediately if f returns false. // 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.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_QueryParamsResponse_params, value) { - return - } - } +func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -1898,15 +1968,804 @@ func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDesc // 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_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest 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_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest 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_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest 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_QueryParamsRequest) 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.auth.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest 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_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest 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_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest 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_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryParamsRequest", 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParamsRequest) + 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().(*QueryParamsRequest) + 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().(*QueryParamsRequest) + 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: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: 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_QueryParamsResponse protoreflect.MessageDescriptor + fd_QueryParamsResponse_params protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_QueryParamsResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryParamsResponse") + fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) + +type fastReflection_QueryParamsResponse QueryParamsResponse + +func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(x) +} + +func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_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_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} + +type fastReflection_QueryParamsResponse_messageType struct{} + +func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(nil) +} +func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} +func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// 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_QueryParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryParamsResponse)(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_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_QueryParamsResponse_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_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryParamsResponse.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryParamsResponse.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.auth.v1beta1.QueryParamsResponse.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryParamsResponse.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse 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_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "cosmos.auth.v1beta1.QueryParamsResponse.params": - return x.Params != nil + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse 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_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryParamsResponse.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + } + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse 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_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryParamsResponse", 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParamsResponse) + 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.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().(*QueryParamsResponse) + 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] = 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().(*QueryParamsResponse) + 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + 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: + 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_QueryModuleAccountsRequest protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_auth_v1beta1_query_proto_init() + md_QueryModuleAccountsRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryModuleAccountsRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryModuleAccountsRequest)(nil) + +type fastReflection_QueryModuleAccountsRequest QueryModuleAccountsRequest + +func (x *QueryModuleAccountsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryModuleAccountsRequest)(x) +} + +func (x *QueryModuleAccountsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_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_QueryModuleAccountsRequest_messageType fastReflection_QueryModuleAccountsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryModuleAccountsRequest_messageType{} + +type fastReflection_QueryModuleAccountsRequest_messageType struct{} + +func (x fastReflection_QueryModuleAccountsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryModuleAccountsRequest)(nil) +} +func (x fastReflection_QueryModuleAccountsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountsRequest) +} +func (x fastReflection_QueryModuleAccountsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryModuleAccountsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountsRequest +} + +// 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_QueryModuleAccountsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryModuleAccountsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryModuleAccountsRequest) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryModuleAccountsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryModuleAccountsRequest)(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_QueryModuleAccountsRequest) 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_QueryModuleAccountsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", fd.FullName())) } } @@ -1916,15 +2775,13 @@ func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryModuleAccountsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryParamsResponse.params": - x.Params = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", fd.FullName())) } } @@ -1934,16 +2791,13 @@ func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescript // 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_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.auth.v1beta1.QueryParamsResponse.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", descriptor.FullName())) } } @@ -1957,15 +2811,13 @@ func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDe // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryModuleAccountsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryParamsResponse.params": - x.Params = value.Message().Interface().(*Params) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest does not contain field %s", fd.FullName())) } } @@ -1979,44 +2831,36 @@ func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryParamsResponse.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest 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_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryParamsResponse.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsRequest 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_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryModuleAccountsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryParamsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryModuleAccountsRequest", d.FullName())) } panic("unreachable") } @@ -2024,7 +2868,7 @@ func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDesc // 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_QueryParamsResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryModuleAccountsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2035,7 +2879,7 @@ func (x *fastReflection_QueryParamsResponse) GetUnknown() protoreflect.RawFields // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryModuleAccountsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2047,7 +2891,7 @@ func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawF // 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_QueryParamsResponse) IsValid() bool { +func (x *fastReflection_QueryModuleAccountsRequest) IsValid() bool { return x != nil } @@ -2057,9 +2901,9 @@ func (x *fastReflection_QueryParamsResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryModuleAccountsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsResponse) + x := input.Message.Interface().(*QueryModuleAccountsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2071,10 +2915,6 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods var n int var l int _ = 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) } @@ -2085,7 +2925,7 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsResponse) + x := input.Message.Interface().(*QueryModuleAccountsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2104,20 +2944,6 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods 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] = 0xa - } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -2129,7 +2955,7 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsResponse) + x := input.Message.Interface().(*QueryModuleAccountsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2161,48 +2987,12 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountsRequest: 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 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:]) @@ -2238,27 +3028,78 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods } } +var _ protoreflect.List = (*_QueryModuleAccountsResponse_1_list)(nil) + +type _QueryModuleAccountsResponse_1_list struct { + list *[]*anypb.Any +} + +func (x *_QueryModuleAccountsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryModuleAccountsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryModuleAccountsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*anypb.Any) + (*x.list)[i] = concreteValue +} + +func (x *_QueryModuleAccountsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*anypb.Any) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryModuleAccountsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(anypb.Any) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryModuleAccountsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryModuleAccountsResponse_1_list) NewElement() protoreflect.Value { + v := new(anypb.Any) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryModuleAccountsResponse_1_list) IsValid() bool { + return x.list != nil +} + var ( - md_QueryAccountResponse protoreflect.MessageDescriptor - fd_QueryAccountResponse_account protoreflect.FieldDescriptor + md_QueryModuleAccountsResponse protoreflect.MessageDescriptor + fd_QueryModuleAccountsResponse_accounts protoreflect.FieldDescriptor ) func init() { file_cosmos_auth_v1beta1_query_proto_init() - md_QueryAccountResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryAccountResponse") - fd_QueryAccountResponse_account = md_QueryAccountResponse.Fields().ByName("account") + md_QueryModuleAccountsResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryModuleAccountsResponse") + fd_QueryModuleAccountsResponse_accounts = md_QueryModuleAccountsResponse.Fields().ByName("accounts") } -var _ protoreflect.Message = (*fastReflection_QueryAccountResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QueryModuleAccountsResponse)(nil) -type fastReflection_QueryAccountResponse QueryAccountResponse +type fastReflection_QueryModuleAccountsResponse QueryModuleAccountsResponse -func (x *QueryAccountResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAccountResponse)(x) +func (x *QueryModuleAccountsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryModuleAccountsResponse)(x) } -func (x *QueryAccountResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[5] +func (x *QueryModuleAccountsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2269,43 +3110,43 @@ func (x *QueryAccountResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryAccountResponse_messageType fastReflection_QueryAccountResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAccountResponse_messageType{} +var _fastReflection_QueryModuleAccountsResponse_messageType fastReflection_QueryModuleAccountsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryModuleAccountsResponse_messageType{} -type fastReflection_QueryAccountResponse_messageType struct{} +type fastReflection_QueryModuleAccountsResponse_messageType struct{} -func (x fastReflection_QueryAccountResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAccountResponse)(nil) +func (x fastReflection_QueryModuleAccountsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryModuleAccountsResponse)(nil) } -func (x fastReflection_QueryAccountResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAccountResponse) +func (x fastReflection_QueryModuleAccountsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountsResponse) } -func (x fastReflection_QueryAccountResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountResponse +func (x fastReflection_QueryModuleAccountsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryAccountResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountResponse +func (x *fastReflection_QueryModuleAccountsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountsResponse } // 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_QueryAccountResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAccountResponse_messageType +func (x *fastReflection_QueryModuleAccountsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryModuleAccountsResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAccountResponse) New() protoreflect.Message { - return new(fastReflection_QueryAccountResponse) +func (x *fastReflection_QueryModuleAccountsResponse) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAccountResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAccountResponse)(x) +func (x *fastReflection_QueryModuleAccountsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryModuleAccountsResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -2313,10 +3154,10 @@ func (x *fastReflection_QueryAccountResponse) Interface() protoreflect.ProtoMess // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryAccountResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Account != nil { - value := protoreflect.ValueOfMessage(x.Account.ProtoReflect()) - if !f(fd_QueryAccountResponse_account, value) { +func (x *fastReflection_QueryModuleAccountsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Accounts) != 0 { + value := protoreflect.ValueOfList(&_QueryModuleAccountsResponse_1_list{list: &x.Accounts}) + if !f(fd_QueryModuleAccountsResponse_accounts, value) { return } } @@ -2333,15 +3174,15 @@ func (x *fastReflection_QueryAccountResponse) Range(f func(protoreflect.FieldDes // 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_QueryAccountResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryModuleAccountsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountResponse.account": - return x.Account != nil + case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": + return len(x.Accounts) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", fd.FullName())) } } @@ -2351,15 +3192,15 @@ func (x *fastReflection_QueryAccountResponse) Has(fd protoreflect.FieldDescripto // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAccountResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryModuleAccountsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountResponse.account": - x.Account = nil + case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": + x.Accounts = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", fd.FullName())) } } @@ -2369,16 +3210,19 @@ func (x *fastReflection_QueryAccountResponse) Clear(fd protoreflect.FieldDescrip // 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_QueryAccountResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.auth.v1beta1.QueryAccountResponse.account": - value := x.Account - return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": + if len(x.Accounts) == 0 { + return protoreflect.ValueOfList(&_QueryModuleAccountsResponse_1_list{}) + } + listValue := &_QueryModuleAccountsResponse_1_list{list: &x.Accounts} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", descriptor.FullName())) } } @@ -2392,15 +3236,17 @@ func (x *fastReflection_QueryAccountResponse) Get(descriptor protoreflect.FieldD // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAccountResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryModuleAccountsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountResponse.account": - x.Account = value.Message().Interface().(*anypb.Any) + case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": + lv := value.List() + clv := lv.(*_QueryModuleAccountsResponse_1_list) + x.Accounts = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", fd.FullName())) } } @@ -2414,44 +3260,45 @@ func (x *fastReflection_QueryAccountResponse) Set(fd protoreflect.FieldDescripto // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAccountResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountResponse.account": - if x.Account == nil { - x.Account = new(anypb.Any) + case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": + if x.Accounts == nil { + x.Accounts = []*anypb.Any{} } - return protoreflect.ValueOfMessage(x.Account.ProtoReflect()) + value := &_QueryModuleAccountsResponse_1_list{list: &x.Accounts} + return protoreflect.ValueOfList(value) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse 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_QueryAccountResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryAccountResponse.account": - m := new(anypb.Any) - return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": + list := []*anypb.Any{} + return protoreflect.ValueOfList(&_QueryModuleAccountsResponse_1_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryAccountResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryAccountResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse 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_QueryAccountResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryModuleAccountsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryAccountResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryModuleAccountsResponse", d.FullName())) } panic("unreachable") } @@ -2459,7 +3306,7 @@ func (x *fastReflection_QueryAccountResponse) WhichOneof(d protoreflect.OneofDes // 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_QueryAccountResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryModuleAccountsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2470,7 +3317,7 @@ func (x *fastReflection_QueryAccountResponse) GetUnknown() protoreflect.RawField // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAccountResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryModuleAccountsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2482,7 +3329,7 @@ func (x *fastReflection_QueryAccountResponse) SetUnknown(fields protoreflect.Raw // 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_QueryAccountResponse) IsValid() bool { +func (x *fastReflection_QueryModuleAccountsResponse) IsValid() bool { return x != nil } @@ -2492,9 +3339,9 @@ func (x *fastReflection_QueryAccountResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAccountResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryModuleAccountsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAccountResponse) + x := input.Message.Interface().(*QueryModuleAccountsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2506,9 +3353,11 @@ func (x *fastReflection_QueryAccountResponse) ProtoMethods() *protoiface.Methods var n int var l int _ = l - if x.Account != nil { - l = options.Size(x.Account) - n += 1 + l + runtime.Sov(uint64(l)) + if len(x.Accounts) > 0 { + for _, e := range x.Accounts { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } } if x.unknownFields != nil { n += len(x.unknownFields) @@ -2520,7 +3369,7 @@ func (x *fastReflection_QueryAccountResponse) ProtoMethods() *protoiface.Methods } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAccountResponse) + x := input.Message.Interface().(*QueryModuleAccountsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2539,19 +3388,21 @@ func (x *fastReflection_QueryAccountResponse) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Account != nil { - encoded, err := options.Marshal(x.Account) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err + if len(x.Accounts) > 0 { + for iNdEx := len(x.Accounts) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Accounts[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 } - 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...) @@ -2564,7 +3415,7 @@ func (x *fastReflection_QueryAccountResponse) ProtoMethods() *protoiface.Methods }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAccountResponse) + x := input.Message.Interface().(*QueryModuleAccountsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2596,15 +3447,15 @@ func (x *fastReflection_QueryAccountResponse) ProtoMethods() *protoiface.Methods fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountsResponse: 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 Account", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2631,10 +3482,8 @@ func (x *fastReflection_QueryAccountResponse) ProtoMethods() *protoiface.Methods if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Account == nil { - x.Account = &anypb.Any{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Account); err != nil { + x.Accounts = append(x.Accounts, &anypb.Any{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Accounts[len(x.Accounts)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -2674,24 +3523,26 @@ func (x *fastReflection_QueryAccountResponse) ProtoMethods() *protoiface.Methods } var ( - md_QueryParamsRequest protoreflect.MessageDescriptor + md_QueryModuleAccountByNameRequest protoreflect.MessageDescriptor + fd_QueryModuleAccountByNameRequest_name protoreflect.FieldDescriptor ) func init() { file_cosmos_auth_v1beta1_query_proto_init() - md_QueryParamsRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryParamsRequest") + md_QueryModuleAccountByNameRequest = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryModuleAccountByNameRequest") + fd_QueryModuleAccountByNameRequest_name = md_QueryModuleAccountByNameRequest.Fields().ByName("name") } -var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) +var _ protoreflect.Message = (*fastReflection_QueryModuleAccountByNameRequest)(nil) -type fastReflection_QueryParamsRequest QueryParamsRequest +type fastReflection_QueryModuleAccountByNameRequest QueryModuleAccountByNameRequest -func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(x) +func (x *QueryModuleAccountByNameRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryModuleAccountByNameRequest)(x) } -func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[6] +func (x *QueryModuleAccountByNameRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2702,43 +3553,43 @@ func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} +var _fastReflection_QueryModuleAccountByNameRequest_messageType fastReflection_QueryModuleAccountByNameRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryModuleAccountByNameRequest_messageType{} -type fastReflection_QueryParamsRequest_messageType struct{} +type fastReflection_QueryModuleAccountByNameRequest_messageType struct{} -func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(nil) +func (x fastReflection_QueryModuleAccountByNameRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryModuleAccountByNameRequest)(nil) } -func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) +func (x fastReflection_QueryModuleAccountByNameRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountByNameRequest) } -func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest +func (x fastReflection_QueryModuleAccountByNameRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountByNameRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest +func (x *fastReflection_QueryModuleAccountByNameRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountByNameRequest } // 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_QueryParamsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsRequest_messageType +func (x *fastReflection_QueryModuleAccountByNameRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryModuleAccountByNameRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) +func (x *fastReflection_QueryModuleAccountByNameRequest) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountByNameRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryParamsRequest)(x) +func (x *fastReflection_QueryModuleAccountByNameRequest) Interface() protoreflect.ProtoMessage { + return (*QueryModuleAccountByNameRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -2746,7 +3597,13 @@ func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessag // Range returns immediately if f returns false. // 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) { +func (x *fastReflection_QueryModuleAccountByNameRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Name != "" { + value := protoreflect.ValueOfString(x.Name) + if !f(fd_QueryModuleAccountByNameRequest_name, value) { + return + } + } } // Has reports whether a field is populated. @@ -2760,13 +3617,15 @@ func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescr // 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_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryModuleAccountByNameRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": + return x.Name != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest does not contain field %s", fd.FullName())) } } @@ -2776,13 +3635,15 @@ func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryModuleAccountByNameRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": + x.Name = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest does not contain field %s", fd.FullName())) } } @@ -2792,13 +3653,16 @@ func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescripto // 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_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountByNameRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": + value := x.Name + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest does not contain field %s", descriptor.FullName())) } } @@ -2812,13 +3676,15 @@ func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDes // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryModuleAccountByNameRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": + x.Name = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest does not contain field %s", fd.FullName())) } } @@ -2832,36 +3698,40 @@ func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountByNameRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": + panic(fmt.Errorf("field name of message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest 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_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountByNameRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest.name": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameRequest 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_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryModuleAccountByNameRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryParamsRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryModuleAccountByNameRequest", d.FullName())) } panic("unreachable") } @@ -2869,7 +3739,7 @@ func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescr // 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_QueryParamsRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryModuleAccountByNameRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2880,7 +3750,7 @@ func (x *fastReflection_QueryParamsRequest) GetUnknown() protoreflect.RawFields // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryModuleAccountByNameRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2892,7 +3762,7 @@ func (x *fastReflection_QueryParamsRequest) SetUnknown(fields protoreflect.RawFi // 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_QueryParamsRequest) IsValid() bool { +func (x *fastReflection_QueryModuleAccountByNameRequest) IsValid() bool { return x != nil } @@ -2902,9 +3772,9 @@ func (x *fastReflection_QueryParamsRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryModuleAccountByNameRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsRequest) + x := input.Message.Interface().(*QueryModuleAccountByNameRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2916,6 +3786,10 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { var n int var l int _ = l + l = len(x.Name) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -2926,7 +3800,7 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) + x := input.Message.Interface().(*QueryModuleAccountByNameRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2945,6 +3819,13 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + 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 { @@ -2956,7 +3837,7 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) + x := input.Message.Interface().(*QueryModuleAccountByNameRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2988,12 +3869,44 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountByNameRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountByNameRequest: 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 default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -3029,78 +3942,27 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_QueryModuleAccountsResponse_1_list)(nil) - -type _QueryModuleAccountsResponse_1_list struct { - list *[]*anypb.Any -} - -func (x *_QueryModuleAccountsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryModuleAccountsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryModuleAccountsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_QueryModuleAccountsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryModuleAccountsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryModuleAccountsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryModuleAccountsResponse_1_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryModuleAccountsResponse_1_list) IsValid() bool { - return x.list != nil -} - var ( - md_QueryModuleAccountsResponse protoreflect.MessageDescriptor - fd_QueryModuleAccountsResponse_accounts protoreflect.FieldDescriptor + md_QueryModuleAccountByNameResponse protoreflect.MessageDescriptor + fd_QueryModuleAccountByNameResponse_account protoreflect.FieldDescriptor ) func init() { file_cosmos_auth_v1beta1_query_proto_init() - md_QueryModuleAccountsResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryModuleAccountsResponse") - fd_QueryModuleAccountsResponse_accounts = md_QueryModuleAccountsResponse.Fields().ByName("accounts") + md_QueryModuleAccountByNameResponse = File_cosmos_auth_v1beta1_query_proto.Messages().ByName("QueryModuleAccountByNameResponse") + fd_QueryModuleAccountByNameResponse_account = md_QueryModuleAccountByNameResponse.Fields().ByName("account") } -var _ protoreflect.Message = (*fastReflection_QueryModuleAccountsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QueryModuleAccountByNameResponse)(nil) -type fastReflection_QueryModuleAccountsResponse QueryModuleAccountsResponse +type fastReflection_QueryModuleAccountByNameResponse QueryModuleAccountByNameResponse -func (x *QueryModuleAccountsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryModuleAccountsResponse)(x) +func (x *QueryModuleAccountByNameResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryModuleAccountByNameResponse)(x) } -func (x *QueryModuleAccountsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[7] +func (x *QueryModuleAccountByNameResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3111,43 +3973,43 @@ func (x *QueryModuleAccountsResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryModuleAccountsResponse_messageType fastReflection_QueryModuleAccountsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryModuleAccountsResponse_messageType{} +var _fastReflection_QueryModuleAccountByNameResponse_messageType fastReflection_QueryModuleAccountByNameResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryModuleAccountByNameResponse_messageType{} -type fastReflection_QueryModuleAccountsResponse_messageType struct{} +type fastReflection_QueryModuleAccountByNameResponse_messageType struct{} -func (x fastReflection_QueryModuleAccountsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryModuleAccountsResponse)(nil) +func (x fastReflection_QueryModuleAccountByNameResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryModuleAccountByNameResponse)(nil) } -func (x fastReflection_QueryModuleAccountsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryModuleAccountsResponse) +func (x fastReflection_QueryModuleAccountByNameResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountByNameResponse) } -func (x fastReflection_QueryModuleAccountsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleAccountsResponse +func (x fastReflection_QueryModuleAccountByNameResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountByNameResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryModuleAccountsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleAccountsResponse +func (x *fastReflection_QueryModuleAccountByNameResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryModuleAccountByNameResponse } // 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_QueryModuleAccountsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryModuleAccountsResponse_messageType +func (x *fastReflection_QueryModuleAccountByNameResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryModuleAccountByNameResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryModuleAccountsResponse) New() protoreflect.Message { - return new(fastReflection_QueryModuleAccountsResponse) +func (x *fastReflection_QueryModuleAccountByNameResponse) New() protoreflect.Message { + return new(fastReflection_QueryModuleAccountByNameResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryModuleAccountsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryModuleAccountsResponse)(x) +func (x *fastReflection_QueryModuleAccountByNameResponse) Interface() protoreflect.ProtoMessage { + return (*QueryModuleAccountByNameResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -3155,10 +4017,10 @@ func (x *fastReflection_QueryModuleAccountsResponse) Interface() protoreflect.Pr // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryModuleAccountsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Accounts) != 0 { - value := protoreflect.ValueOfList(&_QueryModuleAccountsResponse_1_list{list: &x.Accounts}) - if !f(fd_QueryModuleAccountsResponse_accounts, value) { +func (x *fastReflection_QueryModuleAccountByNameResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Account != nil { + value := protoreflect.ValueOfMessage(x.Account.ProtoReflect()) + if !f(fd_QueryModuleAccountByNameResponse_account, value) { return } } @@ -3175,15 +4037,15 @@ func (x *fastReflection_QueryModuleAccountsResponse) Range(f func(protoreflect.F // 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_QueryModuleAccountsResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryModuleAccountByNameResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": - return len(x.Accounts) != 0 + case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": + return x.Account != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse does not contain field %s", fd.FullName())) } } @@ -3193,15 +4055,15 @@ func (x *fastReflection_QueryModuleAccountsResponse) Has(fd protoreflect.FieldDe // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAccountsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryModuleAccountByNameResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": - x.Accounts = nil + case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": + x.Account = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse does not contain field %s", fd.FullName())) } } @@ -3211,19 +4073,16 @@ func (x *fastReflection_QueryModuleAccountsResponse) Clear(fd protoreflect.Field // 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_QueryModuleAccountsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountByNameResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": - if len(x.Accounts) == 0 { - return protoreflect.ValueOfList(&_QueryModuleAccountsResponse_1_list{}) - } - listValue := &_QueryModuleAccountsResponse_1_list{list: &x.Accounts} - return protoreflect.ValueOfList(listValue) + case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": + value := x.Account + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse does not contain field %s", descriptor.FullName())) } } @@ -3237,17 +4096,15 @@ func (x *fastReflection_QueryModuleAccountsResponse) Get(descriptor protoreflect // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAccountsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryModuleAccountByNameResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": - lv := value.List() - clv := lv.(*_QueryModuleAccountsResponse_1_list) - x.Accounts = *clv.list + case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": + x.Account = value.Message().Interface().(*anypb.Any) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse does not contain field %s", fd.FullName())) } } @@ -3261,45 +4118,44 @@ func (x *fastReflection_QueryModuleAccountsResponse) Set(fd protoreflect.FieldDe // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAccountsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountByNameResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": - if x.Accounts == nil { - x.Accounts = []*anypb.Any{} + case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": + if x.Account == nil { + x.Account = new(anypb.Any) } - value := &_QueryModuleAccountsResponse_1_list{list: &x.Accounts} - return protoreflect.ValueOfList(value) + return protoreflect.ValueOfMessage(x.Account.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse 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_QueryModuleAccountsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryModuleAccountByNameResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_QueryModuleAccountsResponse_1_list{list: &list}) + case "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")) } - panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.auth.v1beta1.QueryModuleAccountByNameResponse 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_QueryModuleAccountsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryModuleAccountByNameResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryModuleAccountsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.auth.v1beta1.QueryModuleAccountByNameResponse", d.FullName())) } panic("unreachable") } @@ -3307,7 +4163,7 @@ func (x *fastReflection_QueryModuleAccountsResponse) WhichOneof(d protoreflect.O // 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_QueryModuleAccountsResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryModuleAccountByNameResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3318,7 +4174,7 @@ func (x *fastReflection_QueryModuleAccountsResponse) GetUnknown() protoreflect.R // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAccountsResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryModuleAccountByNameResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3330,7 +4186,7 @@ func (x *fastReflection_QueryModuleAccountsResponse) SetUnknown(fields protorefl // 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_QueryModuleAccountsResponse) IsValid() bool { +func (x *fastReflection_QueryModuleAccountByNameResponse) IsValid() bool { return x != nil } @@ -3340,9 +4196,9 @@ func (x *fastReflection_QueryModuleAccountsResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryModuleAccountsResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryModuleAccountByNameResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryModuleAccountsResponse) + x := input.Message.Interface().(*QueryModuleAccountByNameResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3354,11 +4210,9 @@ func (x *fastReflection_QueryModuleAccountsResponse) ProtoMethods() *protoiface. var n int var l int _ = l - if len(x.Accounts) > 0 { - for _, e := range x.Accounts { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } + if x.Account != nil { + l = options.Size(x.Account) + n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -3370,7 +4224,7 @@ func (x *fastReflection_QueryModuleAccountsResponse) ProtoMethods() *protoiface. } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryModuleAccountsResponse) + x := input.Message.Interface().(*QueryModuleAccountByNameResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3389,21 +4243,19 @@ func (x *fastReflection_QueryModuleAccountsResponse) ProtoMethods() *protoiface. i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Accounts) > 0 { - for iNdEx := len(x.Accounts) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Accounts[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 x.Account != nil { + encoded, err := options.Marshal(x.Account) + 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...) @@ -3416,7 +4268,7 @@ func (x *fastReflection_QueryModuleAccountsResponse) ProtoMethods() *protoiface. }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryModuleAccountsResponse) + x := input.Message.Interface().(*QueryModuleAccountByNameResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3448,15 +4300,15 @@ func (x *fastReflection_QueryModuleAccountsResponse) ProtoMethods() *protoiface. fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountsResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountByNameResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAccountByNameResponse: 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 Accounts", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3483,8 +4335,10 @@ func (x *fastReflection_QueryModuleAccountsResponse) ProtoMethods() *protoiface. if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Accounts = append(x.Accounts, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Accounts[len(x.Accounts)-1]); err != nil { + if x.Account == nil { + x.Account = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Account); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -3541,7 +4395,7 @@ func (x *Bech32PrefixRequest) ProtoReflect() protoreflect.Message { } func (x *Bech32PrefixRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[8] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3899,7 +4753,7 @@ func (x *Bech32PrefixResponse) ProtoReflect() protoreflect.Message { } func (x *Bech32PrefixResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[9] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4319,7 +5173,7 @@ func (x *AddressBytesToStringRequest) ProtoReflect() protoreflect.Message { } func (x *AddressBytesToStringRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[10] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4741,7 +5595,7 @@ func (x *AddressBytesToStringResponse) ProtoReflect() protoreflect.Message { } func (x *AddressBytesToStringResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[11] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5161,7 +6015,7 @@ func (x *AddressStringToBytesRequest) ProtoReflect() protoreflect.Message { } func (x *AddressStringToBytesRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[12] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5581,7 +6435,7 @@ func (x *AddressStringToBytesResponse) ProtoReflect() protoreflect.Message { } func (x *AddressStringToBytesResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[13] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6003,7 +6857,7 @@ func (x *QueryAccountAddressByIDRequest) ProtoReflect() protoreflect.Message { } func (x *QueryAccountAddressByIDRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[14] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6407,7 +7261,7 @@ func (x *QueryAccountAddressByIDResponse) ProtoReflect() protoreflect.Message { } func (x *QueryAccountAddressByIDResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[15] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6827,7 +7681,7 @@ func (x *QueryAccountInfoRequest) ProtoReflect() protoreflect.Message { } func (x *QueryAccountInfoRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[16] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7247,7 +8101,7 @@ func (x *QueryAccountInfoResponse) ProtoReflect() protoreflect.Message { } func (x *QueryAccountInfoResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[17] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7799,17 +8653,18 @@ func (x *QueryAccountRequest) GetAddress() string { return "" } -// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. -// -// Since: cosmos-sdk 0.46 -type QueryModuleAccountsRequest struct { +// QueryAccountResponse is the response type for the Query/Account RPC method. +type QueryAccountResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // account defines the account of the corresponding address. + Account *anypb.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` } -func (x *QueryModuleAccountsRequest) Reset() { - *x = QueryModuleAccountsRequest{} +func (x *QueryAccountResponse) Reset() { + *x = QueryAccountResponse{} if protoimpl.UnsafeEnabled { mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7817,29 +8672,33 @@ func (x *QueryModuleAccountsRequest) Reset() { } } -func (x *QueryModuleAccountsRequest) String() string { +func (x *QueryAccountResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryModuleAccountsRequest) ProtoMessage() {} +func (*QueryAccountResponse) ProtoMessage() {} -// Deprecated: Use QueryModuleAccountsRequest.ProtoReflect.Descriptor instead. -func (*QueryModuleAccountsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryAccountResponse.ProtoReflect.Descriptor instead. +func (*QueryAccountResponse) Descriptor() ([]byte, []int) { return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{3} } -// QueryParamsResponse is the response type for the Query/Params RPC method. -type QueryParamsResponse struct { +func (x *QueryAccountResponse) GetAccount() *anypb.Any { + if x != nil { + return x.Account + } + return nil +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +type QueryParamsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - // params defines the parameters of the module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` } -func (x *QueryParamsResponse) Reset() { - *x = QueryParamsResponse{} +func (x *QueryParamsRequest) Reset() { + *x = QueryParamsRequest{} if protoimpl.UnsafeEnabled { mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7847,36 +8706,29 @@ func (x *QueryParamsResponse) Reset() { } } -func (x *QueryParamsResponse) String() string { +func (x *QueryParamsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsRequest) ProtoMessage() {} -// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{4} } -func (x *QueryParamsResponse) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -// QueryAccountResponse is the response type for the Query/Account RPC method. -type QueryAccountResponse struct { +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // account defines the account of the corresponding address. - Account *anypb.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + // params defines the parameters of the module. + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` } -func (x *QueryAccountResponse) Reset() { - *x = QueryAccountResponse{} +func (x *QueryParamsResponse) Reset() { + *x = QueryParamsResponse{} if protoimpl.UnsafeEnabled { mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7884,33 +8736,35 @@ func (x *QueryAccountResponse) Reset() { } } -func (x *QueryAccountResponse) String() string { +func (x *QueryParamsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryAccountResponse) ProtoMessage() {} +func (*QueryParamsResponse) ProtoMessage() {} -// Deprecated: Use QueryAccountResponse.ProtoReflect.Descriptor instead. -func (*QueryAccountResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{5} } -func (x *QueryAccountResponse) GetAccount() *anypb.Any { +func (x *QueryParamsResponse) GetParams() *Params { if x != nil { - return x.Account + return x.Params } return nil } -// QueryParamsRequest is the request type for the Query/Params RPC method. -type QueryParamsRequest struct { +// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. +// +// Since: cosmos-sdk 0.46 +type QueryModuleAccountsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} +func (x *QueryModuleAccountsRequest) Reset() { + *x = QueryModuleAccountsRequest{} if protoimpl.UnsafeEnabled { mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7918,14 +8772,14 @@ func (x *QueryParamsRequest) Reset() { } } -func (x *QueryParamsRequest) String() string { +func (x *QueryModuleAccountsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryModuleAccountsRequest) ProtoMessage() {} -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryModuleAccountsRequest.ProtoReflect.Descriptor instead. +func (*QueryModuleAccountsRequest) Descriptor() ([]byte, []int) { return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{6} } @@ -7967,6 +8821,78 @@ func (x *QueryModuleAccountsResponse) GetAccounts() []*anypb.Any { return nil } +// QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. +type QueryModuleAccountByNameRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *QueryModuleAccountByNameRequest) Reset() { + *x = QueryModuleAccountByNameRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryModuleAccountByNameRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryModuleAccountByNameRequest) ProtoMessage() {} + +// Deprecated: Use QueryModuleAccountByNameRequest.ProtoReflect.Descriptor instead. +func (*QueryModuleAccountByNameRequest) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{8} +} + +func (x *QueryModuleAccountByNameRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. +type QueryModuleAccountByNameResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Account *anypb.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` +} + +func (x *QueryModuleAccountByNameResponse) Reset() { + *x = QueryModuleAccountByNameResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryModuleAccountByNameResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryModuleAccountByNameResponse) ProtoMessage() {} + +// Deprecated: Use QueryModuleAccountByNameResponse.ProtoReflect.Descriptor instead. +func (*QueryModuleAccountByNameResponse) Descriptor() ([]byte, []int) { + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{9} +} + +func (x *QueryModuleAccountByNameResponse) GetAccount() *anypb.Any { + if x != nil { + return x.Account + } + return nil +} + // Bech32PrefixRequest is the request type for Bech32Prefix rpc method. // // Since: cosmos-sdk 0.46 @@ -7979,7 +8905,7 @@ type Bech32PrefixRequest struct { func (x *Bech32PrefixRequest) Reset() { *x = Bech32PrefixRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[8] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7993,7 +8919,7 @@ func (*Bech32PrefixRequest) ProtoMessage() {} // Deprecated: Use Bech32PrefixRequest.ProtoReflect.Descriptor instead. func (*Bech32PrefixRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{8} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{10} } // Bech32PrefixResponse is the response type for Bech32Prefix rpc method. @@ -8010,7 +8936,7 @@ type Bech32PrefixResponse struct { func (x *Bech32PrefixResponse) Reset() { *x = Bech32PrefixResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[9] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8024,7 +8950,7 @@ func (*Bech32PrefixResponse) ProtoMessage() {} // Deprecated: Use Bech32PrefixResponse.ProtoReflect.Descriptor instead. func (*Bech32PrefixResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{9} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{11} } func (x *Bech32PrefixResponse) GetBech32Prefix() string { @@ -8048,7 +8974,7 @@ type AddressBytesToStringRequest struct { func (x *AddressBytesToStringRequest) Reset() { *x = AddressBytesToStringRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[10] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8062,7 +8988,7 @@ func (*AddressBytesToStringRequest) ProtoMessage() {} // Deprecated: Use AddressBytesToStringRequest.ProtoReflect.Descriptor instead. func (*AddressBytesToStringRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{10} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{12} } func (x *AddressBytesToStringRequest) GetAddressBytes() []byte { @@ -8086,7 +9012,7 @@ type AddressBytesToStringResponse struct { func (x *AddressBytesToStringResponse) Reset() { *x = AddressBytesToStringResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[11] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8100,7 +9026,7 @@ func (*AddressBytesToStringResponse) ProtoMessage() {} // Deprecated: Use AddressBytesToStringResponse.ProtoReflect.Descriptor instead. func (*AddressBytesToStringResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{11} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{13} } func (x *AddressBytesToStringResponse) GetAddressString() string { @@ -8124,7 +9050,7 @@ type AddressStringToBytesRequest struct { func (x *AddressStringToBytesRequest) Reset() { *x = AddressStringToBytesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[12] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8138,7 +9064,7 @@ func (*AddressStringToBytesRequest) ProtoMessage() {} // Deprecated: Use AddressStringToBytesRequest.ProtoReflect.Descriptor instead. func (*AddressStringToBytesRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{12} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{14} } func (x *AddressStringToBytesRequest) GetAddressString() string { @@ -8162,7 +9088,7 @@ type AddressStringToBytesResponse struct { func (x *AddressStringToBytesResponse) Reset() { *x = AddressStringToBytesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[13] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8176,7 +9102,7 @@ func (*AddressStringToBytesResponse) ProtoMessage() {} // Deprecated: Use AddressStringToBytesResponse.ProtoReflect.Descriptor instead. func (*AddressStringToBytesResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{13} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{15} } func (x *AddressStringToBytesResponse) GetAddressBytes() []byte { @@ -8203,7 +9129,7 @@ type QueryAccountAddressByIDRequest struct { func (x *QueryAccountAddressByIDRequest) Reset() { *x = QueryAccountAddressByIDRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[14] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8217,7 +9143,7 @@ func (*QueryAccountAddressByIDRequest) ProtoMessage() {} // Deprecated: Use QueryAccountAddressByIDRequest.ProtoReflect.Descriptor instead. func (*QueryAccountAddressByIDRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{14} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{16} } func (x *QueryAccountAddressByIDRequest) GetId() int64 { @@ -8241,7 +9167,7 @@ type QueryAccountAddressByIDResponse struct { func (x *QueryAccountAddressByIDResponse) Reset() { *x = QueryAccountAddressByIDResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[15] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8255,7 +9181,7 @@ func (*QueryAccountAddressByIDResponse) ProtoMessage() {} // Deprecated: Use QueryAccountAddressByIDResponse.ProtoReflect.Descriptor instead. func (*QueryAccountAddressByIDResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{15} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{17} } func (x *QueryAccountAddressByIDResponse) GetAccountAddress() string { @@ -8280,7 +9206,7 @@ type QueryAccountInfoRequest struct { func (x *QueryAccountInfoRequest) Reset() { *x = QueryAccountInfoRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[16] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8294,7 +9220,7 @@ func (*QueryAccountInfoRequest) ProtoMessage() {} // Deprecated: Use QueryAccountInfoRequest.ProtoReflect.Descriptor instead. func (*QueryAccountInfoRequest) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{16} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{18} } func (x *QueryAccountInfoRequest) GetAddress() string { @@ -8319,7 +9245,7 @@ type QueryAccountInfoResponse struct { func (x *QueryAccountInfoResponse) Reset() { *x = QueryAccountInfoResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[17] + mi := &file_cosmos_auth_v1beta1_query_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8333,7 +9259,7 @@ func (*QueryAccountInfoResponse) ProtoMessage() {} // Deprecated: Use QueryAccountInfoResponse.ProtoReflect.Descriptor instead. func (*QueryAccountInfoResponse) Descriptor() ([]byte, []int) { - return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{17} + return file_cosmos_auth_v1beta1_query_proto_rawDescGZIP(), []int{19} } func (x *QueryAccountInfoResponse) GetInfo() *BaseAccount { @@ -8384,174 +9310,196 @@ var file_cosmos_auth_v1beta1_query_proto_rawDesc = []byte{ 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, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, - 0x00, 0x22, 0x1c, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0x50, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x22, 0x54, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x00, 0x22, 0x54, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 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, 0x42, 0x0c, 0xca, 0xb4, 0x2d, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x63, 0x0a, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x50, 0x0a, + 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, + 0x1c, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x63, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x14, 0x42, 0x65, 0x63, - 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x5f, 0x70, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, - 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x42, 0x0a, 0x1b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x45, 0x0a, 0x1c, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x22, 0x44, 0x0a, 0x1b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x43, 0x0a, 0x1c, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x30, 0x0a, 0x1e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x64, - 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x41, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 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, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x22, 0x4d, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x22, 0x50, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x34, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, - 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x32, 0xbf, 0x0b, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, - 0x8d, 0x01, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x63, + 0x74, 0x73, 0x22, 0x35, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x66, 0x0a, 0x20, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, + 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 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, 0x42, 0x12, 0xca, 0xb4, 0x2d, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0x15, 0x0a, 0x13, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x14, 0x42, 0x65, 0x63, 0x68, + 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x42, 0x0a, 0x1b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x45, 0x0a, 0x1c, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x22, 0x44, 0x0a, 0x1b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x25, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x43, 0x0a, 0x1c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x30, 0x0a, 0x1e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x64, 0x0a, + 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x41, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 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, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x22, 0x4d, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x22, 0x50, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, + 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, - 0x12, 0x1d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, - 0x94, 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x2e, 0x63, 0x6f, + 0x61, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x04, + 0x69, 0x6e, 0x66, 0x6f, 0x32, 0xfe, 0x0c, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x8d, + 0x01, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x34, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xb5, 0x01, 0x0a, 0x12, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x12, 0x33, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, - 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x64, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x85, - 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x88, 0xe7, - 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0xa6, 0x01, 0x0a, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x2a, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, + 0x1d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x94, + 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x34, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xb5, 0x01, 0x0a, 0x12, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x12, 0x33, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x44, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x64, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x85, 0x01, + 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x88, 0xe7, 0xb0, + 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0xa6, 0x01, 0x0a, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x88, 0xe7, - 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, - 0x8d, 0x01, 0x0a, 0x0c, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x12, - 0xb5, 0x01, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, - 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x88, 0xe7, 0xb0, + 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0xbc, + 0x01, 0x0a, 0x13, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x38, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, + 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x8d, 0x01, + 0x0a, 0x0c, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x28, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, + 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x28, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, + 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x12, 0xb5, 0x01, + 0x0a, 0x14, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x88, - 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x7d, 0x12, 0xb6, 0x01, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, - 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x88, 0xe7, 0xb0, + 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, + 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x7d, 0x12, 0xb6, 0x01, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x30, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, - 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x7d, - 0x12, 0xa4, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, + 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x39, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, + 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x7d, 0x12, 0xa4, + 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x88, - 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x7b, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x42, 0xc5, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, - 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, - 0x75, 0x74, 0x68, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x88, 0xe7, 0xb0, + 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x7b, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x7d, 0x42, 0xc5, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x5c, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, + 0x68, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, + 0x41, 0x75, 0x74, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -8566,63 +9514,68 @@ func file_cosmos_auth_v1beta1_query_proto_rawDescGZIP() []byte { return file_cosmos_auth_v1beta1_query_proto_rawDescData } -var file_cosmos_auth_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_cosmos_auth_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_cosmos_auth_v1beta1_query_proto_goTypes = []interface{}{ - (*QueryAccountsRequest)(nil), // 0: cosmos.auth.v1beta1.QueryAccountsRequest - (*QueryAccountsResponse)(nil), // 1: cosmos.auth.v1beta1.QueryAccountsResponse - (*QueryAccountRequest)(nil), // 2: cosmos.auth.v1beta1.QueryAccountRequest - (*QueryModuleAccountsRequest)(nil), // 3: cosmos.auth.v1beta1.QueryModuleAccountsRequest - (*QueryParamsResponse)(nil), // 4: cosmos.auth.v1beta1.QueryParamsResponse - (*QueryAccountResponse)(nil), // 5: cosmos.auth.v1beta1.QueryAccountResponse - (*QueryParamsRequest)(nil), // 6: cosmos.auth.v1beta1.QueryParamsRequest - (*QueryModuleAccountsResponse)(nil), // 7: cosmos.auth.v1beta1.QueryModuleAccountsResponse - (*Bech32PrefixRequest)(nil), // 8: cosmos.auth.v1beta1.Bech32PrefixRequest - (*Bech32PrefixResponse)(nil), // 9: cosmos.auth.v1beta1.Bech32PrefixResponse - (*AddressBytesToStringRequest)(nil), // 10: cosmos.auth.v1beta1.AddressBytesToStringRequest - (*AddressBytesToStringResponse)(nil), // 11: cosmos.auth.v1beta1.AddressBytesToStringResponse - (*AddressStringToBytesRequest)(nil), // 12: cosmos.auth.v1beta1.AddressStringToBytesRequest - (*AddressStringToBytesResponse)(nil), // 13: cosmos.auth.v1beta1.AddressStringToBytesResponse - (*QueryAccountAddressByIDRequest)(nil), // 14: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest - (*QueryAccountAddressByIDResponse)(nil), // 15: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse - (*QueryAccountInfoRequest)(nil), // 16: cosmos.auth.v1beta1.QueryAccountInfoRequest - (*QueryAccountInfoResponse)(nil), // 17: cosmos.auth.v1beta1.QueryAccountInfoResponse - (*v1beta1.PageRequest)(nil), // 18: cosmos.base.query.v1beta1.PageRequest - (*anypb.Any)(nil), // 19: google.protobuf.Any - (*v1beta1.PageResponse)(nil), // 20: cosmos.base.query.v1beta1.PageResponse - (*Params)(nil), // 21: cosmos.auth.v1beta1.Params - (*BaseAccount)(nil), // 22: cosmos.auth.v1beta1.BaseAccount + (*QueryAccountsRequest)(nil), // 0: cosmos.auth.v1beta1.QueryAccountsRequest + (*QueryAccountsResponse)(nil), // 1: cosmos.auth.v1beta1.QueryAccountsResponse + (*QueryAccountRequest)(nil), // 2: cosmos.auth.v1beta1.QueryAccountRequest + (*QueryAccountResponse)(nil), // 3: cosmos.auth.v1beta1.QueryAccountResponse + (*QueryParamsRequest)(nil), // 4: cosmos.auth.v1beta1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 5: cosmos.auth.v1beta1.QueryParamsResponse + (*QueryModuleAccountsRequest)(nil), // 6: cosmos.auth.v1beta1.QueryModuleAccountsRequest + (*QueryModuleAccountsResponse)(nil), // 7: cosmos.auth.v1beta1.QueryModuleAccountsResponse + (*QueryModuleAccountByNameRequest)(nil), // 8: cosmos.auth.v1beta1.QueryModuleAccountByNameRequest + (*QueryModuleAccountByNameResponse)(nil), // 9: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse + (*Bech32PrefixRequest)(nil), // 10: cosmos.auth.v1beta1.Bech32PrefixRequest + (*Bech32PrefixResponse)(nil), // 11: cosmos.auth.v1beta1.Bech32PrefixResponse + (*AddressBytesToStringRequest)(nil), // 12: cosmos.auth.v1beta1.AddressBytesToStringRequest + (*AddressBytesToStringResponse)(nil), // 13: cosmos.auth.v1beta1.AddressBytesToStringResponse + (*AddressStringToBytesRequest)(nil), // 14: cosmos.auth.v1beta1.AddressStringToBytesRequest + (*AddressStringToBytesResponse)(nil), // 15: cosmos.auth.v1beta1.AddressStringToBytesResponse + (*QueryAccountAddressByIDRequest)(nil), // 16: cosmos.auth.v1beta1.QueryAccountAddressByIDRequest + (*QueryAccountAddressByIDResponse)(nil), // 17: cosmos.auth.v1beta1.QueryAccountAddressByIDResponse + (*QueryAccountInfoRequest)(nil), // 18: cosmos.auth.v1beta1.QueryAccountInfoRequest + (*QueryAccountInfoResponse)(nil), // 19: cosmos.auth.v1beta1.QueryAccountInfoResponse + (*v1beta1.PageRequest)(nil), // 20: cosmos.base.query.v1beta1.PageRequest + (*anypb.Any)(nil), // 21: google.protobuf.Any + (*v1beta1.PageResponse)(nil), // 22: cosmos.base.query.v1beta1.PageResponse + (*Params)(nil), // 23: cosmos.auth.v1beta1.Params + (*BaseAccount)(nil), // 24: cosmos.auth.v1beta1.BaseAccount } var file_cosmos_auth_v1beta1_query_proto_depIdxs = []int32{ - 18, // 0: cosmos.auth.v1beta1.QueryAccountsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 19, // 1: cosmos.auth.v1beta1.QueryAccountsResponse.accounts:type_name -> google.protobuf.Any - 20, // 2: cosmos.auth.v1beta1.QueryAccountsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 21, // 3: cosmos.auth.v1beta1.QueryParamsResponse.params:type_name -> cosmos.auth.v1beta1.Params - 19, // 4: cosmos.auth.v1beta1.QueryAccountResponse.account:type_name -> google.protobuf.Any - 19, // 5: cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts:type_name -> google.protobuf.Any - 22, // 6: cosmos.auth.v1beta1.QueryAccountInfoResponse.info:type_name -> cosmos.auth.v1beta1.BaseAccount - 0, // 7: cosmos.auth.v1beta1.Query.Accounts:input_type -> cosmos.auth.v1beta1.QueryAccountsRequest - 2, // 8: cosmos.auth.v1beta1.Query.Account:input_type -> cosmos.auth.v1beta1.QueryAccountRequest - 14, // 9: cosmos.auth.v1beta1.Query.AccountAddressByID:input_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDRequest - 6, // 10: cosmos.auth.v1beta1.Query.Params:input_type -> cosmos.auth.v1beta1.QueryParamsRequest - 3, // 11: cosmos.auth.v1beta1.Query.ModuleAccounts:input_type -> cosmos.auth.v1beta1.QueryModuleAccountsRequest - 8, // 12: cosmos.auth.v1beta1.Query.Bech32Prefix:input_type -> cosmos.auth.v1beta1.Bech32PrefixRequest - 10, // 13: cosmos.auth.v1beta1.Query.AddressBytesToString:input_type -> cosmos.auth.v1beta1.AddressBytesToStringRequest - 12, // 14: cosmos.auth.v1beta1.Query.AddressStringToBytes:input_type -> cosmos.auth.v1beta1.AddressStringToBytesRequest - 16, // 15: cosmos.auth.v1beta1.Query.AccountInfo:input_type -> cosmos.auth.v1beta1.QueryAccountInfoRequest - 1, // 16: cosmos.auth.v1beta1.Query.Accounts:output_type -> cosmos.auth.v1beta1.QueryAccountsResponse - 5, // 17: cosmos.auth.v1beta1.Query.Account:output_type -> cosmos.auth.v1beta1.QueryAccountResponse - 15, // 18: cosmos.auth.v1beta1.Query.AccountAddressByID:output_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDResponse - 4, // 19: cosmos.auth.v1beta1.Query.Params:output_type -> cosmos.auth.v1beta1.QueryParamsResponse - 7, // 20: cosmos.auth.v1beta1.Query.ModuleAccounts:output_type -> cosmos.auth.v1beta1.QueryModuleAccountsResponse - 9, // 21: cosmos.auth.v1beta1.Query.Bech32Prefix:output_type -> cosmos.auth.v1beta1.Bech32PrefixResponse - 11, // 22: cosmos.auth.v1beta1.Query.AddressBytesToString:output_type -> cosmos.auth.v1beta1.AddressBytesToStringResponse - 13, // 23: cosmos.auth.v1beta1.Query.AddressStringToBytes:output_type -> cosmos.auth.v1beta1.AddressStringToBytesResponse - 17, // 24: cosmos.auth.v1beta1.Query.AccountInfo:output_type -> cosmos.auth.v1beta1.QueryAccountInfoResponse - 16, // [16:25] is the sub-list for method output_type - 7, // [7:16] 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 + 20, // 0: cosmos.auth.v1beta1.QueryAccountsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 21, // 1: cosmos.auth.v1beta1.QueryAccountsResponse.accounts:type_name -> google.protobuf.Any + 22, // 2: cosmos.auth.v1beta1.QueryAccountsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 21, // 3: cosmos.auth.v1beta1.QueryAccountResponse.account:type_name -> google.protobuf.Any + 23, // 4: cosmos.auth.v1beta1.QueryParamsResponse.params:type_name -> cosmos.auth.v1beta1.Params + 21, // 5: cosmos.auth.v1beta1.QueryModuleAccountsResponse.accounts:type_name -> google.protobuf.Any + 21, // 6: cosmos.auth.v1beta1.QueryModuleAccountByNameResponse.account:type_name -> google.protobuf.Any + 24, // 7: cosmos.auth.v1beta1.QueryAccountInfoResponse.info:type_name -> cosmos.auth.v1beta1.BaseAccount + 0, // 8: cosmos.auth.v1beta1.Query.Accounts:input_type -> cosmos.auth.v1beta1.QueryAccountsRequest + 2, // 9: cosmos.auth.v1beta1.Query.Account:input_type -> cosmos.auth.v1beta1.QueryAccountRequest + 16, // 10: cosmos.auth.v1beta1.Query.AccountAddressByID:input_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDRequest + 4, // 11: cosmos.auth.v1beta1.Query.Params:input_type -> cosmos.auth.v1beta1.QueryParamsRequest + 6, // 12: cosmos.auth.v1beta1.Query.ModuleAccounts:input_type -> cosmos.auth.v1beta1.QueryModuleAccountsRequest + 8, // 13: cosmos.auth.v1beta1.Query.ModuleAccountByName:input_type -> cosmos.auth.v1beta1.QueryModuleAccountByNameRequest + 10, // 14: cosmos.auth.v1beta1.Query.Bech32Prefix:input_type -> cosmos.auth.v1beta1.Bech32PrefixRequest + 12, // 15: cosmos.auth.v1beta1.Query.AddressBytesToString:input_type -> cosmos.auth.v1beta1.AddressBytesToStringRequest + 14, // 16: cosmos.auth.v1beta1.Query.AddressStringToBytes:input_type -> cosmos.auth.v1beta1.AddressStringToBytesRequest + 18, // 17: cosmos.auth.v1beta1.Query.AccountInfo:input_type -> cosmos.auth.v1beta1.QueryAccountInfoRequest + 1, // 18: cosmos.auth.v1beta1.Query.Accounts:output_type -> cosmos.auth.v1beta1.QueryAccountsResponse + 3, // 19: cosmos.auth.v1beta1.Query.Account:output_type -> cosmos.auth.v1beta1.QueryAccountResponse + 17, // 20: cosmos.auth.v1beta1.Query.AccountAddressByID:output_type -> cosmos.auth.v1beta1.QueryAccountAddressByIDResponse + 5, // 21: cosmos.auth.v1beta1.Query.Params:output_type -> cosmos.auth.v1beta1.QueryParamsResponse + 7, // 22: cosmos.auth.v1beta1.Query.ModuleAccounts:output_type -> cosmos.auth.v1beta1.QueryModuleAccountsResponse + 9, // 23: cosmos.auth.v1beta1.Query.ModuleAccountByName:output_type -> cosmos.auth.v1beta1.QueryModuleAccountByNameResponse + 11, // 24: cosmos.auth.v1beta1.Query.Bech32Prefix:output_type -> cosmos.auth.v1beta1.Bech32PrefixResponse + 13, // 25: cosmos.auth.v1beta1.Query.AddressBytesToString:output_type -> cosmos.auth.v1beta1.AddressBytesToStringResponse + 15, // 26: cosmos.auth.v1beta1.Query.AddressStringToBytes:output_type -> cosmos.auth.v1beta1.AddressStringToBytesResponse + 19, // 27: cosmos.auth.v1beta1.Query.AccountInfo:output_type -> cosmos.auth.v1beta1.QueryAccountInfoResponse + 18, // [18:28] is the sub-list for method output_type + 8, // [8:18] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_cosmos_auth_v1beta1_query_proto_init() } @@ -8669,7 +9622,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryModuleAccountsRequest); i { + switch v := v.(*QueryAccountResponse); i { case 0: return &v.state case 1: @@ -8681,7 +9634,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsResponse); i { + switch v := v.(*QueryParamsRequest); i { case 0: return &v.state case 1: @@ -8693,7 +9646,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountResponse); i { + switch v := v.(*QueryParamsResponse); i { case 0: return &v.state case 1: @@ -8705,7 +9658,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { + switch v := v.(*QueryModuleAccountsRequest); i { case 0: return &v.state case 1: @@ -8729,7 +9682,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bech32PrefixRequest); i { + switch v := v.(*QueryModuleAccountByNameRequest); i { case 0: return &v.state case 1: @@ -8741,7 +9694,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bech32PrefixResponse); i { + switch v := v.(*QueryModuleAccountByNameResponse); i { case 0: return &v.state case 1: @@ -8753,7 +9706,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressBytesToStringRequest); i { + switch v := v.(*Bech32PrefixRequest); i { case 0: return &v.state case 1: @@ -8765,7 +9718,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressBytesToStringResponse); i { + switch v := v.(*Bech32PrefixResponse); i { case 0: return &v.state case 1: @@ -8777,7 +9730,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressStringToBytesRequest); i { + switch v := v.(*AddressBytesToStringRequest); i { case 0: return &v.state case 1: @@ -8789,7 +9742,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressStringToBytesResponse); i { + switch v := v.(*AddressBytesToStringResponse); i { case 0: return &v.state case 1: @@ -8801,7 +9754,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountAddressByIDRequest); i { + switch v := v.(*AddressStringToBytesRequest); i { case 0: return &v.state case 1: @@ -8813,7 +9766,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountAddressByIDResponse); i { + switch v := v.(*AddressStringToBytesResponse); i { case 0: return &v.state case 1: @@ -8825,7 +9778,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountInfoRequest); i { + switch v := v.(*QueryAccountAddressByIDRequest); i { case 0: return &v.state case 1: @@ -8837,6 +9790,30 @@ func file_cosmos_auth_v1beta1_query_proto_init() { } } file_cosmos_auth_v1beta1_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAccountAddressByIDResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_auth_v1beta1_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAccountInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_auth_v1beta1_query_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryAccountInfoResponse); i { case 0: return &v.state @@ -8855,7 +9832,7 @@ func file_cosmos_auth_v1beta1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_auth_v1beta1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 18, + NumMessages: 20, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/auth/v1beta1/query_grpc.pb.go b/api/cosmos/auth/v1beta1/query_grpc.pb.go index 4b62fbdecce8..1755c334de47 100644 --- a/api/cosmos/auth/v1beta1/query_grpc.pb.go +++ b/api/cosmos/auth/v1beta1/query_grpc.pb.go @@ -41,6 +41,8 @@ type QueryClient interface { // // Since: cosmos-sdk 0.46 ModuleAccounts(ctx context.Context, in *QueryModuleAccountsRequest, opts ...grpc.CallOption) (*QueryModuleAccountsResponse, error) + // ModuleAccountByName returns the module account info by module name + ModuleAccountByName(ctx context.Context, in *QueryModuleAccountByNameRequest, opts ...grpc.CallOption) (*QueryModuleAccountByNameResponse, error) // Bech32Prefix queries bech32Prefix // // Since: cosmos-sdk 0.46 @@ -112,6 +114,15 @@ func (c *queryClient) ModuleAccounts(ctx context.Context, in *QueryModuleAccount return out, nil } +func (c *queryClient) ModuleAccountByName(ctx context.Context, in *QueryModuleAccountByNameRequest, opts ...grpc.CallOption) (*QueryModuleAccountByNameResponse, error) { + out := new(QueryModuleAccountByNameResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/ModuleAccountByName", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) Bech32Prefix(ctx context.Context, in *Bech32PrefixRequest, opts ...grpc.CallOption) (*Bech32PrefixResponse, error) { out := new(Bech32PrefixResponse) err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Bech32Prefix", in, out, opts...) @@ -171,6 +182,8 @@ type QueryServer interface { // // Since: cosmos-sdk 0.46 ModuleAccounts(context.Context, *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) + // ModuleAccountByName returns the module account info by module name + ModuleAccountByName(context.Context, *QueryModuleAccountByNameRequest) (*QueryModuleAccountByNameResponse, error) // Bech32Prefix queries bech32Prefix // // Since: cosmos-sdk 0.46 @@ -209,6 +222,9 @@ func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*Q func (UnimplementedQueryServer) ModuleAccounts(context.Context, *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ModuleAccounts not implemented") } +func (UnimplementedQueryServer) ModuleAccountByName(context.Context, *QueryModuleAccountByNameRequest) (*QueryModuleAccountByNameResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ModuleAccountByName not implemented") +} func (UnimplementedQueryServer) Bech32Prefix(context.Context, *Bech32PrefixRequest) (*Bech32PrefixResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Bech32Prefix not implemented") } @@ -324,6 +340,24 @@ func _Query_ModuleAccounts_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _Query_ModuleAccountByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryModuleAccountByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ModuleAccountByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/ModuleAccountByName", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ModuleAccountByName(ctx, req.(*QueryModuleAccountByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_Bech32Prefix_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Bech32PrefixRequest) if err := dec(in); err != nil { @@ -423,6 +457,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "ModuleAccounts", Handler: _Query_ModuleAccounts_Handler, }, + { + MethodName: "ModuleAccountByName", + Handler: _Query_ModuleAccountByName_Handler, + }, { MethodName: "Bech32Prefix", Handler: _Query_Bech32Prefix_Handler, diff --git a/proto/cosmos/auth/v1beta1/query.proto b/proto/cosmos/auth/v1beta1/query.proto index ec8deed7d6db..2665563e798a 100644 --- a/proto/cosmos/auth/v1beta1/query.proto +++ b/proto/cosmos/auth/v1beta1/query.proto @@ -52,6 +52,12 @@ service Query { option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts"; } + // ModuleAccountByName returns the module account info by module name + rpc ModuleAccountByName(QueryModuleAccountByNameRequest) returns (QueryModuleAccountByNameResponse) { + option (cosmos.query.v1.module_query_safe) = true; + option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts/{name}"; + } + // Bech32Prefix queries bech32Prefix // // Since: cosmos-sdk 0.46 @@ -114,17 +120,6 @@ message QueryAccountRequest { string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } -// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. -// -// Since: cosmos-sdk 0.46 -message QueryModuleAccountsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false]; -} - // QueryAccountResponse is the response type for the Query/Account RPC method. message QueryAccountResponse { // account defines the account of the corresponding address. @@ -134,6 +129,17 @@ message QueryAccountResponse { // QueryParamsRequest is the request type for the Query/Params RPC method. message QueryParamsRequest {} +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + Params params = 1 [(gogoproto.nullable) = false]; +} + +// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. +// +// Since: cosmos-sdk 0.46 +message QueryModuleAccountsRequest {} + // QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. // // Since: cosmos-sdk 0.46 @@ -141,6 +147,16 @@ message QueryModuleAccountsResponse { repeated google.protobuf.Any accounts = 1 [(cosmos_proto.accepts_interface) = "ModuleAccountI"]; } +// QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. +message QueryModuleAccountByNameRequest { + string name = 1; +} + +// QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. +message QueryModuleAccountByNameResponse { + google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "ModuleAccountI"]; +} + // Bech32PrefixRequest is the request type for Bech32Prefix rpc method. // // Since: cosmos-sdk 0.46 diff --git a/tests/e2e/auth/suite.go b/tests/e2e/auth/suite.go index 329489c73d64..3e993901e29c 100644 --- a/tests/e2e/auth/suite.go +++ b/tests/e2e/auth/suite.go @@ -18,6 +18,7 @@ import ( "cosmossdk.io/math" authtestutil "github.com/cosmos/cosmos-sdk/x/auth/testutil" + "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/client" @@ -1422,6 +1423,68 @@ func (s *IntegrationTestSuite) TestGetAccountsCmd() { s.Require().NotEmpty(res.Accounts) } +func (s *IntegrationTestSuite) TestQueryModuleAccountByNameCmd() { + val := s.network.Validators[0] + + testCases := []struct { + name string + moduleName string + expectErr bool + }{ + { + "invalid module name", + "gover", + true, + }, + { + "valid module name", + "mint", + false, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, authcli.QueryModuleAccountByNameCmd(), []string{ + tc.moduleName, + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }) + if tc.expectErr { + s.Require().Error(err) + s.Require().NotEqual("internal", err.Error()) + } else { + var res authtypes.QueryModuleAccountByNameResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) + + var account types.AccountI + err := val.ClientCtx.InterfaceRegistry.UnpackAny(res.Account, &account) + s.Require().NoError(err) + + moduleAccount, ok := account.(types.ModuleAccountI) + s.Require().True(ok) + s.Require().Equal(tc.moduleName, moduleAccount.GetName()) + } + }) + } +} + +func (s *IntegrationTestSuite) TestQueryModuleAccountsCmd() { + val := s.network.Validators[0] + clientCtx := val.ClientCtx + + out, err := clitestutil.ExecTestCLICmd(clientCtx, authcli.QueryModuleAccountsCmd(), []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }) + s.Require().NoError(err) + + var res authtypes.QueryModuleAccountsResponse + s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &res)) + s.Require().NotEmpty(res.Accounts) +} + func TestGetBroadcastCommandOfflineFlag(t *testing.T) { cmd := authcli.GetBroadcastCommand() _ = testutil.ApplyMockIODiscardOutErr(cmd) diff --git a/x/auth/client/cli/query.go b/x/auth/client/cli/query.go index c86f66a04143..7af525b6be58 100644 --- a/x/auth/client/cli/query.go +++ b/x/auth/client/cli/query.go @@ -46,6 +46,7 @@ func GetQueryCmd() *cobra.Command { GetAccountsCmd(), QueryParamsCmd(), QueryModuleAccountsCmd(), + QueryModuleAccountByNameCmd(), ) return cmd @@ -219,6 +220,40 @@ func QueryModuleAccountsCmd() *cobra.Command { return cmd } +// QueryModuleAccountByNameCmd returns a command to +func QueryModuleAccountByNameCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "module-account [module-name]", + Short: "Query module account info by module name", + Args: cobra.ExactArgs(1), + Example: fmt.Sprintf("%s q auth module-account auth", version.AppName), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + moduleName := args[0] + if len(moduleName) == 0 { + return fmt.Errorf("module name should not be empty") + } + + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.ModuleAccountByName(context.Background(), &types.QueryModuleAccountByNameRequest{Name: moduleName}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + // QueryTxsByEventsCmd returns a command to search through transactions by events. func QueryTxsByEventsCmd() *cobra.Command { cmd := &cobra.Command{ diff --git a/x/auth/keeper/grpc_query.go b/x/auth/keeper/grpc_query.go index 12b0e77e1800..2d5ac8cde223 100644 --- a/x/auth/keeper/grpc_query.go +++ b/x/auth/keeper/grpc_query.go @@ -135,6 +135,31 @@ func (ak AccountKeeper) ModuleAccounts(c context.Context, req *types.QueryModule return &types.QueryModuleAccountsResponse{Accounts: modAccounts}, nil } +// ModuleAccountByName returns module account by module name +func (ak AccountKeeper) ModuleAccountByName(c context.Context, req *types.QueryModuleAccountByNameRequest) (*types.QueryModuleAccountByNameResponse, error) { + if req == nil { + return nil, status.Errorf(codes.InvalidArgument, "empty request") + } + + if len(req.Name) == 0 { + return nil, status.Error(codes.InvalidArgument, "module name is empty") + } + + ctx := sdk.UnwrapSDKContext(c) + moduleName := req.Name + + account := ak.GetModuleAccount(ctx, moduleName) + if account == nil { + return nil, status.Errorf(codes.NotFound, "account %s not found", moduleName) + } + any, err := codectypes.NewAnyWithValue(account) + if err != nil { + return nil, status.Errorf(codes.Internal, err.Error()) + } + + return &types.QueryModuleAccountByNameResponse{Account: any}, nil +} + // Bech32Prefix returns the keeper internally stored bech32 prefix. func (ak AccountKeeper) Bech32Prefix(ctx context.Context, req *types.Bech32PrefixRequest) (*types.Bech32PrefixResponse, error) { bech32Prefix, err := ak.getBech32Prefix() diff --git a/x/auth/keeper/grpc_query_test.go b/x/auth/keeper/grpc_query_test.go index 86bec2e27ef6..a1bc322a778a 100644 --- a/x/auth/keeper/grpc_query_test.go +++ b/x/auth/keeper/grpc_query_test.go @@ -350,6 +350,61 @@ func (suite *KeeperTestSuite) TestGRPCQueryModuleAccounts() { } } +func (suite *KeeperTestSuite) TestGRPCQueryModuleAccountByName() { + var req *types.QueryModuleAccountByNameRequest + + testCases := []struct { + msg string + malleate func() + expPass bool + posttests func(res *types.QueryModuleAccountByNameResponse) + }{ + { + "success", + func() { + req = &types.QueryModuleAccountByNameRequest{Name: "mint"} + }, + true, + func(res *types.QueryModuleAccountByNameResponse) { + var account types.AccountI + err := suite.encCfg.InterfaceRegistry.UnpackAny(res.Account, &account) + suite.Require().NoError(err) + + moduleAccount, ok := account.(types.ModuleAccountI) + suite.Require().True(ok) + suite.Require().Equal(moduleAccount.GetName(), "mint") + }, + }, + { + "invalid module name", + func() { + req = &types.QueryModuleAccountByNameRequest{Name: "gover"} + }, + false, + func(res *types.QueryModuleAccountByNameResponse) { + }, + }, + } + + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + suite.SetupTest() // reset + tc.malleate() + ctx := sdk.WrapSDKContext(suite.ctx) + res, err := suite.queryClient.ModuleAccountByName(ctx, req) + if tc.expPass { + suite.Require().NoError(err) + suite.Require().NotNil(res) + } else { + suite.Require().Error(err) + suite.Require().Nil(res) + } + + tc.posttests(res) + }) + } +} + func (suite *KeeperTestSuite) TestBech32Prefix() { suite.SetupTest() // reset req := &types.Bech32PrefixRequest{} diff --git a/x/auth/types/query.pb.go b/x/auth/types/query.pb.go index c597bcf70dfa..cd2005ecb770 100644 --- a/x/auth/types/query.pb.go +++ b/x/auth/types/query.pb.go @@ -176,24 +176,24 @@ func (m *QueryAccountRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAccountRequest proto.InternalMessageInfo -// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. -// -// Since: cosmos-sdk 0.46 -type QueryModuleAccountsRequest struct { +// QueryAccountResponse is the response type for the Query/Account RPC method. +type QueryAccountResponse struct { + // account defines the account of the corresponding address. + Account *types.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` } -func (m *QueryModuleAccountsRequest) Reset() { *m = QueryModuleAccountsRequest{} } -func (m *QueryModuleAccountsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryModuleAccountsRequest) ProtoMessage() {} -func (*QueryModuleAccountsRequest) Descriptor() ([]byte, []int) { +func (m *QueryAccountResponse) Reset() { *m = QueryAccountResponse{} } +func (m *QueryAccountResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAccountResponse) ProtoMessage() {} +func (*QueryAccountResponse) Descriptor() ([]byte, []int) { return fileDescriptor_c451370b3929a27c, []int{3} } -func (m *QueryModuleAccountsRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryAccountResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryModuleAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryModuleAccountsRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryAccountResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -203,17 +203,61 @@ func (m *QueryModuleAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } -func (m *QueryModuleAccountsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryModuleAccountsRequest.Merge(m, src) +func (m *QueryAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountResponse.Merge(m, src) } -func (m *QueryModuleAccountsRequest) XXX_Size() int { +func (m *QueryAccountResponse) XXX_Size() int { return m.Size() } -func (m *QueryModuleAccountsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryModuleAccountsRequest.DiscardUnknown(m) +func (m *QueryAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryModuleAccountsRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryAccountResponse proto.InternalMessageInfo + +func (m *QueryAccountResponse) GetAccount() *types.Any { + if m != nil { + return m.Account + } + return nil +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{4} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.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 *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo // QueryParamsResponse is the response type for the Query/Params RPC method. type QueryParamsResponse struct { @@ -225,7 +269,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{4} + return fileDescriptor_c451370b3929a27c, []int{5} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -261,24 +305,24 @@ func (m *QueryParamsResponse) GetParams() Params { return Params{} } -// QueryAccountResponse is the response type for the Query/Account RPC method. -type QueryAccountResponse struct { - // account defines the account of the corresponding address. - Account *types.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` +// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. +// +// Since: cosmos-sdk 0.46 +type QueryModuleAccountsRequest struct { } -func (m *QueryAccountResponse) Reset() { *m = QueryAccountResponse{} } -func (m *QueryAccountResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAccountResponse) ProtoMessage() {} -func (*QueryAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{5} +func (m *QueryModuleAccountsRequest) Reset() { *m = QueryModuleAccountsRequest{} } +func (m *QueryModuleAccountsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryModuleAccountsRequest) ProtoMessage() {} +func (*QueryModuleAccountsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{6} } -func (m *QueryAccountResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryModuleAccountsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryModuleAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryAccountResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryModuleAccountsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -288,41 +332,82 @@ func (m *QueryAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (m *QueryAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAccountResponse.Merge(m, src) +func (m *QueryModuleAccountsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryModuleAccountsRequest.Merge(m, src) } -func (m *QueryAccountResponse) XXX_Size() int { +func (m *QueryModuleAccountsRequest) XXX_Size() int { return m.Size() } -func (m *QueryAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAccountResponse.DiscardUnknown(m) +func (m *QueryModuleAccountsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryModuleAccountsRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryAccountResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryModuleAccountsRequest proto.InternalMessageInfo -func (m *QueryAccountResponse) GetAccount() *types.Any { +// QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. +// +// Since: cosmos-sdk 0.46 +type QueryModuleAccountsResponse struct { + Accounts []*types.Any `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` +} + +func (m *QueryModuleAccountsResponse) Reset() { *m = QueryModuleAccountsResponse{} } +func (m *QueryModuleAccountsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryModuleAccountsResponse) ProtoMessage() {} +func (*QueryModuleAccountsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{7} +} +func (m *QueryModuleAccountsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryModuleAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryModuleAccountsResponse.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 *QueryModuleAccountsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryModuleAccountsResponse.Merge(m, src) +} +func (m *QueryModuleAccountsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryModuleAccountsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryModuleAccountsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryModuleAccountsResponse proto.InternalMessageInfo + +func (m *QueryModuleAccountsResponse) GetAccounts() []*types.Any { if m != nil { - return m.Account + return m.Accounts } return nil } -// QueryParamsRequest is the request type for the Query/Params RPC method. -type QueryParamsRequest struct { +// QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. +type QueryModuleAccountByNameRequest struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } -func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryParamsRequest) ProtoMessage() {} -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{6} +func (m *QueryModuleAccountByNameRequest) Reset() { *m = QueryModuleAccountByNameRequest{} } +func (m *QueryModuleAccountByNameRequest) String() string { return proto.CompactTextString(m) } +func (*QueryModuleAccountByNameRequest) ProtoMessage() {} +func (*QueryModuleAccountByNameRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{8} } -func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryModuleAccountByNameRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryModuleAccountByNameRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryModuleAccountByNameRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -332,37 +417,42 @@ func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsRequest.Merge(m, src) +func (m *QueryModuleAccountByNameRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryModuleAccountByNameRequest.Merge(m, src) } -func (m *QueryParamsRequest) XXX_Size() int { +func (m *QueryModuleAccountByNameRequest) XXX_Size() int { return m.Size() } -func (m *QueryParamsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +func (m *QueryModuleAccountByNameRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryModuleAccountByNameRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryModuleAccountByNameRequest proto.InternalMessageInfo -// QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. -// -// Since: cosmos-sdk 0.46 -type QueryModuleAccountsResponse struct { - Accounts []*types.Any `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` +func (m *QueryModuleAccountByNameRequest) GetName() string { + if m != nil { + return m.Name + } + return "" } -func (m *QueryModuleAccountsResponse) Reset() { *m = QueryModuleAccountsResponse{} } -func (m *QueryModuleAccountsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryModuleAccountsResponse) ProtoMessage() {} -func (*QueryModuleAccountsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{7} +// QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. +type QueryModuleAccountByNameResponse struct { + Account *types.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` } -func (m *QueryModuleAccountsResponse) XXX_Unmarshal(b []byte) error { + +func (m *QueryModuleAccountByNameResponse) Reset() { *m = QueryModuleAccountByNameResponse{} } +func (m *QueryModuleAccountByNameResponse) String() string { return proto.CompactTextString(m) } +func (*QueryModuleAccountByNameResponse) ProtoMessage() {} +func (*QueryModuleAccountByNameResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c451370b3929a27c, []int{9} +} +func (m *QueryModuleAccountByNameResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryModuleAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryModuleAccountByNameResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryModuleAccountsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryModuleAccountByNameResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -372,21 +462,21 @@ func (m *QueryModuleAccountsResponse) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *QueryModuleAccountsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryModuleAccountsResponse.Merge(m, src) +func (m *QueryModuleAccountByNameResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryModuleAccountByNameResponse.Merge(m, src) } -func (m *QueryModuleAccountsResponse) XXX_Size() int { +func (m *QueryModuleAccountByNameResponse) XXX_Size() int { return m.Size() } -func (m *QueryModuleAccountsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryModuleAccountsResponse.DiscardUnknown(m) +func (m *QueryModuleAccountByNameResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryModuleAccountByNameResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryModuleAccountsResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryModuleAccountByNameResponse proto.InternalMessageInfo -func (m *QueryModuleAccountsResponse) GetAccounts() []*types.Any { +func (m *QueryModuleAccountByNameResponse) GetAccount() *types.Any { if m != nil { - return m.Accounts + return m.Account } return nil } @@ -401,7 +491,7 @@ func (m *Bech32PrefixRequest) Reset() { *m = Bech32PrefixRequest{} } func (m *Bech32PrefixRequest) String() string { return proto.CompactTextString(m) } func (*Bech32PrefixRequest) ProtoMessage() {} func (*Bech32PrefixRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{8} + return fileDescriptor_c451370b3929a27c, []int{10} } func (m *Bech32PrefixRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -441,7 +531,7 @@ func (m *Bech32PrefixResponse) Reset() { *m = Bech32PrefixResponse{} } func (m *Bech32PrefixResponse) String() string { return proto.CompactTextString(m) } func (*Bech32PrefixResponse) ProtoMessage() {} func (*Bech32PrefixResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{9} + return fileDescriptor_c451370b3929a27c, []int{11} } func (m *Bech32PrefixResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -488,7 +578,7 @@ func (m *AddressBytesToStringRequest) Reset() { *m = AddressBytesToStrin func (m *AddressBytesToStringRequest) String() string { return proto.CompactTextString(m) } func (*AddressBytesToStringRequest) ProtoMessage() {} func (*AddressBytesToStringRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{10} + return fileDescriptor_c451370b3929a27c, []int{12} } func (m *AddressBytesToStringRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -535,7 +625,7 @@ func (m *AddressBytesToStringResponse) Reset() { *m = AddressBytesToStri func (m *AddressBytesToStringResponse) String() string { return proto.CompactTextString(m) } func (*AddressBytesToStringResponse) ProtoMessage() {} func (*AddressBytesToStringResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{11} + return fileDescriptor_c451370b3929a27c, []int{13} } func (m *AddressBytesToStringResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -582,7 +672,7 @@ func (m *AddressStringToBytesRequest) Reset() { *m = AddressStringToByte func (m *AddressStringToBytesRequest) String() string { return proto.CompactTextString(m) } func (*AddressStringToBytesRequest) ProtoMessage() {} func (*AddressStringToBytesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{12} + return fileDescriptor_c451370b3929a27c, []int{14} } func (m *AddressStringToBytesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -629,7 +719,7 @@ func (m *AddressStringToBytesResponse) Reset() { *m = AddressStringToByt func (m *AddressStringToBytesResponse) String() string { return proto.CompactTextString(m) } func (*AddressStringToBytesResponse) ProtoMessage() {} func (*AddressStringToBytesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{13} + return fileDescriptor_c451370b3929a27c, []int{15} } func (m *AddressStringToBytesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -679,7 +769,7 @@ func (m *QueryAccountAddressByIDRequest) Reset() { *m = QueryAccountAddr func (m *QueryAccountAddressByIDRequest) String() string { return proto.CompactTextString(m) } func (*QueryAccountAddressByIDRequest) ProtoMessage() {} func (*QueryAccountAddressByIDRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{14} + return fileDescriptor_c451370b3929a27c, []int{16} } func (m *QueryAccountAddressByIDRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -726,7 +816,7 @@ func (m *QueryAccountAddressByIDResponse) Reset() { *m = QueryAccountAdd func (m *QueryAccountAddressByIDResponse) String() string { return proto.CompactTextString(m) } func (*QueryAccountAddressByIDResponse) ProtoMessage() {} func (*QueryAccountAddressByIDResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{15} + return fileDescriptor_c451370b3929a27c, []int{17} } func (m *QueryAccountAddressByIDResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -774,7 +864,7 @@ func (m *QueryAccountInfoRequest) Reset() { *m = QueryAccountInfoRequest func (m *QueryAccountInfoRequest) String() string { return proto.CompactTextString(m) } func (*QueryAccountInfoRequest) ProtoMessage() {} func (*QueryAccountInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{16} + return fileDescriptor_c451370b3929a27c, []int{18} } func (m *QueryAccountInfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -822,7 +912,7 @@ func (m *QueryAccountInfoResponse) Reset() { *m = QueryAccountInfoRespon func (m *QueryAccountInfoResponse) String() string { return proto.CompactTextString(m) } func (*QueryAccountInfoResponse) ProtoMessage() {} func (*QueryAccountInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c451370b3929a27c, []int{17} + return fileDescriptor_c451370b3929a27c, []int{19} } func (m *QueryAccountInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -862,11 +952,13 @@ func init() { proto.RegisterType((*QueryAccountsRequest)(nil), "cosmos.auth.v1beta1.QueryAccountsRequest") proto.RegisterType((*QueryAccountsResponse)(nil), "cosmos.auth.v1beta1.QueryAccountsResponse") proto.RegisterType((*QueryAccountRequest)(nil), "cosmos.auth.v1beta1.QueryAccountRequest") - proto.RegisterType((*QueryModuleAccountsRequest)(nil), "cosmos.auth.v1beta1.QueryModuleAccountsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.auth.v1beta1.QueryParamsResponse") proto.RegisterType((*QueryAccountResponse)(nil), "cosmos.auth.v1beta1.QueryAccountResponse") proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.auth.v1beta1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.auth.v1beta1.QueryParamsResponse") + proto.RegisterType((*QueryModuleAccountsRequest)(nil), "cosmos.auth.v1beta1.QueryModuleAccountsRequest") proto.RegisterType((*QueryModuleAccountsResponse)(nil), "cosmos.auth.v1beta1.QueryModuleAccountsResponse") + proto.RegisterType((*QueryModuleAccountByNameRequest)(nil), "cosmos.auth.v1beta1.QueryModuleAccountByNameRequest") + proto.RegisterType((*QueryModuleAccountByNameResponse)(nil), "cosmos.auth.v1beta1.QueryModuleAccountByNameResponse") proto.RegisterType((*Bech32PrefixRequest)(nil), "cosmos.auth.v1beta1.Bech32PrefixRequest") proto.RegisterType((*Bech32PrefixResponse)(nil), "cosmos.auth.v1beta1.Bech32PrefixResponse") proto.RegisterType((*AddressBytesToStringRequest)(nil), "cosmos.auth.v1beta1.AddressBytesToStringRequest") @@ -882,68 +974,72 @@ func init() { func init() { proto.RegisterFile("cosmos/auth/v1beta1/query.proto", fileDescriptor_c451370b3929a27c) } var fileDescriptor_c451370b3929a27c = []byte{ - // 971 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xc7, 0xbd, 0x69, 0x49, 0xc2, 0x8b, 0x1b, 0xa4, 0x89, 0x2b, 0xc2, 0x3a, 0xb5, 0xa3, 0x2d, - 0x34, 0x4e, 0xa8, 0x77, 0x1b, 0x27, 0x07, 0x0a, 0x08, 0x29, 0x6e, 0x00, 0xe5, 0x50, 0xc9, 0x6c, - 0x73, 0xe2, 0x80, 0xb5, 0xf6, 0x6e, 0x36, 0x2b, 0x9a, 0x1d, 0xd7, 0xb3, 0x46, 0x8d, 0xaa, 0x5c, - 0x90, 0x90, 0x7a, 0xa9, 0x84, 0x04, 0x7f, 0x40, 0x0e, 0x88, 0x33, 0x87, 0xc0, 0x95, 0x6b, 0xd5, - 0x53, 0x04, 0x17, 0x4e, 0x08, 0x25, 0x48, 0xf0, 0x67, 0x20, 0xcf, 0xbc, 0xd9, 0x1f, 0xc9, 0xd8, - 0xde, 0x88, 0x53, 0xbc, 0x33, 0xef, 0x7d, 0xdf, 0x67, 0xde, 0x7b, 0xf3, 0x26, 0x50, 0xed, 0x52, - 0x76, 0x40, 0x99, 0xe5, 0x0c, 0xa2, 0x7d, 0xeb, 0xab, 0xf5, 0x8e, 0x17, 0x39, 0xeb, 0xd6, 0x93, - 0x81, 0xd7, 0x3f, 0x34, 0x7b, 0x7d, 0x1a, 0x51, 0xb2, 0x20, 0x0c, 0xcc, 0xa1, 0x81, 0x89, 0x06, - 0xfa, 0x1a, 0x7a, 0x75, 0x1c, 0xe6, 0x09, 0xeb, 0xd8, 0xb7, 0xe7, 0xf8, 0x41, 0xe8, 0x44, 0x01, - 0x0d, 0x85, 0x80, 0x5e, 0xf2, 0xa9, 0x4f, 0xf9, 0x4f, 0x6b, 0xf8, 0x0b, 0x57, 0xdf, 0xf2, 0x29, - 0xf5, 0x1f, 0x7b, 0x16, 0xff, 0xea, 0x0c, 0xf6, 0x2c, 0x27, 0xc4, 0x88, 0xfa, 0x12, 0x6e, 0x39, - 0xbd, 0xc0, 0x72, 0xc2, 0x90, 0x46, 0x5c, 0x8d, 0xe1, 0x6e, 0x45, 0x05, 0xcc, 0xe1, 0x50, 0x58, - 0xec, 0xb7, 0x45, 0x44, 0x84, 0x17, 0x5b, 0x65, 0x74, 0x95, 0xc0, 0xe9, 0x73, 0x1a, 0x5f, 0x40, - 0xe9, 0xb3, 0xe1, 0xe7, 0x56, 0xb7, 0x4b, 0x07, 0x61, 0xc4, 0x6c, 0xef, 0xc9, 0xc0, 0x63, 0x11, - 0xf9, 0x04, 0x20, 0x39, 0xd2, 0xa2, 0xb6, 0xac, 0xd5, 0xe6, 0x1a, 0x77, 0x4c, 0xd4, 0x1d, 0x9e, - 0xdf, 0x14, 0x2a, 0x88, 0x62, 0xb6, 0x1c, 0xdf, 0x43, 0x5f, 0x3b, 0xe5, 0x69, 0x1c, 0x6b, 0x70, - 0xf3, 0x42, 0x00, 0xd6, 0xa3, 0x21, 0xf3, 0xc8, 0x47, 0x30, 0xeb, 0xe0, 0xda, 0xa2, 0xb6, 0x7c, - 0xad, 0x36, 0xd7, 0x28, 0x99, 0x22, 0x05, 0xa6, 0xcc, 0x8e, 0xb9, 0x15, 0x1e, 0x36, 0x8b, 0xaf, - 0x4e, 0xea, 0xb3, 0xe8, 0xbd, 0x63, 0xc7, 0x3e, 0xe4, 0xd3, 0x0c, 0xe1, 0x14, 0x27, 0x5c, 0x99, - 0x48, 0x28, 0x82, 0x67, 0x10, 0x1f, 0xc1, 0x42, 0x9a, 0x50, 0x66, 0xa0, 0x01, 0x33, 0x8e, 0xeb, - 0xf6, 0x3d, 0xc6, 0xf8, 0xf1, 0x5f, 0x6f, 0x2e, 0xfe, 0x76, 0x52, 0x2f, 0xa1, 0xfe, 0x96, 0xd8, - 0x79, 0x14, 0xf5, 0x83, 0xd0, 0xb7, 0xa5, 0xe1, 0xfb, 0xb3, 0xcf, 0x8f, 0xab, 0x85, 0x7f, 0x8f, - 0xab, 0x05, 0x63, 0x09, 0x74, 0x2e, 0xfa, 0x90, 0xba, 0x83, 0xc7, 0xde, 0x85, 0xec, 0x1a, 0x2d, - 0x0c, 0xd9, 0x72, 0xfa, 0xce, 0x41, 0x92, 0x92, 0xfb, 0x30, 0xdd, 0xe3, 0x2b, 0x98, 0xf0, 0xb2, - 0xa9, 0xe8, 0x42, 0x53, 0x38, 0x35, 0xaf, 0xbf, 0xfc, 0xb3, 0x5a, 0xb0, 0xd1, 0xc1, 0xd8, 0xcd, - 0xd6, 0x31, 0x96, 0xfc, 0x10, 0x66, 0x30, 0x63, 0xa8, 0x99, 0x27, 0xc9, 0xd2, 0xc5, 0x28, 0x01, - 0xc9, 0x70, 0x0a, 0xfa, 0x2e, 0x94, 0x95, 0x67, 0xc3, 0x90, 0xdb, 0x39, 0x0b, 0x4b, 0x5e, 0x9d, - 0xd4, 0xe7, 0x33, 0x1a, 0xa9, 0xf2, 0x1a, 0x37, 0x61, 0xa1, 0xe9, 0x75, 0xf7, 0x37, 0x1a, 0xad, - 0xbe, 0xb7, 0x17, 0x3c, 0x95, 0xb1, 0x3f, 0x80, 0x52, 0x76, 0x19, 0x83, 0xde, 0x86, 0x1b, 0x1d, - 0xbe, 0xde, 0xee, 0xf1, 0x0d, 0x51, 0x33, 0xbb, 0xd8, 0x49, 0x19, 0x1b, 0x4d, 0x28, 0x63, 0xe1, - 0x9a, 0x87, 0x91, 0xc7, 0x76, 0x29, 0xd6, 0x0f, 0x2b, 0x7e, 0x1b, 0x6e, 0x60, 0x21, 0xdb, 0x9d, - 0xe1, 0x3e, 0xd7, 0x28, 0xda, 0x45, 0x27, 0xe5, 0x63, 0x7c, 0x0c, 0x4b, 0x6a, 0x0d, 0x04, 0x79, - 0x07, 0xe6, 0xa5, 0x08, 0xe3, 0x3b, 0x48, 0x22, 0xa5, 0x85, 0xb9, 0xb1, 0x1d, 0xa3, 0x88, 0x85, - 0x5d, 0xca, 0xe5, 0x24, 0x4a, 0x4e, 0x95, 0x07, 0x31, 0xcc, 0x05, 0x95, 0x24, 0x2b, 0x93, 0x4f, - 0x74, 0x0f, 0x2a, 0xe9, 0xd6, 0x89, 0x4f, 0xb7, 0xb3, 0x2d, 0x69, 0xe6, 0x61, 0x2a, 0x70, 0xb9, - 0xef, 0x35, 0x7b, 0x2a, 0x70, 0x0d, 0x17, 0xaa, 0x23, 0x3d, 0x30, 0xf2, 0x16, 0xbc, 0x81, 0xa5, - 0x6c, 0xe7, 0xbd, 0x45, 0xf3, 0x4e, 0x46, 0xce, 0x78, 0x08, 0x6f, 0xa6, 0xa3, 0xec, 0x84, 0x7b, - 0xf4, 0x7f, 0xdc, 0x4d, 0xa3, 0x05, 0x8b, 0x97, 0xe5, 0x90, 0x76, 0x13, 0xae, 0x07, 0xe1, 0x1e, - 0xc5, 0x2b, 0xb2, 0xac, 0xbc, 0x76, 0x4d, 0x87, 0xc9, 0x3e, 0xb5, 0xb9, 0x75, 0xe3, 0xd7, 0x39, - 0x78, 0x8d, 0x4b, 0x92, 0x17, 0x1a, 0xc8, 0xdb, 0xc3, 0xc8, 0xaa, 0xd2, 0x5d, 0x35, 0x65, 0xf5, - 0xb5, 0x3c, 0xa6, 0x82, 0xd1, 0x58, 0x7b, 0xfe, 0xcf, 0x4f, 0x6b, 0xda, 0xd7, 0xbf, 0xff, 0xfd, - 0xdd, 0x54, 0x95, 0xdc, 0xb2, 0x94, 0xef, 0x81, 0x44, 0xf8, 0x5e, 0x83, 0x19, 0x14, 0x20, 0xb5, - 0x89, 0x31, 0x24, 0xcd, 0x6a, 0x0e, 0x4b, 0x84, 0xd9, 0x4c, 0x60, 0x56, 0xc9, 0xca, 0x58, 0x18, - 0xeb, 0x19, 0x56, 0xe0, 0x88, 0xfc, 0xac, 0x01, 0xb9, 0xdc, 0x33, 0x64, 0x63, 0x62, 0xdc, 0xcb, - 0x3d, 0xa9, 0x6f, 0x5e, 0xcd, 0xe9, 0x0a, 0xdc, 0xf1, 0x85, 0x69, 0x07, 0xae, 0xf5, 0x2c, 0x70, - 0x8f, 0xc8, 0x37, 0x1a, 0x4c, 0x8b, 0x11, 0x48, 0x56, 0x46, 0x87, 0xcd, 0x0c, 0x49, 0xbd, 0x36, - 0xd9, 0x10, 0x99, 0x6a, 0x09, 0xd3, 0x2d, 0x52, 0x56, 0x32, 0x89, 0x21, 0x4f, 0x7e, 0xd4, 0x20, - 0x3b, 0x30, 0x19, 0xb1, 0x46, 0x87, 0x51, 0x3e, 0x3d, 0xfa, 0xbd, 0xfc, 0x0e, 0xc8, 0xb7, 0x9e, - 0xf0, 0xdd, 0x21, 0x6f, 0x2b, 0xf9, 0x0e, 0xb8, 0x67, 0x3b, 0xee, 0xbf, 0x17, 0x1a, 0x14, 0xd3, - 0x63, 0x7a, 0x44, 0x13, 0x2a, 0x06, 0xfc, 0x88, 0x26, 0x54, 0xcd, 0xfc, 0x3c, 0x89, 0x13, 0xe3, - 0x7f, 0xd8, 0x78, 0x25, 0xd5, 0xd4, 0x26, 0xea, 0x6c, 0x8c, 0x79, 0x24, 0xf4, 0xf5, 0x2b, 0x78, - 0x20, 0xe7, 0x7b, 0x09, 0x67, 0x9d, 0xbc, 0x3b, 0x86, 0x33, 0xbe, 0x2a, 0x62, 0x5a, 0x1f, 0x91, - 0x5f, 0x12, 0xee, 0xcc, 0x80, 0x1f, 0xcf, 0xad, 0x7a, 0x51, 0xc6, 0x73, 0x2b, 0x5f, 0x0f, 0xe3, - 0x7e, 0xc2, 0x6d, 0x92, 0xbb, 0xb9, 0xb8, 0xc5, 0x63, 0x75, 0x44, 0x7e, 0xd0, 0x60, 0x2e, 0x35, - 0x68, 0xc9, 0xdd, 0x89, 0xb7, 0x35, 0x35, 0xde, 0xf5, 0x7a, 0x4e, 0xeb, 0xfc, 0xf9, 0x95, 0x6f, - 0xd1, 0x70, 0x6e, 0x27, 0x03, 0xa9, 0xf9, 0xe0, 0xe5, 0x59, 0x45, 0x3b, 0x3d, 0xab, 0x68, 0x7f, - 0x9d, 0x55, 0xb4, 0x6f, 0xcf, 0x2b, 0x85, 0xd3, 0xf3, 0x4a, 0xe1, 0x8f, 0xf3, 0x4a, 0xe1, 0xf3, - 0x55, 0x3f, 0x88, 0xf6, 0x07, 0x1d, 0xb3, 0x4b, 0x0f, 0xa4, 0xa0, 0xf8, 0x53, 0x67, 0xee, 0x97, - 0xd6, 0x53, 0xa1, 0x1e, 0x1d, 0xf6, 0x3c, 0xd6, 0x99, 0xe6, 0xff, 0xd5, 0x6c, 0xfc, 0x17, 0x00, - 0x00, 0xff, 0xff, 0x83, 0xfa, 0x46, 0x09, 0x54, 0x0c, 0x00, 0x00, + // 1038 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0x4f, 0x6f, 0x1b, 0xc5, + 0x1b, 0xc7, 0xbd, 0x69, 0x7e, 0x49, 0x7e, 0x4f, 0xdc, 0x20, 0x4d, 0x5c, 0x11, 0xd6, 0xa9, 0x1d, + 0x6d, 0xa1, 0x71, 0x42, 0xbd, 0xdb, 0x38, 0xa9, 0x44, 0x01, 0x21, 0x65, 0x1b, 0x40, 0x39, 0x14, + 0x19, 0x37, 0x27, 0x0e, 0x58, 0x63, 0x7b, 0xed, 0xac, 0xa8, 0x77, 0x5c, 0xef, 0x1a, 0xd5, 0x8a, + 0x7c, 0x41, 0x42, 0xea, 0x05, 0x09, 0x09, 0x5e, 0x40, 0x0e, 0x88, 0x33, 0x87, 0xc0, 0x89, 0x17, + 0x50, 0xf5, 0x54, 0xc1, 0x85, 0x13, 0x42, 0x09, 0x12, 0xbc, 0x0a, 0x84, 0x3c, 0xf3, 0xcc, 0xfe, + 0x49, 0xc6, 0xf1, 0x46, 0x9c, 0xb2, 0x9e, 0x79, 0x9e, 0xef, 0xf3, 0x99, 0x99, 0x67, 0xe6, 0x1b, + 0x28, 0x36, 0x99, 0xdf, 0x65, 0xbe, 0x45, 0x07, 0xc1, 0xa1, 0xf5, 0xf9, 0x56, 0xc3, 0x09, 0xe8, + 0x96, 0xf5, 0x64, 0xe0, 0xf4, 0x87, 0x66, 0xaf, 0xcf, 0x02, 0x46, 0x96, 0x45, 0x80, 0x39, 0x0e, + 0x30, 0x31, 0x40, 0xdf, 0xc4, 0xac, 0x06, 0xf5, 0x1d, 0x11, 0x1d, 0xe6, 0xf6, 0x68, 0xc7, 0xf5, + 0x68, 0xe0, 0x32, 0x4f, 0x08, 0xe8, 0xb9, 0x0e, 0xeb, 0x30, 0xfe, 0x69, 0x8d, 0xbf, 0x70, 0xf4, + 0xb5, 0x0e, 0x63, 0x9d, 0xc7, 0x8e, 0xc5, 0x7f, 0x35, 0x06, 0x6d, 0x8b, 0x7a, 0x58, 0x51, 0x5f, + 0xc5, 0x29, 0xda, 0x73, 0x2d, 0xea, 0x79, 0x2c, 0xe0, 0x6a, 0x3e, 0xce, 0x16, 0x54, 0xc0, 0x1c, + 0x0e, 0x85, 0xc5, 0x7c, 0x5d, 0x54, 0x44, 0x78, 0x31, 0x95, 0xc7, 0x54, 0x09, 0x1c, 0x5f, 0xa7, + 0xf1, 0x29, 0xe4, 0x3e, 0x1e, 0xff, 0xdc, 0x6d, 0x36, 0xd9, 0xc0, 0x0b, 0xfc, 0x9a, 0xf3, 0x64, + 0xe0, 0xf8, 0x01, 0xf9, 0x00, 0x20, 0x5a, 0xd2, 0x8a, 0xb6, 0xa6, 0x95, 0x16, 0x2b, 0xb7, 0x4d, + 0xd4, 0x1d, 0xaf, 0xdf, 0x14, 0x2a, 0x88, 0x62, 0x56, 0x69, 0xc7, 0xc1, 0xdc, 0x5a, 0x2c, 0xd3, + 0x38, 0xd6, 0xe0, 0xc6, 0xb9, 0x02, 0x7e, 0x8f, 0x79, 0xbe, 0x43, 0xde, 0x83, 0x05, 0x8a, 0x63, + 0x2b, 0xda, 0xda, 0xb5, 0xd2, 0x62, 0x25, 0x67, 0x8a, 0x2d, 0x30, 0xe5, 0xee, 0x98, 0xbb, 0xde, + 0xd0, 0xce, 0xbe, 0x38, 0x29, 0x2f, 0x60, 0xf6, 0x7e, 0x2d, 0xcc, 0x21, 0x1f, 0x26, 0x08, 0x67, + 0x38, 0xe1, 0xfa, 0x54, 0x42, 0x51, 0x3c, 0x81, 0xf8, 0x08, 0x96, 0xe3, 0x84, 0x72, 0x07, 0x2a, + 0x30, 0x4f, 0x5b, 0xad, 0xbe, 0xe3, 0xfb, 0x7c, 0xf9, 0xff, 0xb7, 0x57, 0x7e, 0x39, 0x29, 0xe7, + 0x50, 0x7f, 0x57, 0xcc, 0x3c, 0x0a, 0xfa, 0xae, 0xd7, 0xa9, 0xc9, 0xc0, 0xb7, 0x17, 0x9e, 0x1d, + 0x17, 0x33, 0x7f, 0x1f, 0x17, 0x33, 0xc6, 0x41, 0x72, 0x5f, 0xc3, 0x55, 0xbf, 0x0b, 0xf3, 0xb8, + 0x02, 0xdc, 0xd4, 0x34, 0x8b, 0x96, 0x29, 0x46, 0x0e, 0x08, 0x57, 0xad, 0xd2, 0x3e, 0xed, 0xca, + 0xb3, 0x32, 0xaa, 0xb8, 0x00, 0x39, 0x8a, 0xa5, 0xee, 0xc3, 0x5c, 0x8f, 0x8f, 0x60, 0xa5, 0xbc, + 0xa9, 0xe8, 0x69, 0x53, 0x24, 0xd9, 0xb3, 0xcf, 0x7f, 0x2f, 0x66, 0x6a, 0x98, 0x60, 0xac, 0x82, + 0xce, 0x15, 0x1f, 0xb2, 0xd6, 0xe0, 0xb1, 0x73, 0xae, 0x37, 0x8c, 0x26, 0xe4, 0x95, 0xb3, 0x58, + 0x77, 0x2f, 0xe5, 0xc1, 0x92, 0x17, 0x27, 0xe5, 0xa5, 0x84, 0x46, 0xec, 0x78, 0x8d, 0x7b, 0x50, + 0xbc, 0x58, 0xc4, 0x1e, 0x7e, 0x44, 0xbb, 0xb2, 0xcf, 0x08, 0x81, 0x59, 0x8f, 0x76, 0x1d, 0x71, + 0x3c, 0x35, 0xfe, 0x6d, 0xb4, 0x61, 0x6d, 0x72, 0x1a, 0x02, 0xda, 0xe9, 0xce, 0x40, 0xc5, 0x17, + 0x9e, 0xc4, 0x0d, 0x58, 0xb6, 0x9d, 0xe6, 0xe1, 0x76, 0xa5, 0xda, 0x77, 0xda, 0xee, 0x53, 0xb9, + 0x35, 0xef, 0x40, 0x2e, 0x39, 0x8c, 0x25, 0x6f, 0xc1, 0xf5, 0x06, 0x1f, 0xaf, 0xf7, 0xf8, 0x04, + 0x32, 0x67, 0x1b, 0xb1, 0x60, 0xc3, 0x86, 0x3c, 0xf6, 0x95, 0x3d, 0x0c, 0x1c, 0xff, 0x80, 0x61, + 0x7b, 0xe1, 0x72, 0x6f, 0xc1, 0x75, 0xec, 0xb3, 0x7a, 0x63, 0x3c, 0xcf, 0x35, 0xb2, 0xb5, 0x2c, + 0x8d, 0xe5, 0x18, 0xef, 0xc3, 0xaa, 0x5a, 0x03, 0x41, 0xde, 0x80, 0x25, 0x29, 0xe2, 0xf3, 0x19, + 0x24, 0x91, 0xd2, 0x22, 0xdc, 0xd8, 0x0b, 0x51, 0xc4, 0xc0, 0x01, 0xe3, 0x72, 0x12, 0x25, 0xa5, + 0xca, 0x83, 0x10, 0xe6, 0x9c, 0x4a, 0xb4, 0x2b, 0xd3, 0x57, 0x74, 0x17, 0x0a, 0xf1, 0x9b, 0x14, + 0xae, 0x6e, 0x7f, 0x4f, 0xd2, 0x2c, 0xc1, 0x8c, 0xdb, 0xe2, 0xb9, 0xd7, 0x6a, 0x33, 0x6e, 0xcb, + 0x68, 0x61, 0xeb, 0xa8, 0x32, 0xb0, 0xf2, 0x2e, 0xbc, 0x82, 0x27, 0x59, 0x4f, 0x7b, 0xc9, 0x97, + 0x68, 0x42, 0xce, 0x78, 0x08, 0xaf, 0xc6, 0xab, 0xec, 0x7b, 0x6d, 0xf6, 0x1f, 0x9e, 0x0e, 0xa3, + 0x0a, 0x2b, 0x17, 0xe5, 0x90, 0x76, 0x07, 0x66, 0x5d, 0xaf, 0xcd, 0xb0, 0x5b, 0xd7, 0x94, 0xf7, + 0xd8, 0xa6, 0xbe, 0x6c, 0xd3, 0x1a, 0x8f, 0xae, 0xfc, 0x93, 0x85, 0xff, 0x71, 0x49, 0xf2, 0x95, + 0x06, 0xf2, 0x31, 0xf1, 0xc9, 0x86, 0x32, 0x5d, 0x65, 0x02, 0xfa, 0x66, 0x9a, 0x50, 0xc1, 0x68, + 0x6c, 0x3e, 0xfb, 0xeb, 0x87, 0x4d, 0xed, 0x8b, 0x5f, 0xff, 0xfc, 0x66, 0xa6, 0x48, 0x6e, 0x5a, + 0x4a, 0xbb, 0x92, 0x08, 0xdf, 0x6a, 0x30, 0x8f, 0x02, 0xa4, 0x34, 0xb5, 0x86, 0xa4, 0xd9, 0x48, + 0x11, 0x89, 0x30, 0x3b, 0x11, 0xcc, 0x06, 0x59, 0xbf, 0x14, 0xc6, 0x3a, 0xc2, 0x13, 0x18, 0x91, + 0x1f, 0x35, 0x20, 0x17, 0x7b, 0x86, 0x6c, 0x4f, 0xad, 0x7b, 0xb1, 0x27, 0xf5, 0x9d, 0xab, 0x25, + 0x5d, 0x81, 0x3b, 0xbc, 0x30, 0x75, 0xb7, 0x65, 0x1d, 0xb9, 0xad, 0x11, 0xf9, 0x52, 0x83, 0x39, + 0xf1, 0x8c, 0x93, 0xf5, 0xc9, 0x65, 0x13, 0x9e, 0xa1, 0x97, 0xa6, 0x07, 0x22, 0x53, 0x29, 0x62, + 0xba, 0x49, 0xf2, 0x4a, 0x26, 0xe1, 0x1a, 0xe4, 0x7b, 0x0d, 0x92, 0xef, 0xa5, 0x4f, 0xac, 0xc9, + 0x65, 0x94, 0xde, 0xa2, 0xdf, 0x4d, 0x9f, 0x80, 0x7c, 0x5b, 0x11, 0xdf, 0x6d, 0xf2, 0xba, 0x92, + 0xaf, 0xcb, 0x33, 0xeb, 0x61, 0xff, 0xfd, 0xac, 0xc1, 0xb2, 0xc2, 0x20, 0xc8, 0x4e, 0xca, 0xe2, + 0x09, 0x1b, 0xd2, 0xef, 0x5d, 0x31, 0x0b, 0xb9, 0xdf, 0x8a, 0xb8, 0xcb, 0xe4, 0xcd, 0x34, 0xdc, + 0xd6, 0xd1, 0xd8, 0xe2, 0x46, 0xe3, 0xeb, 0x9c, 0x8d, 0xbb, 0xcc, 0x84, 0x3b, 0xa4, 0xf0, 0xa7, + 0x09, 0x77, 0x48, 0x65, 0x59, 0x69, 0xce, 0x5d, 0xb8, 0xd7, 0xf8, 0xde, 0xe4, 0x54, 0xa6, 0x43, + 0xd4, 0x87, 0x79, 0x89, 0xc7, 0xe9, 0x5b, 0x57, 0xc8, 0x48, 0xbf, 0x8f, 0x82, 0x33, 0xbc, 0xe9, + 0xc2, 0x6c, 0x46, 0xe4, 0xa7, 0x88, 0x3b, 0xe1, 0x4f, 0x97, 0x73, 0xab, 0x0c, 0xf1, 0x72, 0x6e, + 0xa5, 0xf9, 0x19, 0xf7, 0x23, 0x6e, 0x93, 0xdc, 0x49, 0xc5, 0x2d, 0xbc, 0x76, 0x44, 0xbe, 0xd3, + 0x60, 0x31, 0xe6, 0x13, 0xe4, 0xce, 0xd4, 0xc7, 0x26, 0xe6, 0x4e, 0x7a, 0x39, 0x65, 0x74, 0xfa, + 0xfd, 0x95, 0x56, 0x3a, 0xb6, 0x9d, 0xe8, 0x3d, 0xb5, 0x1f, 0x3c, 0x3f, 0x2d, 0x68, 0x2f, 0x4f, + 0x0b, 0xda, 0x1f, 0xa7, 0x05, 0xed, 0xeb, 0xb3, 0x42, 0xe6, 0xe5, 0x59, 0x21, 0xf3, 0xdb, 0x59, + 0x21, 0xf3, 0xc9, 0x46, 0xc7, 0x0d, 0x0e, 0x07, 0x0d, 0xb3, 0xc9, 0xba, 0x52, 0x50, 0xfc, 0x29, + 0xfb, 0xad, 0xcf, 0xac, 0xa7, 0x42, 0x3d, 0x18, 0xf6, 0x1c, 0xbf, 0x31, 0xc7, 0xff, 0x27, 0xdb, + 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, 0x49, 0x22, 0x49, 0xcc, 0xb2, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -977,6 +1073,8 @@ type QueryClient interface { // // Since: cosmos-sdk 0.46 ModuleAccounts(ctx context.Context, in *QueryModuleAccountsRequest, opts ...grpc.CallOption) (*QueryModuleAccountsResponse, error) + // ModuleAccountByName returns the module account info by module name + ModuleAccountByName(ctx context.Context, in *QueryModuleAccountByNameRequest, opts ...grpc.CallOption) (*QueryModuleAccountByNameResponse, error) // Bech32Prefix queries bech32Prefix // // Since: cosmos-sdk 0.46 @@ -1048,6 +1146,15 @@ func (c *queryClient) ModuleAccounts(ctx context.Context, in *QueryModuleAccount return out, nil } +func (c *queryClient) ModuleAccountByName(ctx context.Context, in *QueryModuleAccountByNameRequest, opts ...grpc.CallOption) (*QueryModuleAccountByNameResponse, error) { + out := new(QueryModuleAccountByNameResponse) + err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/ModuleAccountByName", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) Bech32Prefix(ctx context.Context, in *Bech32PrefixRequest, opts ...grpc.CallOption) (*Bech32PrefixResponse, error) { out := new(Bech32PrefixResponse) err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/Bech32Prefix", in, out, opts...) @@ -1105,6 +1212,8 @@ type QueryServer interface { // // Since: cosmos-sdk 0.46 ModuleAccounts(context.Context, *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) + // ModuleAccountByName returns the module account info by module name + ModuleAccountByName(context.Context, *QueryModuleAccountByNameRequest) (*QueryModuleAccountByNameResponse, error) // Bech32Prefix queries bech32Prefix // // Since: cosmos-sdk 0.46 @@ -1142,6 +1251,9 @@ func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsReq func (*UnimplementedQueryServer) ModuleAccounts(ctx context.Context, req *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ModuleAccounts not implemented") } +func (*UnimplementedQueryServer) ModuleAccountByName(ctx context.Context, req *QueryModuleAccountByNameRequest) (*QueryModuleAccountByNameResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ModuleAccountByName not implemented") +} func (*UnimplementedQueryServer) Bech32Prefix(ctx context.Context, req *Bech32PrefixRequest) (*Bech32PrefixResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Bech32Prefix not implemented") } @@ -1249,6 +1361,24 @@ func _Query_ModuleAccounts_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _Query_ModuleAccountByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryModuleAccountByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ModuleAccountByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.auth.v1beta1.Query/ModuleAccountByName", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ModuleAccountByName(ctx, req.(*QueryModuleAccountByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_Bech32Prefix_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Bech32PrefixRequest) if err := dec(in); err != nil { @@ -1345,6 +1475,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "ModuleAccounts", Handler: _Query_ModuleAccounts_Handler, }, + { + MethodName: "ModuleAccountByName", + Handler: _Query_ModuleAccountByName_Handler, + }, { MethodName: "Bech32Prefix", Handler: _Query_Bech32Prefix_Handler, @@ -1480,7 +1614,7 @@ func (m *QueryAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryModuleAccountsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryAccountResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1490,20 +1624,32 @@ func (m *QueryModuleAccountsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryModuleAccountsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAccountResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryModuleAccountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if m.Account != nil { + { + size, err := m.Account.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 } -func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1513,30 +1659,20 @@ func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryParamsRequest) 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 = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *QueryAccountResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1546,32 +1682,30 @@ func (m *QueryAccountResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryAccountResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Account != nil { - { - size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryModuleAccountsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1581,12 +1715,12 @@ func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryModuleAccountsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryModuleAccountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1631,6 +1765,71 @@ func (m *QueryModuleAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, er return len(dAtA) - i, nil } +func (m *QueryModuleAccountByNameRequest) 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 *QueryModuleAccountByNameRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryModuleAccountByNameRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryModuleAccountByNameResponse) 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 *QueryModuleAccountByNameResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryModuleAccountByNameResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Account != nil { + { + size, err := m.Account.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 +} + func (m *Bech32PrefixRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1983,40 +2182,40 @@ func (m *QueryAccountRequest) Size() (n int) { return n } -func (m *QueryModuleAccountsRequest) Size() (n int) { +func (m *QueryAccountResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l + if m.Account != nil { + l = m.Account.Size() + n += 1 + l + sovQuery(uint64(l)) + } return n } -func (m *QueryParamsResponse) Size() (n int) { +func (m *QueryParamsRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) return n } -func (m *QueryAccountResponse) Size() (n int) { +func (m *QueryParamsResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Account != nil { - l = m.Account.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) return n } -func (m *QueryParamsRequest) Size() (n int) { +func (m *QueryModuleAccountsRequest) Size() (n int) { if m == nil { return 0 } @@ -2040,6 +2239,32 @@ func (m *QueryModuleAccountsResponse) Size() (n int) { return n } +func (m *QueryModuleAccountByNameRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryModuleAccountByNameResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Account != nil { + l = m.Account.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func (m *Bech32PrefixRequest) Size() (n int) { if m == nil { return 0 @@ -2459,7 +2684,7 @@ func (m *QueryAccountRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryModuleAccountsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAccountResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2482,10 +2707,96 @@ func (m *QueryModuleAccountsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryModuleAccountsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAccountResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryModuleAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", 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.Account == nil { + m.Account = &types.Any{} + } + if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsRequest) 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 ErrIntOverflowQuery + } + 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: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2592,7 +2903,7 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAccountResponse) Unmarshal(dAtA []byte) error { +func (m *QueryModuleAccountsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2615,15 +2926,65 @@ func (m *QueryAccountResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAccountResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryModuleAccountsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryModuleAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryModuleAccountsResponse) 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 ErrIntOverflowQuery + } + 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: QueryModuleAccountsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryModuleAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2650,10 +3011,8 @@ func (m *QueryAccountResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Account == nil { - m.Account = &types.Any{} - } - if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Accounts = append(m.Accounts, &types.Any{}) + if err := m.Accounts[len(m.Accounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2678,7 +3037,7 @@ func (m *QueryAccountResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryModuleAccountByNameRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2701,12 +3060,44 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryModuleAccountByNameRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryModuleAccountByNameRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", 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.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -2728,7 +3119,7 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryModuleAccountsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryModuleAccountByNameResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2751,15 +3142,15 @@ func (m *QueryModuleAccountsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryModuleAccountsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryModuleAccountByNameResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryModuleAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryModuleAccountByNameResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2786,8 +3177,10 @@ func (m *QueryModuleAccountsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Accounts = append(m.Accounts, &types.Any{}) - if err := m.Accounts[len(m.Accounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Account == nil { + m.Account = &types.Any{} + } + if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/auth/types/query.pb.gw.go b/x/auth/types/query.pb.gw.go index 5c1ff90d4753..2ba4a2871084 100644 --- a/x/auth/types/query.pb.gw.go +++ b/x/auth/types/query.pb.gw.go @@ -213,6 +213,60 @@ func local_request_Query_ModuleAccounts_0(ctx context.Context, marshaler runtime } +func request_Query_ModuleAccountByName_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryModuleAccountByNameRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.ModuleAccountByName(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ModuleAccountByName_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryModuleAccountByNameRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.ModuleAccountByName(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_Bech32Prefix_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq Bech32PrefixRequest var metadata runtime.ServerMetadata @@ -514,6 +568,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_ModuleAccountByName_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ModuleAccountByName_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ModuleAccountByName_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Bech32Prefix_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -747,6 +824,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_ModuleAccountByName_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ModuleAccountByName_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ModuleAccountByName_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Bech32Prefix_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -841,6 +938,8 @@ var ( pattern_Query_ModuleAccounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "auth", "v1beta1", "module_accounts"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_ModuleAccountByName_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "auth", "v1beta1", "module_accounts", "name"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Bech32Prefix_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "auth", "v1beta1", "bech32"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_AddressBytesToString_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "auth", "v1beta1", "bech32", "address_bytes"}, "", runtime.AssumeColonVerbOpt(false))) @@ -861,6 +960,8 @@ var ( forward_Query_ModuleAccounts_0 = runtime.ForwardResponseMessage + forward_Query_ModuleAccountByName_0 = runtime.ForwardResponseMessage + forward_Query_Bech32Prefix_0 = runtime.ForwardResponseMessage forward_Query_AddressBytesToString_0 = runtime.ForwardResponseMessage From b0e0b3e5dc4a3177bad24eddaa5e630957644a4a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 22 Oct 2022 23:28:36 +0200 Subject: [PATCH 07/26] build(deps): Bump tailwindcss from 3.1.8 to 3.2.0 in /docs (#13615) * build(deps): Bump tailwindcss from 3.1.8 to 3.2.0 in /docs Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.1.8 to 3.2.0. - [Release notes](https://github.com/tailwindlabs/tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.1.8...v3.2.0) --- updated-dependencies: - dependency-name: tailwindcss dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * build(deps): Bump tailwindcss from 3.1.8 to 3.2.0 in /docs for all modules Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> --- docs/package-lock.json | 42 +++++++++++++++++++++--------------------- docs/package.json | 2 +- simapp/go.sum | 4 ++-- tests/go.sum | 4 ++-- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index fd4cfcca6175..85634fbdb355 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -21,7 +21,7 @@ "prism-react-renderer": "^1.3.5", "react": "^17.0.2", "react-dom": "^17.0.2", - "tailwindcss": "^3.1.8" + "tailwindcss": "^3.2.0" }, "devDependencies": { "@docusaurus/module-type-aliases": "2.1.0" @@ -8943,11 +8943,11 @@ } }, "node_modules/postcss-nested": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-5.0.6.tgz", - "integrity": "sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.0.tgz", + "integrity": "sha512-0DkamqrPcmkBDsLn+vQDIrtkSbNkv5AD/M322ySo9kqFkCIYklym2xEmWkwo+Y3/qZo34tzEPNUw4y7yMCdv5w==", "dependencies": { - "postcss-selector-parser": "^6.0.6" + "postcss-selector-parser": "^6.0.10" }, "engines": { "node": ">=12.0" @@ -11157,9 +11157,9 @@ } }, "node_modules/tailwindcss": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.1.8.tgz", - "integrity": "sha512-YSneUCZSFDYMwk+TGq8qYFdCA3yfBRdBlS7txSq0LUmzyeqRe3a8fBQzbz9M3WS/iFT4BNf/nmw9mEzrnSaC0g==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.2.0.tgz", + "integrity": "sha512-ARh/W0uH5UlWIC2nn02V0+5fyF0k6qZliyt4QYic2upOhPUE/Spu1EURNc9txJ3+4j8OEmdigqfDpw4d2tA4vA==", "dependencies": { "arg": "^5.0.2", "chokidar": "^3.5.3", @@ -11167,18 +11167,18 @@ "detective": "^5.2.1", "didyoumean": "^1.2.2", "dlv": "^1.1.3", - "fast-glob": "^3.2.11", + "fast-glob": "^3.2.12", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", "lilconfig": "^2.0.6", "normalize-path": "^3.0.0", "object-hash": "^3.0.0", "picocolors": "^1.0.0", - "postcss": "^8.4.14", + "postcss": "^8.4.17", "postcss-import": "^14.1.0", "postcss-js": "^4.0.0", "postcss-load-config": "^3.1.4", - "postcss-nested": "5.0.6", + "postcss-nested": "6.0.0", "postcss-selector-parser": "^6.0.10", "postcss-value-parser": "^4.2.0", "quick-lru": "^5.1.1", @@ -19140,11 +19140,11 @@ } }, "postcss-nested": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-5.0.6.tgz", - "integrity": "sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.0.tgz", + "integrity": "sha512-0DkamqrPcmkBDsLn+vQDIrtkSbNkv5AD/M322ySo9kqFkCIYklym2xEmWkwo+Y3/qZo34tzEPNUw4y7yMCdv5w==", "requires": { - "postcss-selector-parser": "^6.0.6" + "postcss-selector-parser": "^6.0.10" } }, "postcss-normalize-charset": { @@ -20770,9 +20770,9 @@ } }, "tailwindcss": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.1.8.tgz", - "integrity": "sha512-YSneUCZSFDYMwk+TGq8qYFdCA3yfBRdBlS7txSq0LUmzyeqRe3a8fBQzbz9M3WS/iFT4BNf/nmw9mEzrnSaC0g==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.2.0.tgz", + "integrity": "sha512-ARh/W0uH5UlWIC2nn02V0+5fyF0k6qZliyt4QYic2upOhPUE/Spu1EURNc9txJ3+4j8OEmdigqfDpw4d2tA4vA==", "requires": { "arg": "^5.0.2", "chokidar": "^3.5.3", @@ -20780,18 +20780,18 @@ "detective": "^5.2.1", "didyoumean": "^1.2.2", "dlv": "^1.1.3", - "fast-glob": "^3.2.11", + "fast-glob": "^3.2.12", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", "lilconfig": "^2.0.6", "normalize-path": "^3.0.0", "object-hash": "^3.0.0", "picocolors": "^1.0.0", - "postcss": "^8.4.14", + "postcss": "^8.4.17", "postcss-import": "^14.1.0", "postcss-js": "^4.0.0", "postcss-load-config": "^3.1.4", - "postcss-nested": "5.0.6", + "postcss-nested": "6.0.0", "postcss-selector-parser": "^6.0.10", "postcss-value-parser": "^4.2.0", "quick-lru": "^5.1.1", diff --git a/docs/package.json b/docs/package.json index f14b84becc48..ac8a04d211d0 100644 --- a/docs/package.json +++ b/docs/package.json @@ -31,7 +31,7 @@ "prism-react-renderer": "^1.3.5", "react": "^17.0.2", "react-dom": "^17.0.2", - "tailwindcss": "^3.1.8" + "tailwindcss": "^3.2.0" }, "devDependencies": { "@docusaurus/module-type-aliases": "2.1.0" diff --git a/simapp/go.sum b/simapp/go.sum index 7ee3572850cc..73e9779f9cea 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -612,16 +612,16 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/notional-labs/gateway v1.1.1-0.20220417180718-8e60e17a098d h1:ojbVlSwN0ZgOpE8jOnFQ6iNm247PwFTykE5qe9xITqw= github.com/notional-labs/gateway v1.1.1-0.20220417180718-8e60e17a098d/go.mod h1:8W5G7hGZRVlsdVjoP4lh/nKiL23VhQFJZrImu0uoBDY= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= 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/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= 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.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= 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= diff --git a/tests/go.sum b/tests/go.sum index 4c99da67f992..7033ea35cda5 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -614,16 +614,16 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/notional-labs/gateway v1.1.1-0.20220417180718-8e60e17a098d h1:ojbVlSwN0ZgOpE8jOnFQ6iNm247PwFTykE5qe9xITqw= github.com/notional-labs/gateway v1.1.1-0.20220417180718-8e60e17a098d/go.mod h1:8W5G7hGZRVlsdVjoP4lh/nKiL23VhQFJZrImu0uoBDY= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= 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/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= 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.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= 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= From c484a0dc0f5ca0facb843cd8b1369f0ee48222c1 Mon Sep 17 00:00:00 2001 From: Jim Larson <32469398+JimLarson@users.noreply.github.com> Date: Sat, 22 Oct 2022 17:52:06 -0700 Subject: [PATCH 08/26] docs: Textual ADR minor fixes (#13608) ## Description Refs: #11970 Minor fixups to architecture docs. No major semantic changes are intended. --- ### Author Checklist I have... - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [x] added `!` to the type prefix if API or client breaking change - [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting)) - [x] provided a link to the relevant issue or specification - [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules) - [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing) - [x] added a changelog entry to `CHANGELOG.md` - [x] included comments for [documenting Go code](https://blog.golang.org/godoc) - [x] updated the relevant documentation or specification - [x] reviewed "Files changed" and left comments if necessary - [x] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable) --- docs/architecture/adr-050-sign-mode-textual-annex2.md | 8 ++++---- docs/architecture/adr-050-sign-mode-textual.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/architecture/adr-050-sign-mode-textual-annex2.md b/docs/architecture/adr-050-sign-mode-textual-annex2.md index ad0d5e6fd85f..d4037a50e4ba 100644 --- a/docs/architecture/adr-050-sign-mode-textual-annex2.md +++ b/docs/architecture/adr-050-sign-mode-textual-annex2.md @@ -16,7 +16,7 @@ This annex provides normative guidance on how devices should render a ## Context `SIGN_MODE_TEXTUAL` allows a legible version of a transaction to be signed -on a hardware security devices, such as a Ledger. Early versions of the +on a hardware security device, such as a Ledger. Early versions of the design rendered transactions directly to lines of ASCII text, but this proved awkward from its in-band signaling, and for the need to display Unicode text within the transaction. @@ -53,13 +53,13 @@ sequence, with user controls for going forward or backward a line. - Expert mode screens are only presented if the device is in expert mode. - Each line of the screen starts with a number of `>` characters equal -to the screen's indetation level, followed by a `+` character if this +to the screen's indentation level, followed by a `+` character if this isn't the first line of the screen, followed by a space if either a `>` or a `+` has been emitted, or if this header is followed by a `>`, `+`, or space. -- If the line ends with whitespace or an `@` character, and `@` character -is appended to the line. +- If the line ends with whitespace or an `@` character, an additional `@` +character is appended to the line. - The following ASCII control characters or backslash (`\`) are converted to a backslash followed by a letter code, in the manner of string literals diff --git a/docs/architecture/adr-050-sign-mode-textual.md b/docs/architecture/adr-050-sign-mode-textual.md index 5e769e5f0d93..b89ec2f7cf25 100644 --- a/docs/architecture/adr-050-sign-mode-textual.md +++ b/docs/architecture/adr-050-sign-mode-textual.md @@ -229,7 +229,7 @@ When this option is set on a `Msg`, a registered function will transform the `Ms The `` is a string convention chosen by the application developer and is used to identify the custom `Msg` renderer. For example, the documentation or specification of this custom algorithm can reference this identifier. This identifier CAN have a versioned suffix (e.g. `_v1`) to adapt for future changes (which would be consensus-breaking). We also recommend adding Protobuf comments to describe in human language the custom logic used. -Moreover, the renderer must provide 2 functions: one for formatting from Protobuf to string, and one for parsing string to Protobuf. These 2 functions are provided by the application developer. To satisfy point #1, these 2 functions MUST be bijective with each other. Bijectivity of these 2 functions will not be checked by the SDK at runtime. However, we strongly recommend the application developer to include a comprehensive suite in their app repo to test bijectivity, as to not introduce security bugs. +Moreover, the renderer must provide 2 functions: one for formatting from Protobuf to string, and one for parsing string to Protobuf. These 2 functions are provided by the application developer. To satisfy point #1, the parse function MUST be the inverse of the formatting function. This property will not be checked by the SDK at runtime. However, we strongly recommend the application developer to include a comprehensive suite in their app repo to test invertibility, as to not introduce security bugs. ### Require signing over the `TxBody` and `AuthInfo` raw bytes @@ -244,7 +244,7 @@ where: - `HEX` is the hexadecimal representation of the bytes, all in capital letters, no `0x` prefix, - and `len()` is encoded as a Big-Endian uint64. -This is to prevent transaction hash malleability. The point #1 about bijectivity assures that transaction `body` and `auth_info` values are not malleable, but the transaction hash still might be malleable with point #1 only, because the SIGN_MODE_TEXTUAL strings don't follow the byte ordering defined in `body_bytes` and `auth_info_bytes`. Without this hash, a malicious validator or exchange could intercept a transaction, modify its transaction hash _after_ the user signed it using SIGN_MODE_TEXTUAL (by tweaking the byte ordering inside `body_bytes` or `auth_info_bytes`), and then submit it to Tendermint. +This is to prevent transaction hash malleability. The point #1 about invertiblity assures that transaction `body` and `auth_info` values are not malleable, but the transaction hash still might be malleable with point #1 only, because the SIGN_MODE_TEXTUAL strings don't follow the byte ordering defined in `body_bytes` and `auth_info_bytes`. Without this hash, a malicious validator or exchange could intercept a transaction, modify its transaction hash _after_ the user signed it using SIGN_MODE_TEXTUAL (by tweaking the byte ordering inside `body_bytes` or `auth_info_bytes`), and then submit it to Tendermint. By including this hash in the SIGN_MODE_TEXTUAL signing payload, we keep the same level of guarantees as [SIGN_MODE_DIRECT](./adr-020-protobuf-transaction-encoding.md). From 4cf2911f166a407ab4410a4bc6fa977d1c41716a Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Sun, 23 Oct 2022 02:02:59 -0400 Subject: [PATCH 09/26] feat(core): add AppModule tag interface (#13607) --- core/appmodule/module.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 core/appmodule/module.go diff --git a/core/appmodule/module.go b/core/appmodule/module.go new file mode 100644 index 000000000000..70ba46b0b4ac --- /dev/null +++ b/core/appmodule/module.go @@ -0,0 +1,14 @@ +package appmodule + +import "cosmossdk.io/depinject" + +// AppModule is a tag interface for app module implementations to use as a basis +// for extension interfaces. It provides no functionality itself, but is the +// type that all valid app modules should provide so that they can be identified +// by other modules (usually via depinject) as app modules. +type AppModule interface { + depinject.OnePerModuleType + + // IsAppModule is a dummy method to tag a struct as implementing an AppModule. + IsAppModule() +} From 3b62a95ad0d981a59f719b6b2f48184fc12feb49 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Mon, 24 Oct 2022 12:55:58 +0200 Subject: [PATCH 10/26] ci: fix can't release cosmovisor (#13618) * ci: fix can't release cosmovisor * fix tests * update date * update zip --- .github/workflows/cosmovisor-release.yml | 2 +- tools/cosmovisor/CHANGELOG.md | 2 +- tools/cosmovisor/cmd/cosmovisor/help.go | 2 +- tools/cosmovisor/cmd/cosmovisor/help_test.go | 2 +- .../download/cosmovisor/genesis/bin/autod | 2 +- .../testdata/repo/chain2-zip_bin/autod | 4 ++-- .../testdata/repo/chain2-zip_bin/autod.zip | Bin 562 -> 565 bytes .../testdata/repo/ref_to_chain3-zip_dir.json | 2 +- tools/cosmovisor/upgrade_test.go | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cosmovisor-release.yml b/.github/workflows/cosmovisor-release.yml index 6160078140e3..5405ded49271 100644 --- a/.github/workflows/cosmovisor-release.yml +++ b/.github/workflows/cosmovisor-release.yml @@ -34,7 +34,7 @@ jobs: # stick to version v0.179.0(https://github.com/cosmos/cosmos-sdk/issues/11125) version: v0.179.0 args: release --rm-dist --skip-validate - workdir: cosmovisor + workdir: tools/cosmovisor env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GORELEASER_CURRENT_TAG: cosmovisor/${{ env.RELEASE_VERSION }} diff --git a/tools/cosmovisor/CHANGELOG.md b/tools/cosmovisor/CHANGELOG.md index d5e0a9c81e5e..e4249406658b 100644 --- a/tools/cosmovisor/CHANGELOG.md +++ b/tools/cosmovisor/CHANGELOG.md @@ -36,7 +36,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] -## v1.4.0 2022-10-21 +## v1.4.0 2022-10-23 ### API Breaking Changes diff --git a/tools/cosmovisor/cmd/cosmovisor/help.go b/tools/cosmovisor/cmd/cosmovisor/help.go index cc4f38c50218..41a873d9fdd9 100644 --- a/tools/cosmovisor/cmd/cosmovisor/help.go +++ b/tools/cosmovisor/cmd/cosmovisor/help.go @@ -18,7 +18,7 @@ the proposal. Cosmovisor interprets that data to perform an update: switch a cur and restart the App. Configuration of Cosmovisor is done through environment variables, which are -documented in: https://github.com/cosmos/cosmos-sdk/tree/main/cosmovisor/README.md`, +documented in: https://github.com/cosmos/cosmos-sdk/tree/main/tools/cosmovisor/README.md`, cosmovisor.EnvName, cosmovisor.EnvHome, ) } diff --git a/tools/cosmovisor/cmd/cosmovisor/help_test.go b/tools/cosmovisor/cmd/cosmovisor/help_test.go index 1b66b226cdfc..4b2075d6fef6 100644 --- a/tools/cosmovisor/cmd/cosmovisor/help_test.go +++ b/tools/cosmovisor/cmd/cosmovisor/help_test.go @@ -92,7 +92,7 @@ func (s *HelpTestSuite) TestGetHelpText() { expectedPieces := []string{ "Cosmovisor", cosmovisor.EnvName, cosmovisor.EnvHome, - "https://github.com/cosmos/cosmos-sdk/tree/main/cosmovisor/README.md", + "https://github.com/cosmos/cosmos-sdk/tree/main/tools/cosmovisor/README.md", } actual := GetHelpText() diff --git a/tools/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod b/tools/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod index 89cb77365a14..5bb4777b4384 100755 --- a/tools/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod +++ b/tools/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod @@ -6,7 +6,7 @@ echo 'ERROR: UPGRADE "chain2" NEEDED at height: 49: zip_binary' # create upgrade info # this info contains directly information about binaries (in chain2->chain3 update we test with info containing a link to the file with an address for the new chain binary) -echo '{"name":"chain2","height":49,"info":"{\"binaries\":{\"linux/amd64\":\"https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip?checksum=sha256:b30cf0b1a3e46ac9587cc4d7b102eb796e39e3e0dfa3f8ca6e163fc1b1e913ca\"}}"}' >$3 +echo '{"name":"chain2","height":49,"info":"{\"binaries\":{\"linux/amd64\":\"https://github.com/cosmos/cosmos-sdk/raw/main/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip?checksum=sha256:b30cf0b1a3e46ac9587cc4d7b102eb796e39e3e0dfa3f8ca6e163fc1b1e913ca\"}}"}' >$3 sleep 0.1 echo Never should be printed!!! diff --git a/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod b/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod index 5bc99c552123..06520737da9b 100755 --- a/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod +++ b/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod @@ -6,8 +6,8 @@ echo Args: $@ echo 'ERROR: UPGRADE "chain3" NEEDED at height: 936: ref_to_chain3-zip_dir.json module=main' # this update info doesn't contain binaries, instead it is a reference for further download instructions. -# echo '{"name":"chain3","height":936,"info":"{\"binaries\":{\"linux/amd64\":\"https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json\"}}"}' > $3 -echo '{"name":"chain3","height":936,"info":"https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json"}' >$3 +# echo '{"name":"chain3","height":936,"info":"{\"binaries\":{\"linux/amd64\":\"https://github.com/cosmos/cosmos-sdk/raw/main/tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json\"}}"}' > $3 +echo '{"name":"chain3","height":936,"info":"https://github.com/cosmos/cosmos-sdk/raw/main/tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json"}' >$3 sleep 1 echo 'Do not print' diff --git a/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip b/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip index 68d33a538c5b54cf0df7344fcea72994610f0159..92c6486df1a362eeebb05c3a2fee9fcb12a13abf 100644 GIT binary patch literal 565 zcmWIWW@Zs#-~hr&3&KMgpkOZ(0|P6A0z+bHNq$Ob2rmP>NmFPt43}1LGcdBeU}j(d z6MHB5XFoO&IQssdNbu4Jx=RFer#bQN&bc|`-YuaQx&k59GAk#Vx=ES;b>3Hfys+v` zqJFi|rE25P)y-<^zfQ8w&6$>%%K0zqF;k3_@XFTm>!lIR5uZ*+a$iCDv3r8eDMax0m`fuWXUBOU}7v&9PgSeV5zAeS2eUoZj^BreIdIN0&jU@=mRmnpJEpg7#srvfp`$7EO-*vi{bVuUGvmBQ#In zS?ct8_TM;obYh`nd;Jwxaf|bIi~-*4937T*nU#zT44@bb@MdHZ lVMfFzvK%NjVc=~eh(%P~26(fwffO?WVK9(B1GI{P0RSfw*Bbx; literal 562 zcmWIWW@Zs#-~hs388br|pkN~t0|P6A0z+bHNq$Ob2rmOWM`KzN43}1LGcdBeU}j(d z6I&-aW=k6iw7&nXt+pvKdV{XebO&*vtXE67n@JQIOQe=xo3!?-&ZV3?YCra;Uz;sc z{bHf|!b*SR`_d*mFZt`eNZHJz?fv1dl=uU-SsuE3cC0%rbtK`@{J{95wOR?kbZ0v# zxFuvu_;Iw`8Ag2WNm$S?XJ`7vcCL$i$BmkKyk!?>-K+kfCv&{4a_7xIw?sbt_>jCg zYWjjziT{EQp5GKRJ$u44vAg$*7~`jJKYAhS_!jBd;)l1d>gn-yGHnU@F84kv@RQGn z8@pI)!=)FNEL2><8GJ%gi_4~E&yk`TX-evD!Oh7N%+qEx2|Bl42oQOqp}A;}J*$7S z@0*S5Zv=X9&ooi13_ZAIMOQzEvFW7MPAAf{90Wd=uC{xY7piD})AfJ!>}~u0Dz&cN zbS747%RTFDe=jdu6c#=u%Ip1co2%}!XFd5HkKfwtEn=FS#F<@kr0>gp@vWiHH(Na~ z;J=*uP5;IJxo@0Q10p|l$j0oyy!Pd%@?9^Op5K%X@Mh;w>ag)IV`N|eMOT0~Ba;X- jA}W#PKv4+;e;Yw8q9QiHo0Scum=Oqrf%HkBRSXOO3+LN) diff --git a/tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json b/tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json index 7baa216b9633..8e18b9a9c262 100644 --- a/tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json +++ b/tools/cosmovisor/testdata/repo/ref_to_chain3-zip_dir.json @@ -1,5 +1,5 @@ { "binaries": { - "linux/amd64": "https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip?checksum=sha256:8951f52a0aea8617de0ae459a20daf704c29d259c425e60d520e363df0f166b4" + "linux/amd64": "https://github.com/cosmos/cosmos-sdk/raw/main/tools/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip?checksum=sha256:8951f52a0aea8617de0ae459a20daf704c29d259c425e60d520e363df0f166b4" } } diff --git a/tools/cosmovisor/upgrade_test.go b/tools/cosmovisor/upgrade_test.go index 7187ce7bd5ab..9bac7b013410 100644 --- a/tools/cosmovisor/upgrade_test.go +++ b/tools/cosmovisor/upgrade_test.go @@ -155,7 +155,7 @@ func (s *upgradeTestSuite) TestGetDownloadURL() { }, "follow reference": { info: ref, - url: "https://github.com/cosmos/cosmos-sdk/raw/main/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip?checksum=sha256:8951f52a0aea8617de0ae459a20daf704c29d259c425e60d520e363df0f166b4", + url: "https://github.com/cosmos/cosmos-sdk/raw/main/tools/cosmovisor/testdata/repo/chain3-zip_dir/autod.zip?checksum=sha256:8951f52a0aea8617de0ae459a20daf704c29d259c425e60d520e363df0f166b4", }, "malformated reference target": { info: badref, From 04db139e8ab6c6b8aade44898aa1bbcda6b24207 Mon Sep 17 00:00:00 2001 From: Marko Date: Mon, 24 Oct 2022 14:02:17 +0200 Subject: [PATCH 11/26] chore: move pruning to store (#13609) * move pruning to store * add changelog entry Co-authored-by: Julien Robert --- CHANGELOG.md | 1 + baseapp/abci_test.go | 2 +- baseapp/baseapp_test.go | 2 +- baseapp/deliver_tx_test.go | 2 +- baseapp/options.go | 2 +- client/pruning/main.go | 2 +- server/config/config.go | 2 +- server/mock/store.go | 2 +- server/pruning.go | 2 +- server/pruning_test.go | 2 +- server/start.go | 2 +- simapp/test_helpers.go | 2 +- store/iavl/store.go | 2 +- store/mem/store.go | 2 +- {pruning => store/pruning}/README.md | 0 {pruning => store/pruning}/export_test.go | 0 {pruning => store/pruning}/manager.go | 2 +- {pruning => store/pruning}/manager_test.go | 6 +++--- {pruning => store/pruning}/mock/db_mock.go | 0 {pruning => store/pruning}/types/options.go | 0 {pruning => store/pruning}/types/options_test.go | 0 store/rootmulti/dbadapter.go | 2 +- store/rootmulti/store.go | 4 ++-- store/rootmulti/store_test.go | 2 +- store/transient/store.go | 2 +- store/transient/store_test.go | 2 +- store/types/store.go | 2 +- testutil/network/network.go | 2 +- x/params/client/testutil/suite.go | 2 +- x/upgrade/types/storeloader_test.go | 2 +- 30 files changed, 28 insertions(+), 27 deletions(-) rename {pruning => store/pruning}/README.md (100%) rename {pruning => store/pruning}/export_test.go (100%) rename {pruning => store/pruning}/manager.go (99%) rename {pruning => store/pruning}/manager_test.go (99%) rename {pruning => store/pruning}/mock/db_mock.go (100%) rename {pruning => store/pruning}/types/options.go (100%) rename {pruning => store/pruning}/types/options_test.go (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c4b6cd0a733..0b949ffd2239 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -152,6 +152,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/gov) [#13160](https://github.com/cosmos/cosmos-sdk/pull/13160) Remove custom marshaling of proposl and voteoption. * (types) [#13430](https://github.com/cosmos/cosmos-sdk/pull/13430) Remove unused code `ResponseCheckTx` and `ResponseDeliverTx` * (store) [#13529](https://github.com/cosmos/cosmos-sdk/pull/13529) Add method `LatestVersion` to `MultiStore` interface, add method `SetQueryMultiStore` to baesapp to support alternative `MultiStore` implementation for query service. +* (pruning) [#13609]](https://github.com/cosmos/cosmos-sdk/pull/13609) Move pruning pacakge to be under store pacakge ### CLI Breaking Changes diff --git a/baseapp/abci_test.go b/baseapp/abci_test.go index 20b308cdfed8..c1e2934c7779 100644 --- a/baseapp/abci_test.go +++ b/baseapp/abci_test.go @@ -12,9 +12,9 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/snapshots" snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/baseapp/baseapp_test.go b/baseapp/baseapp_test.go index 697841e1a81d..42579f79c06d 100644 --- a/baseapp/baseapp_test.go +++ b/baseapp/baseapp_test.go @@ -9,7 +9,7 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/baseapp/deliver_tx_test.go b/baseapp/deliver_tx_test.go index b7daf0505bfc..dd819cccdd0e 100644 --- a/baseapp/deliver_tx_test.go +++ b/baseapp/deliver_tx_test.go @@ -31,10 +31,10 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/snapshots" snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" "github.com/cosmos/cosmos-sdk/store/rootmulti" storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/cosmos/cosmos-sdk/testutil" diff --git a/baseapp/options.go b/baseapp/options.go index 1a304e4eab1b..aab297edb52e 100644 --- a/baseapp/options.go +++ b/baseapp/options.go @@ -7,10 +7,10 @@ import ( dbm "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/codec/types" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/snapshots" snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" "github.com/cosmos/cosmos-sdk/store" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/client/pruning/main.go b/client/pruning/main.go index fb62dd21a050..7c16cd64b26a 100644 --- a/client/pruning/main.go +++ b/client/pruning/main.go @@ -9,9 +9,9 @@ import ( "github.com/spf13/viper" "github.com/cosmos/cosmos-sdk/client/flags" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/types" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" "github.com/cosmos/cosmos-sdk/store/rootmulti" "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" diff --git a/server/config/config.go b/server/config/config.go index eb56824688e3..bbbde8e0b397 100644 --- a/server/config/config.go +++ b/server/config/config.go @@ -8,7 +8,7 @@ import ( "github.com/spf13/viper" clientflags "github.com/cosmos/cosmos-sdk/client/flags" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" diff --git a/server/mock/store.go b/server/mock/store.go index 486b15e98192..31c6c157e0d6 100644 --- a/server/mock/store.go +++ b/server/mock/store.go @@ -6,8 +6,8 @@ import ( protoio "github.com/cosmos/gogoproto/io" dbm "github.com/tendermint/tm-db" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/server/pruning.go b/server/pruning.go index 2e21579032c1..342b3cb4331e 100644 --- a/server/pruning.go +++ b/server/pruning.go @@ -6,8 +6,8 @@ import ( "github.com/spf13/cast" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/server/types" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" ) // GetPruningOptionsFromFlags parses command flags and returns the correct diff --git a/server/pruning_test.go b/server/pruning_test.go index 2d7bc976d92e..bca90607eb55 100644 --- a/server/pruning_test.go +++ b/server/pruning_test.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/viper" "github.com/stretchr/testify/require" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" ) func TestGetPruningOptionsFromFlags(t *testing.T) { diff --git a/server/start.go b/server/start.go index 2e5c07bcb250..72fd27229dc9 100644 --- a/server/start.go +++ b/server/start.go @@ -24,13 +24,13 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/server/api" serverconfig "github.com/cosmos/cosmos-sdk/server/config" servergrpc "github.com/cosmos/cosmos-sdk/server/grpc" "github.com/cosmos/cosmos-sdk/server/rosetta" crgserver "github.com/cosmos/cosmos-sdk/server/rosetta/lib/server" "github.com/cosmos/cosmos-sdk/server/types" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" "github.com/cosmos/cosmos-sdk/telemetry" sdktypes "github.com/cosmos/cosmos-sdk/types" ) diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index 0741de8151d4..b5b4aff06b51 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -19,9 +19,9 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/types" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" "github.com/cosmos/cosmos-sdk/testutil/mock" "github.com/cosmos/cosmos-sdk/testutil/network" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" diff --git a/store/iavl/store.go b/store/iavl/store.go index e622dbd28fcc..b93a3502547b 100644 --- a/store/iavl/store.go +++ b/store/iavl/store.go @@ -13,9 +13,9 @@ import ( tmcrypto "github.com/tendermint/tendermint/proto/tendermint/crypto" dbm "github.com/tendermint/tm-db" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/store/cachekv" "github.com/cosmos/cosmos-sdk/store/listenkv" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" "github.com/cosmos/cosmos-sdk/store/tracekv" "github.com/cosmos/cosmos-sdk/store/types" "github.com/cosmos/cosmos-sdk/telemetry" diff --git a/store/mem/store.go b/store/mem/store.go index 51968610950f..2f940c4e33e8 100644 --- a/store/mem/store.go +++ b/store/mem/store.go @@ -5,10 +5,10 @@ import ( dbm "github.com/tendermint/tm-db" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/store/cachekv" "github.com/cosmos/cosmos-sdk/store/dbadapter" "github.com/cosmos/cosmos-sdk/store/listenkv" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" "github.com/cosmos/cosmos-sdk/store/tracekv" "github.com/cosmos/cosmos-sdk/store/types" ) diff --git a/pruning/README.md b/store/pruning/README.md similarity index 100% rename from pruning/README.md rename to store/pruning/README.md diff --git a/pruning/export_test.go b/store/pruning/export_test.go similarity index 100% rename from pruning/export_test.go rename to store/pruning/export_test.go diff --git a/pruning/manager.go b/store/pruning/manager.go similarity index 99% rename from pruning/manager.go rename to store/pruning/manager.go index ac1172ebb86e..5da790dc675e 100644 --- a/pruning/manager.go +++ b/store/pruning/manager.go @@ -9,7 +9,7 @@ import ( "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - "github.com/cosmos/cosmos-sdk/pruning/types" + "github.com/cosmos/cosmos-sdk/store/pruning/types" ) // Manager is an abstraction to handle the logic needed for diff --git a/pruning/manager_test.go b/store/pruning/manager_test.go similarity index 99% rename from pruning/manager_test.go rename to store/pruning/manager_test.go index 85d38e8c8af7..adecdd161b6b 100644 --- a/pruning/manager_test.go +++ b/store/pruning/manager_test.go @@ -11,9 +11,9 @@ import ( "github.com/tendermint/tendermint/libs/log" db "github.com/tendermint/tm-db" - "github.com/cosmos/cosmos-sdk/pruning" - "github.com/cosmos/cosmos-sdk/pruning/mock" - "github.com/cosmos/cosmos-sdk/pruning/types" + "github.com/cosmos/cosmos-sdk/store/pruning" + "github.com/cosmos/cosmos-sdk/store/pruning/mock" + "github.com/cosmos/cosmos-sdk/store/pruning/types" ) const dbErr = "db error" diff --git a/pruning/mock/db_mock.go b/store/pruning/mock/db_mock.go similarity index 100% rename from pruning/mock/db_mock.go rename to store/pruning/mock/db_mock.go diff --git a/pruning/types/options.go b/store/pruning/types/options.go similarity index 100% rename from pruning/types/options.go rename to store/pruning/types/options.go diff --git a/pruning/types/options_test.go b/store/pruning/types/options_test.go similarity index 100% rename from pruning/types/options_test.go rename to store/pruning/types/options_test.go diff --git a/store/rootmulti/dbadapter.go b/store/rootmulti/dbadapter.go index 00ca37553823..02b11ebd3f2a 100644 --- a/store/rootmulti/dbadapter.go +++ b/store/rootmulti/dbadapter.go @@ -4,7 +4,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/dbadapter" "github.com/cosmos/cosmos-sdk/store/types" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" ) var commithash = []byte("FAKE_HASH") diff --git a/store/rootmulti/store.go b/store/rootmulti/store.go index f4dfcedd4527..486d2d625905 100644 --- a/store/rootmulti/store.go +++ b/store/rootmulti/store.go @@ -16,14 +16,14 @@ import ( "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - "github.com/cosmos/cosmos-sdk/pruning" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" "github.com/cosmos/cosmos-sdk/store/cachemulti" "github.com/cosmos/cosmos-sdk/store/dbadapter" "github.com/cosmos/cosmos-sdk/store/iavl" "github.com/cosmos/cosmos-sdk/store/listenkv" "github.com/cosmos/cosmos-sdk/store/mem" + "github.com/cosmos/cosmos-sdk/store/pruning" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" "github.com/cosmos/cosmos-sdk/store/tracekv" "github.com/cosmos/cosmos-sdk/store/transient" "github.com/cosmos/cosmos-sdk/store/types" diff --git a/store/rootmulti/store_test.go b/store/rootmulti/store_test.go index a219593fbb86..9f8fdebd2b1c 100644 --- a/store/rootmulti/store_test.go +++ b/store/rootmulti/store_test.go @@ -13,11 +13,11 @@ import ( "github.com/cosmos/cosmos-sdk/codec" codecTypes "github.com/cosmos/cosmos-sdk/codec/types" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/store/cachemulti" "github.com/cosmos/cosmos-sdk/store/iavl" sdkmaps "github.com/cosmos/cosmos-sdk/store/internal/maps" "github.com/cosmos/cosmos-sdk/store/listenkv" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" "github.com/cosmos/cosmos-sdk/store/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) diff --git a/store/transient/store.go b/store/transient/store.go index 4d4fc5b81d6e..207eee918490 100644 --- a/store/transient/store.go +++ b/store/transient/store.go @@ -3,8 +3,8 @@ package transient import ( dbm "github.com/tendermint/tm-db" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/store/dbadapter" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" "github.com/cosmos/cosmos-sdk/store/types" ) diff --git a/store/transient/store_test.go b/store/transient/store_test.go index 273a0ff93045..56b019b8b108 100644 --- a/store/transient/store_test.go +++ b/store/transient/store_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" "github.com/cosmos/cosmos-sdk/store/transient" ) diff --git a/store/types/store.go b/store/types/store.go index 403ede5f706f..65a9b1e2bfc2 100644 --- a/store/types/store.go +++ b/store/types/store.go @@ -7,8 +7,8 @@ import ( abci "github.com/tendermint/tendermint/abci/types" dbm "github.com/tendermint/tm-db" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" "github.com/cosmos/cosmos-sdk/types/kv" ) diff --git a/testutil/network/network.go b/testutil/network/network.go index 960c5eb95818..68f2c72d7526 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -36,12 +36,12 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/api" srvconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" diff --git a/x/params/client/testutil/suite.go b/x/params/client/testutil/suite.go index beeca2681dbe..a3cd9b4b8b52 100644 --- a/x/params/client/testutil/suite.go +++ b/x/params/client/testutil/suite.go @@ -11,9 +11,9 @@ import ( "cosmossdk.io/depinject" "github.com/cosmos/cosmos-sdk/baseapp" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/runtime" servertypes "github.com/cosmos/cosmos-sdk/server/types" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/cosmos-sdk/testutil/network" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/upgrade/types/storeloader_test.go b/x/upgrade/types/storeloader_test.go index b392abef46d0..d0659635ef18 100644 --- a/x/upgrade/types/storeloader_test.go +++ b/x/upgrade/types/storeloader_test.go @@ -14,7 +14,7 @@ import ( dbm "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/baseapp" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" "github.com/cosmos/cosmos-sdk/store/rootmulti" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" From 209797f3be8e397e453cb1b2cbca2bfa57dec0ee Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Mon, 24 Oct 2022 15:23:12 +0200 Subject: [PATCH 12/26] chore: `make format`, `make proto-update-deps`, add 0.45.10 in changelog (#13623) --- .github/workflows/cosmovisor-release.yml | 4 ++-- .github/workflows/release.yml | 2 +- CHANGELOG.md | 18 ++++++++++++++++++ client/v2/autocli/flag/field.go | 1 - proto/tendermint/crypto/proof.proto | 2 +- tools/cosmovisor/.goreleaser.yml | 6 +----- .../download/cosmovisor/genesis/bin/autod | 2 +- x/auth/keeper/deterministic_test.go | 4 ++-- 8 files changed, 26 insertions(+), 13 deletions(-) diff --git a/.github/workflows/cosmovisor-release.yml b/.github/workflows/cosmovisor-release.yml index 5405ded49271..755c01f4b1e5 100644 --- a/.github/workflows/cosmovisor-release.yml +++ b/.github/workflows/cosmovisor-release.yml @@ -11,7 +11,7 @@ jobs: goreleaser: permissions: contents: write # for goreleaser/goreleaser-action to create a GitHub release - runs-on: buildjet-4vcpu-ubuntu-2004 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 with: @@ -33,7 +33,7 @@ jobs: with: # stick to version v0.179.0(https://github.com/cosmos/cosmos-sdk/issues/11125) version: v0.179.0 - args: release --rm-dist --skip-validate + args: release --rm-dist --skip-validate --release-notes ./RELEASE_NOTES.md workdir: tools/cosmovisor env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a386627066a5..6954308d76c1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: release: permissions: contents: write # for goreleaser/goreleaser-action to create a GitHub release - runs-on: buildjet-4vcpu-ubuntu-2004 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install Go diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b949ffd2239..904db05d2b57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -560,6 +560,24 @@ replace github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v8.0 * (x/upgrade) [#9906](https://github.com/cosmos/cosmos-sdk/pull/9906) Deprecate `UpgradeConsensusState` gRPC query since this functionality is only used for IBC, which now has its own [IBC replacement](https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) * (types) [#10948](https://github.com/cosmos/cosmos-sdk/issues/10948) Deprecate the types.DBBackend variable and types.NewLevelDB function. They are replaced by a new entry in `app.toml`: `app-db-backend` and `tendermint/tm-db`s `NewDB` function. If `app-db-backend` is defined, then it is used. Otherwise, if `types.DBBackend` is defined, it is used (until removed: [#11241](https://github.com/cosmos/cosmos-sdk/issues/11241)). Otherwise, Tendermint config's `db-backend` is used. +## [v0.45.10](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.10) - 2022-10-24 + +### Features + +* (grpc) [#13485](https://github.com/cosmos/cosmos-sdk/pull/13485) Implement a new gRPC query, `/cosmos/base/node/v1beta1/config`, which provides operator configuration. Applications that wish to expose operator minimum gas prices via gRPC should have their application implement the `ApplicationQueryService` interface (see `SimApp#RegisterNodeService` as an example). +* [#13557](https://github.com/cosmos/cosmos-sdk/pull/#13557) - Add `GenSignedMockTx`. This can be used as workaround for #12437 revertion. `v0.46+` contains as well a `GenSignedMockTx` that behaves the same way. +* (x/auth) [#13612](https://github.com/cosmos/cosmos-sdk/pull/13612) Add `Query/ModuleAccountByName` endpoint for accessing the module account info by module name. + +### Improvements + +* [#13585](https://github.com/cosmos/cosmos-sdk/pull/13585) Bump Tendermint to `v0.34.22`. + +### Bug Fixes + +* [#13588](https://github.com/cosmos/cosmos-sdk/pull/13588) Fix regression in distrubtion.WithdrawDelegationRewards when rewards are zero. +* [#13564](https://github.com/cosmos/cosmos-sdk/pull/13564) - Fix `make proto-gen`. +* (server) [#13610](https://github.com/cosmos/cosmos-sdk/pull/13610) Read the pruning-keep-every field again. + ## [v0.45.9](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.9) - 2022-10-14 ATTENTION: diff --git a/client/v2/autocli/flag/field.go b/client/v2/autocli/flag/field.go index 93933d04c5d7..b2c385ac95da 100644 --- a/client/v2/autocli/flag/field.go +++ b/client/v2/autocli/flag/field.go @@ -62,7 +62,6 @@ func (b *Builder) addFieldFlag(ctx context.Context, flagSet *pflag.FlagSet, fiel var val HasValue if field.IsList() { val = bindSimpleListFlag(flagSet, field.Kind(), name, shorthand, usage) - } else { val = bindSimpleFlag(flagSet, field.Kind(), name, shorthand, usage) } diff --git a/proto/tendermint/crypto/proof.proto b/proto/tendermint/crypto/proof.proto index 7293ae63ee58..975df7685397 100644 --- a/proto/tendermint/crypto/proof.proto +++ b/proto/tendermint/crypto/proof.proto @@ -27,7 +27,7 @@ message DominoOp { } // ProofOp defines an operation used for calculating Merkle root -// The data could be arbitrary format, providing necessary data +// The data could be arbitrary format, providing nessecary data // for example neighbouring node hash message ProofOp { string type = 1; diff --git a/tools/cosmovisor/.goreleaser.yml b/tools/cosmovisor/.goreleaser.yml index 547c4bfafc3c..7de68c38a19c 100644 --- a/tools/cosmovisor/.goreleaser.yml +++ b/tools/cosmovisor/.goreleaser.yml @@ -29,10 +29,6 @@ archives: checksum: name_template: 'SHA256SUMS-{{ replace .Version "cosmovisor/" "cosmovisor-" }}.txt' algorithm: sha256 + changelog: skip: false - sort: asc - filters: - exclude: - - "^docs:" - - "^test:" diff --git a/tools/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod b/tools/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod index 5bb4777b4384..d240240b6103 100755 --- a/tools/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod +++ b/tools/cosmovisor/testdata/download/cosmovisor/genesis/bin/autod @@ -6,7 +6,7 @@ echo 'ERROR: UPGRADE "chain2" NEEDED at height: 49: zip_binary' # create upgrade info # this info contains directly information about binaries (in chain2->chain3 update we test with info containing a link to the file with an address for the new chain binary) -echo '{"name":"chain2","height":49,"info":"{\"binaries\":{\"linux/amd64\":\"https://github.com/cosmos/cosmos-sdk/raw/main/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip?checksum=sha256:b30cf0b1a3e46ac9587cc4d7b102eb796e39e3e0dfa3f8ca6e163fc1b1e913ca\"}}"}' >$3 +echo '{"name":"chain2","height":49,"info":"{\"binaries\":{\"linux/amd64\":\"https://github.com/cosmos/cosmos-sdk/raw/main/tools/cosmovisor/testdata/repo/chain2-zip_bin/autod.zip?checksum=sha256:fd20f3163e5ab2ab430c0c2936de82fcf5f100a8497d7f121b9f34a1a4b96683\"}}"}' >$3 sleep 0.1 echo Never should be printed!!! diff --git a/x/auth/keeper/deterministic_test.go b/x/auth/keeper/deterministic_test.go index 2abc4aea2587..30b58af74630 100644 --- a/x/auth/keeper/deterministic_test.go +++ b/x/auth/keeper/deterministic_test.go @@ -375,7 +375,8 @@ func (suite *DeterministicTestSuite) TestGRPCQueryAddressStringToBytes() { } func (suite *DeterministicTestSuite) setModuleAccounts( - ctx sdk.Context, ak keeper.AccountKeeper, maccs []string) []types.AccountI { + ctx sdk.Context, ak keeper.AccountKeeper, maccs []string, +) []types.AccountI { sort.Strings(maccs) moduleAccounts := make([]types.AccountI, 0, len(maccs)) for _, m := range maccs { @@ -414,7 +415,6 @@ func (suite *DeterministicTestSuite) runModuleAccountsIterations(ak keeper.Accou } } } - } func (suite *DeterministicTestSuite) TestGRPCQueryModuleAccounts() { From b63adac6f409e1c502ab0fd769ad8e18e31c9308 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Tue, 25 Oct 2022 00:02:51 +0800 Subject: [PATCH 13/26] fix: app-hash mismatch if upgrade migration commit is interrupted (#13530) * avoid append commit when upgrade get interrupted * add commitStores test * add change doc * Update store/rootmulti/store.go Co-authored-by: yihuang Co-authored-by: Aleksandr Bezobchuk Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> --- CHANGELOG.md | 1 + store/rootmulti/store.go | 10 ++++- store/rootmulti/store_test.go | 73 +++++++++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 904db05d2b57..29ad05def725 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -175,6 +175,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/gov) [#13051](https://github.com/cosmos/cosmos-sdk/pull/13051) In SubmitPropsal, when a legacy msg fails it's handler call, wrap the error as ErrInvalidProposalContent (instead of ErrNoProposalHandlerExists). * (x/gov) [#13045](https://github.com/cosmos/cosmos-sdk/pull/13045) Fix gov migrations for v3(0.46). * (snapshot) [#13400](https://github.com/cosmos/cosmos-sdk/pull/13400) Fix snapshot checksum issue in golang 1.19. +* (store) [#13530](https://github.com/cosmos/cosmos-sdk/pull/13530) Fix app-hash mismatch if upgrade migration commit is interrupted. ### Deprecated diff --git a/store/rootmulti/store.go b/store/rootmulti/store.go index 486d2d625905..286e42b8ac39 100644 --- a/store/rootmulti/store.go +++ b/store/rootmulti/store.go @@ -1040,8 +1040,16 @@ func commitStores(version int64, storeMap map[types.StoreKey]types.CommitKVStore storeInfos := make([]types.StoreInfo, 0, len(storeMap)) for key, store := range storeMap { - commitID := store.Commit() + last := store.LastCommitID() + // If a commit event execution is interrupted, a new iavl store's version will be larger than the rootmulti's metadata, when the block is replayed, we should avoid committing that iavl store again. + var commitID types.CommitID + if last.Version >= version { + last.Version = version + commitID = last + } else { + commitID = store.Commit() + } if store.GetStoreType() == types.StoreTypeTransient { continue } diff --git a/store/rootmulti/store_test.go b/store/rootmulti/store_test.go index 9f8fdebd2b1c..8a6848e77cd6 100644 --- a/store/rootmulti/store_test.go +++ b/store/rootmulti/store_test.go @@ -961,3 +961,76 @@ func TestStateListeners(t *testing.T) { cacheMulti.Write() require.Equal(t, 1, len(listener.stateCache)) } + +type commitKVStoreStub struct { + types.CommitKVStore + Committed int +} + +func (stub *commitKVStoreStub) Commit() types.CommitID { + commitID := stub.CommitKVStore.Commit() + stub.Committed += 1 + return commitID +} + +func prepareStoreMap() map[types.StoreKey]types.CommitKVStore { + var db dbm.DB = dbm.NewMemDB() + store := NewStore(db, log.NewNopLogger()) + store.MountStoreWithDB(types.NewKVStoreKey("iavl1"), types.StoreTypeIAVL, nil) + store.MountStoreWithDB(types.NewKVStoreKey("iavl2"), types.StoreTypeIAVL, nil) + store.MountStoreWithDB(types.NewTransientStoreKey("trans1"), types.StoreTypeTransient, nil) + store.LoadLatestVersion() + return map[types.StoreKey]types.CommitKVStore{ + testStoreKey1: &commitKVStoreStub{ + CommitKVStore: store.GetStoreByName("iavl1").(types.CommitKVStore), + }, + testStoreKey2: &commitKVStoreStub{ + CommitKVStore: store.GetStoreByName("iavl2").(types.CommitKVStore), + }, + testStoreKey3: &commitKVStoreStub{ + CommitKVStore: store.GetStoreByName("trans1").(types.CommitKVStore), + }, + } +} + +func TestCommitStores(t *testing.T) { + testCases := []struct { + name string + committed int + exptectCommit int + }{ + { + "when upgrade not get interrupted", + 0, + 1, + }, + { + "when upgrade get interrupted once", + 1, + 0, + }, + { + "when upgrade get interrupted twice", + 2, + 0, + }, + } + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + storeMap := prepareStoreMap() + store := storeMap[testStoreKey1].(*commitKVStoreStub) + for i := tc.committed; i > 0; i-- { + store.Commit() + } + store.Committed = 0 + var version int64 = 1 + removalMap := map[types.StoreKey]bool{} + res := commitStores(version, storeMap, removalMap) + for _, s := range res.StoreInfos { + require.Equal(t, version, s.CommitId.Version) + } + require.Equal(t, version, res.Version) + require.Equal(t, tc.exptectCommit, store.Committed) + }) + } +} From d3010793eae62243caa276cf5f23a431f33c9713 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Oct 2022 20:33:20 +0200 Subject: [PATCH 14/26] build(deps): Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /tools/cosmovisor (#13637) * build(deps): Bump github.com/stretchr/testify in /tools/cosmovisor Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.0 to 1.8.1. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.0...v1.8.1) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * build(deps): Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /tools/cosmovisor for all modules Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> --- core/go.mod | 2 +- core/go.sum | 4 +++- depinject/go.mod | 2 +- depinject/go.sum | 4 +++- errors/go.mod | 2 +- errors/go.sum | 4 +++- go.mod | 2 +- go.sum | 6 ++++-- math/go.mod | 2 +- math/go.sum | 4 +++- orm/go.mod | 2 +- orm/go.sum | 4 +++- simapp/go.mod | 2 +- simapp/go.sum | 6 ++++-- tests/go.mod | 2 +- tests/go.sum | 6 ++++-- tools/cosmovisor/go.mod | 2 +- tools/cosmovisor/go.sum | 6 ++++-- tx/go.mod | 2 +- tx/go.sum | 4 +++- 20 files changed, 44 insertions(+), 24 deletions(-) diff --git a/core/go.mod b/core/go.mod index 7d19fe125385..91ad1e3b2625 100644 --- a/core/go.mod +++ b/core/go.mod @@ -7,7 +7,7 @@ require ( cosmossdk.io/depinject v1.0.0-alpha.3 cosmossdk.io/math v1.0.0-beta.3 github.com/cosmos/cosmos-proto v1.0.0-alpha8 - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.1 google.golang.org/protobuf v1.28.1 gotest.tools/v3 v3.4.0 sigs.k8s.io/yaml v1.3.0 diff --git a/core/go.sum b/core/go.sum index eb6a29327223..c77fb67011aa 100644 --- a/core/go.sum +++ b/core/go.sum @@ -32,9 +32,11 @@ github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGn github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -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/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= diff --git a/depinject/go.mod b/depinject/go.mod index 59daf2fc1a4d..488d5b0d57ab 100644 --- a/depinject/go.mod +++ b/depinject/go.mod @@ -5,7 +5,7 @@ go 1.19 require ( github.com/pkg/errors v0.9.1 github.com/regen-network/gocuke v0.6.2 - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.1 golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e gotest.tools/v3 v3.4.0 ) diff --git a/depinject/go.sum b/depinject/go.sum index d96276af5456..37077945b113 100644 --- a/depinject/go.sum +++ b/depinject/go.sum @@ -41,11 +41,13 @@ github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XF github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 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.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= diff --git a/errors/go.mod b/errors/go.mod index aa9bb0092c78..17f3c9ce7920 100644 --- a/errors/go.mod +++ b/errors/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/pkg/errors v0.9.1 - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.1 google.golang.org/grpc v1.50.1 ) diff --git a/errors/go.sum b/errors/go.sum index 3e9e92ffb7bd..37b68c46be93 100644 --- a/errors/go.sum +++ b/errors/go.sum @@ -26,9 +26,11 @@ github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XF github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -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/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= golang.org/x/net v0.0.0-20221017152216-f25eb7ecb193 h1:3Moaxt4TfzNcQH6DWvlYKraN1ozhBXQHcgvXjRGeim0= golang.org/x/net v0.0.0-20221017152216-f25eb7ecb193/go.mod h1:RpDiru2p0u2F0lLpEoqnP2+7xs0ifAuOcJ442g6GU2s= golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43 h1:OK7RB6t2WQX54srQQYSXMW8dF5C6/8+oA/s5QBmmto4= diff --git a/go.mod b/go.mod index 8027c305d405..625390a4f891 100644 --- a/go.mod +++ b/go.mod @@ -47,7 +47,7 @@ require ( github.com/spf13/cobra v1.6.0 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.13.0 - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.1 github.com/tendermint/btcd v0.1.1 github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 github.com/tendermint/go-amino v0.16.0 diff --git a/go.sum b/go.sum index 5927e92d71e0..e87cd2f3c55e 100644 --- a/go.sum +++ b/go.sum @@ -775,8 +775,9 @@ github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3 github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/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 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= 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= @@ -784,8 +785,9 @@ 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.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= diff --git a/math/go.mod b/math/go.mod index eeaab7865e17..1398425b0920 100644 --- a/math/go.mod +++ b/math/go.mod @@ -3,7 +3,7 @@ module cosmossdk.io/math go 1.19 require ( - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.1 sigs.k8s.io/yaml v1.3.0 ) diff --git a/math/go.sum b/math/go.sum index a9cfda4749e0..e82db57c1b1c 100644 --- a/math/go.sum +++ b/math/go.sum @@ -18,9 +18,11 @@ github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XF github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -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/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= 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= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/orm/go.mod b/orm/go.mod index 09d7076b88a6..350a1c49cd72 100644 --- a/orm/go.mod +++ b/orm/go.mod @@ -10,7 +10,7 @@ require ( github.com/google/go-cmp v0.5.9 github.com/iancoleman/strcase v0.2.0 github.com/regen-network/gocuke v0.6.2 - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.1 github.com/tendermint/tm-db v0.6.7 golang.org/x/exp v0.0.0-20220916125017-b168a2c6b86b google.golang.org/grpc v1.50.1 diff --git a/orm/go.sum b/orm/go.sum index 8190e83d5883..31903025fa6c 100644 --- a/orm/go.sum +++ b/orm/go.sum @@ -143,13 +143,15 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 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.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.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= 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/tendermint/tm-db v0.6.7 h1:fE00Cbl0jayAoqlExN6oyQJ7fR/ZtoVOmvPJ//+shu8= diff --git a/simapp/go.mod b/simapp/go.mod index fde90462a31b..150b9e2017d9 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -12,7 +12,7 @@ require ( github.com/spf13/cast v1.5.0 github.com/spf13/cobra v1.6.0 github.com/spf13/viper v1.13.0 - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.1 github.com/tendermint/tendermint v0.37.0-alpha.2 github.com/tendermint/tm-db v0.6.7 google.golang.org/protobuf v1.28.1 diff --git a/simapp/go.sum b/simapp/go.sum index 73e9779f9cea..40952a5ba734 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -763,8 +763,9 @@ github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3 github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/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 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= 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= @@ -772,8 +773,9 @@ 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.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= diff --git a/tests/go.mod b/tests/go.mod index bbed28052131..40c788fdbe7a 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -12,7 +12,7 @@ require ( github.com/golang/mock v1.6.0 github.com/google/uuid v1.3.0 github.com/spf13/cobra v1.6.0 - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.1 github.com/tendermint/tendermint v0.37.0-alpha.2 github.com/tendermint/tm-db v0.6.7 pgregory.net/rapid v0.5.3 diff --git a/tests/go.sum b/tests/go.sum index 7033ea35cda5..aeca26103320 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -765,8 +765,9 @@ github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3 github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/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 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= 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= @@ -774,8 +775,9 @@ 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.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= diff --git a/tools/cosmovisor/go.mod b/tools/cosmovisor/go.mod index bc735432fa33..976dd6be1deb 100644 --- a/tools/cosmovisor/go.mod +++ b/tools/cosmovisor/go.mod @@ -8,7 +8,7 @@ require ( github.com/otiai10/copy v1.7.0 github.com/rs/zerolog v1.28.0 github.com/spf13/cobra v1.6.0 - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.1 ) require ( diff --git a/tools/cosmovisor/go.sum b/tools/cosmovisor/go.sum index 6c6e685ea179..d235c1bd968e 100644 --- a/tools/cosmovisor/go.sum +++ b/tools/cosmovisor/go.sum @@ -560,8 +560,9 @@ github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU= github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= 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 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= 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= @@ -569,8 +570,9 @@ 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.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= diff --git a/tx/go.mod b/tx/go.mod index f5952377a0e3..8931ce31c116 100644 --- a/tx/go.mod +++ b/tx/go.mod @@ -7,7 +7,7 @@ require ( cosmossdk.io/core v0.3.0 cosmossdk.io/math v1.0.0-beta.3 github.com/cosmos/cosmos-proto v1.0.0-alpha8 - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.1 google.golang.org/protobuf v1.28.1 ) diff --git a/tx/go.sum b/tx/go.sum index 9303a15d8032..9475918e46ab 100644 --- a/tx/go.sum +++ b/tx/go.sum @@ -19,9 +19,11 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -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/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= golang.org/x/net v0.0.0-20221017152216-f25eb7ecb193 h1:3Moaxt4TfzNcQH6DWvlYKraN1ozhBXQHcgvXjRGeim0= golang.org/x/net v0.0.0-20221017152216-f25eb7ecb193/go.mod h1:RpDiru2p0u2F0lLpEoqnP2+7xs0ifAuOcJ442g6GU2s= golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43 h1:OK7RB6t2WQX54srQQYSXMW8dF5C6/8+oA/s5QBmmto4= From 7b6a5f5b107267fb658304f8763386ce05db8a1c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Oct 2022 20:33:35 +0200 Subject: [PATCH 15/26] build(deps): Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /depinject (#13635) * build(deps): Bump github.com/stretchr/testify in /depinject Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.0 to 1.8.1. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.0...v1.8.1) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * build(deps): Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /depinject for all modules Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> From f4a833c1befdf4148ad9befe17dcf77a6090fff6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Oct 2022 20:33:59 +0200 Subject: [PATCH 16/26] build(deps): Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /tx (#13636) * build(deps): Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /tx Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.0 to 1.8.1. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.0...v1.8.1) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * build(deps): Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /tx for all modules Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> From 8ae772d05f1bd9cf7bbb94616f0edd36768cfbfe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Oct 2022 20:34:27 +0200 Subject: [PATCH 17/26] build(deps): Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /core (#13634) * build(deps): Bump github.com/stretchr/testify in /core Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.0 to 1.8.1. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.0...v1.8.1) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * build(deps): Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /core for all modules Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> From 5dbb78053158a5331a36fca81a90a94cb4e1ff2b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Oct 2022 20:35:16 +0200 Subject: [PATCH 18/26] build(deps): Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /errors (#13633) * build(deps): Bump github.com/stretchr/testify in /errors Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.0 to 1.8.1. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.0...v1.8.1) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * build(deps): Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /errors for all modules Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> From 5a232406129bb3a32769ec5efdb9d985dad645d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Oct 2022 20:35:45 +0200 Subject: [PATCH 19/26] build(deps): Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /orm (#13630) * build(deps): Bump github.com/stretchr/testify in /orm Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.0 to 1.8.1. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.0...v1.8.1) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * build(deps): Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /orm for all modules Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> From b809f7129eae9f236de03cf3135d27822c07a14c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Oct 2022 00:22:40 +0200 Subject: [PATCH 20/26] build(deps): Bump tailwindcss from 3.2.0 to 3.2.1 in /docs (#13628) --- docs/package-lock.json | 16 +++++++++------- docs/package.json | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index 85634fbdb355..ea74ac52aaad 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -21,7 +21,7 @@ "prism-react-renderer": "^1.3.5", "react": "^17.0.2", "react-dom": "^17.0.2", - "tailwindcss": "^3.2.0" + "tailwindcss": "^3.2.1" }, "devDependencies": { "@docusaurus/module-type-aliases": "2.1.0" @@ -11157,9 +11157,9 @@ } }, "node_modules/tailwindcss": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.2.0.tgz", - "integrity": "sha512-ARh/W0uH5UlWIC2nn02V0+5fyF0k6qZliyt4QYic2upOhPUE/Spu1EURNc9txJ3+4j8OEmdigqfDpw4d2tA4vA==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.2.1.tgz", + "integrity": "sha512-Uw+GVSxp5CM48krnjHObqoOwlCt5Qo6nw1jlCRwfGy68dSYb/LwS9ZFidYGRiM+w6rMawkZiu1mEMAsHYAfoLg==", "dependencies": { "arg": "^5.0.2", "chokidar": "^3.5.3", @@ -11171,6 +11171,7 @@ "glob-parent": "^6.0.2", "is-glob": "^4.0.3", "lilconfig": "^2.0.6", + "micromatch": "^4.0.5", "normalize-path": "^3.0.0", "object-hash": "^3.0.0", "picocolors": "^1.0.0", @@ -20770,9 +20771,9 @@ } }, "tailwindcss": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.2.0.tgz", - "integrity": "sha512-ARh/W0uH5UlWIC2nn02V0+5fyF0k6qZliyt4QYic2upOhPUE/Spu1EURNc9txJ3+4j8OEmdigqfDpw4d2tA4vA==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.2.1.tgz", + "integrity": "sha512-Uw+GVSxp5CM48krnjHObqoOwlCt5Qo6nw1jlCRwfGy68dSYb/LwS9ZFidYGRiM+w6rMawkZiu1mEMAsHYAfoLg==", "requires": { "arg": "^5.0.2", "chokidar": "^3.5.3", @@ -20784,6 +20785,7 @@ "glob-parent": "^6.0.2", "is-glob": "^4.0.3", "lilconfig": "^2.0.6", + "micromatch": "^4.0.5", "normalize-path": "^3.0.0", "object-hash": "^3.0.0", "picocolors": "^1.0.0", diff --git a/docs/package.json b/docs/package.json index ac8a04d211d0..8eeced739c8f 100644 --- a/docs/package.json +++ b/docs/package.json @@ -31,7 +31,7 @@ "prism-react-renderer": "^1.3.5", "react": "^17.0.2", "react-dom": "^17.0.2", - "tailwindcss": "^3.2.0" + "tailwindcss": "^3.2.1" }, "devDependencies": { "@docusaurus/module-type-aliases": "2.1.0" From 9f3575a10f1a6f1315b94a9be783df5156ce2292 Mon Sep 17 00:00:00 2001 From: atheeshp <59333759+atheeshp@users.noreply.github.com> Date: Tue, 25 Oct 2022 12:06:47 +0530 Subject: [PATCH 21/26] refactor: deterministic tests and add gas tests (#13539) * refactor: x/auth deterministic tests * changes * x/bank refactor * changes * review changes * refactor `x/staking` * fix tests * fix tests * fix tests * review changes * Update testutil/testdata/grpc_query.go * Update testutil/testdata/grpc_query.go Co-authored-by: Aleksandr Bezobchuk Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> --- .../bank/keeper/deterministic_test.go | 230 ++++----------- tests/integration/bank/keeper/keeper_test.go | 9 +- .../staking/keeper/determinstic_test.go | 262 +++--------------- testutil/testdata/grpc_query.go | 39 +++ x/auth/keeper/deterministic_test.go | 221 ++++----------- 5 files changed, 182 insertions(+), 579 deletions(-) diff --git a/tests/integration/bank/keeper/deterministic_test.go b/tests/integration/bank/keeper/deterministic_test.go index 4c55d2624eee..d94c67ddfe06 100644 --- a/tests/integration/bank/keeper/deterministic_test.go +++ b/tests/integration/bank/keeper/deterministic_test.go @@ -13,11 +13,17 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + + _ "github.com/cosmos/cosmos-sdk/x/auth" + _ "github.com/cosmos/cosmos-sdk/x/auth/tx/module" + _ "github.com/cosmos/cosmos-sdk/x/bank" + _ "github.com/cosmos/cosmos-sdk/x/consensus" + _ "github.com/cosmos/cosmos-sdk/x/params" + _ "github.com/cosmos/cosmos-sdk/x/staking" ) type DeterministicTestSuite struct { @@ -30,12 +36,7 @@ type DeterministicTestSuite struct { } var ( - denomRegex = sdk.DefaultCoinDenomRegex() - - // iterCount defines the number of iterations to run on each query to test - // determinism. - iterCount = 1000 - + denomRegex = sdk.DefaultCoinDenomRegex() addr1 = sdk.MustAccAddressFromBech32("cosmos139f7kncmglres2nf3h4hc4tade85ekfr8sulz5") coin1 = sdk.NewCoin("denom", sdk.NewInt(10)) metadataAtom = banktypes.Metadata{ @@ -98,38 +99,19 @@ func (suite *DeterministicTestSuite) getCoin(t *rapid.T) sdk.Coin { ) } -func (suite *DeterministicTestSuite) runQueryBalanceIterations(addr sdk.AccAddress, prevRes *sdk.Coin) { - for i := 0; i < iterCount; i++ { - res, err := suite.queryClient.Balance(suite.ctx, banktypes.NewQueryBalanceRequest(addr, prevRes.GetDenom())) - suite.Require().NoError(err) - suite.Require().NotNil(res) - - suite.Require().Equal(res.GetBalance(), prevRes) - } -} - func (suite *DeterministicTestSuite) TestGRPCQueryBalance() { rapid.Check(suite.T(), func(t *rapid.T) { addr := testdata.AddressGenerator(t).Draw(t, "address") coin := suite.getCoin(t) suite.fundAccount(addr, coin) - suite.runQueryBalanceIterations(addr, &coin) + req := banktypes.NewQueryBalanceRequest(addr, coin.GetDenom()) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.Balance, 0, true) }) suite.fundAccount(addr1, coin1) - suite.runQueryBalanceIterations(addr1, &coin1) -} - -func (suite *DeterministicTestSuite) runAllBalancesIterations(req *banktypes.QueryAllBalancesRequest, prevRes *banktypes.QueryAllBalancesResponse) { - for i := 0; i < iterCount; i++ { - res, err := suite.queryClient.AllBalances(suite.ctx, req) - - suite.Require().NoError(err) - suite.Require().NotNil(res) - - suite.Require().Equal(res, prevRes) - } + req := banktypes.NewQueryBalanceRequest(addr1, coin1.GetDenom()) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.Balance, 1087, false) } func (suite *DeterministicTestSuite) TestGRPCQueryAllBalances() { @@ -148,10 +130,7 @@ func (suite *DeterministicTestSuite) TestGRPCQueryAllBalances() { suite.fundAccount(addr, coins...) req := banktypes.NewQueryAllBalancesRequest(addr, testdata.PaginationGenerator(t, uint64(numCoins)).Draw(t, "pagination")) - res, err := suite.queryClient.AllBalances(suite.ctx, req) - suite.Require().NoError(err) - - suite.runAllBalancesIterations(req, res) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.AllBalances, 0, true) }) coins := sdk.NewCoins( @@ -160,20 +139,9 @@ func (suite *DeterministicTestSuite) TestGRPCQueryAllBalances() { ) suite.fundAccount(addr1, coins...) - suite.runAllBalancesIterations( - banktypes.NewQueryAllBalancesRequest(addr1, nil), - &banktypes.QueryAllBalancesResponse{Balances: coins, Pagination: &query.PageResponse{Total: 2}}, - ) -} + req := banktypes.NewQueryAllBalancesRequest(addr1, nil) -func (suite *DeterministicTestSuite) runSpendableBalancesIterations(req *banktypes.QuerySpendableBalancesRequest, prevRes *banktypes.QuerySpendableBalancesResponse) { - for i := 0; i < iterCount; i++ { - res, err := suite.queryClient.SpendableBalances(suite.ctx, req) - suite.Require().NoError(err) - suite.Require().NotNil(res) - - suite.Require().Equal(res, prevRes) - } + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.AllBalances, 357, false) } func (suite *DeterministicTestSuite) TestGRPCQuerySpendableBalances() { @@ -196,9 +164,7 @@ func (suite *DeterministicTestSuite) TestGRPCQuerySpendableBalances() { suite.Require().NoError(err) req := banktypes.NewQuerySpendableBalancesRequest(addr, testdata.PaginationGenerator(t, uint64(numCoins)).Draw(t, "pagination")) - res, err := suite.queryClient.SpendableBalances(suite.ctx, req) - suite.Require().NoError(err) - suite.runSpendableBalancesIterations(req, res) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.SpendableBalances, 0, true) }) coins := sdk.NewCoins( @@ -209,21 +175,8 @@ func (suite *DeterministicTestSuite) TestGRPCQuerySpendableBalances() { err := banktestutil.FundAccount(suite.bankKeeper, suite.ctx, addr1, coins) suite.Require().NoError(err) - suite.runSpendableBalancesIterations( - banktypes.NewQuerySpendableBalancesRequest(addr1, nil), - &banktypes.QuerySpendableBalancesResponse{Balances: coins, Pagination: &query.PageResponse{Total: 2}}, - ) -} - -func (suite *DeterministicTestSuite) runTotalSupplyIterations(req *banktypes.QueryTotalSupplyRequest, prevRes *banktypes.QueryTotalSupplyResponse) { - for i := 0; i < iterCount; i++ { - res, err := suite.queryClient.TotalSupply(suite.ctx, req) - - suite.Require().NoError(err) - suite.Require().NotNil(res) - - suite.Require().Equal(res, prevRes) - } + req := banktypes.NewQuerySpendableBalancesRequest(addr1, nil) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.SpendableBalances, 2032, false) } func (suite *DeterministicTestSuite) TestGRPCQueryTotalSupply() { @@ -232,6 +185,7 @@ func (suite *DeterministicTestSuite) TestGRPCQueryTotalSupply() { initialSupply := res.GetSupply() rapid.Check(suite.T(), func(t *rapid.T) { + numCoins := rapid.IntRange(1, 3).Draw(t, "num-count") coins := make(sdk.Coins, 0, numCoins) @@ -251,15 +205,11 @@ func (suite *DeterministicTestSuite) TestGRPCQueryTotalSupply() { req := &banktypes.QueryTotalSupplyRequest{ Pagination: testdata.PaginationGenerator(t, uint64(len(initialSupply))).Draw(t, "pagination"), } - res, err = suite.queryClient.TotalSupply(suite.ctx, req) - suite.Require().NoError(err) - suite.runTotalSupplyIterations(req, res) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.TotalSupply, 0, true) }) - res, err = suite.queryClient.TotalSupply(suite.ctx, &banktypes.QueryTotalSupplyRequest{}) - suite.Require().NoError(err) - suite.Require().NotNil(res) + suite.SetupTest() // reset coins := sdk.NewCoins( sdk.NewCoin("foo", sdk.NewInt(10)), @@ -268,24 +218,8 @@ func (suite *DeterministicTestSuite) TestGRPCQueryTotalSupply() { suite.Require().NoError(suite.bankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, coins)) - coins = initialSupply.Add(coins...) - suite.runTotalSupplyIterations( - &banktypes.QueryTotalSupplyRequest{Pagination: &query.PageRequest{Limit: uint64(len(coins)), CountTotal: true}}, - &banktypes.QueryTotalSupplyResponse{Supply: coins, Pagination: &query.PageResponse{Total: uint64(len(coins))}}, - ) -} - -func (suite *DeterministicTestSuite) runTotalSupplyOfIterations(denom string, prevRes sdk.Coin) { - for i := 0; i < iterCount; i++ { - res, err := suite.queryClient.SupplyOf(suite.ctx, &banktypes.QuerySupplyOfRequest{ - Denom: denom, - }) - - suite.Require().NoError(err) - suite.Require().NotNil(res) - - suite.Require().Equal(res.GetAmount(), prevRes) - } + req := &banktypes.QueryTotalSupplyRequest{} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.TotalSupply, 243, false) } func (suite *DeterministicTestSuite) TestGRPCQueryTotalSupplyOf() { @@ -297,25 +231,16 @@ func (suite *DeterministicTestSuite) TestGRPCQueryTotalSupplyOf() { suite.Require().NoError(suite.bankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, sdk.NewCoins(coin))) - suite.runTotalSupplyOfIterations(coin.Denom, coin) + req := &banktypes.QuerySupplyOfRequest{Denom: coin.GetDenom()} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.SupplyOf, 0, true) + }) coin := sdk.NewCoin("bar", sdk.NewInt(100)) suite.Require().NoError(suite.bankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, sdk.NewCoins(coin))) - - suite.runTotalSupplyOfIterations(coin.Denom, coin) -} - -func (suite *DeterministicTestSuite) runParamsIterations(prevRes banktypes.Params) { - for i := 0; i < iterCount; i++ { - res, err := suite.queryClient.Params(suite.ctx, &banktypes.QueryParamsRequest{}) - - suite.Require().NoError(err) - suite.Require().NotNil(res) - - suite.Require().Equal(res.GetParams(), prevRes) - } + req := &banktypes.QuerySupplyOfRequest{Denom: coin.GetDenom()} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.SupplyOf, 1021, false) } func (suite *DeterministicTestSuite) TestGRPCQueryParams() { @@ -330,10 +255,10 @@ func (suite *DeterministicTestSuite) TestGRPCQueryParams() { DefaultSendEnabled: rapid.Bool().Draw(t, "send"), } - // SetParams overwrites `SendEnabled` to nil suite.bankKeeper.SetParams(suite.ctx, params) - params.SendEnabled = nil - suite.runParamsIterations(params) + + req := &banktypes.QueryParamsRequest{} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.Params, 0, true) }) enabledStatus := banktypes.SendEnabled{ @@ -346,10 +271,10 @@ func (suite *DeterministicTestSuite) TestGRPCQueryParams() { DefaultSendEnabled: false, } - // SetParams overwrites `SendEnabled` to nil suite.bankKeeper.SetParams(suite.ctx, params) - params.SendEnabled = nil - suite.runParamsIterations(params) + + req := &banktypes.QueryParamsRequest{} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.Params, 1003, false) } func (suite *DeterministicTestSuite) createAndReturnMetadatas(t *rapid.T, count int) []banktypes.Metadata { @@ -387,16 +312,6 @@ func (suite *DeterministicTestSuite) createAndReturnMetadatas(t *rapid.T, count return denomsMetadata } -func (suite *DeterministicTestSuite) runDenomsMetadataIterations(req *banktypes.QueryDenomsMetadataRequest, prevRes *banktypes.QueryDenomsMetadataResponse) { - for i := 0; i < iterCount; i++ { - res, err := suite.queryClient.DenomsMetadata(suite.ctx, req) - suite.Require().NoError(err) - suite.Require().NotNil(res) - - suite.Require().Equal(res, prevRes) - } -} - func (suite *DeterministicTestSuite) TestGRPCDenomsMetadata() { rapid.Check(suite.T(), func(t *rapid.T) { count := rapid.IntRange(1, 3).Draw(t, "count") @@ -410,33 +325,16 @@ func (suite *DeterministicTestSuite) TestGRPCDenomsMetadata() { req := &banktypes.QueryDenomsMetadataRequest{ Pagination: testdata.PaginationGenerator(t, uint64(count)).Draw(t, "pagination"), } - res, err := suite.queryClient.DenomsMetadata(suite.ctx, req) - suite.Require().NoError(err) - suite.Require().NotNil(res) - suite.runDenomsMetadataIterations(req, res) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.DenomsMetadata, 0, true) }) suite.SetupTest() // reset suite.bankKeeper.SetDenomMetaData(suite.ctx, metadataAtom) - suite.runDenomsMetadataIterations( - &banktypes.QueryDenomsMetadataRequest{}, - &banktypes.QueryDenomsMetadataResponse{Metadatas: []banktypes.Metadata{metadataAtom}, Pagination: &query.PageResponse{Total: 1}}, - ) -} - -func (suite *DeterministicTestSuite) runDenomMetadataIterations(denom string, prevRes banktypes.Metadata) { - for i := 0; i < iterCount; i++ { - res, err := suite.queryClient.DenomMetadata(suite.ctx, &banktypes.QueryDenomMetadataRequest{ - Denom: denom, - }) - - suite.Require().NoError(err) - suite.Require().NotNil(res) - suite.Require().Equal(res.GetMetadata(), prevRes) - } + req := &banktypes.QueryDenomsMetadataRequest{} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.DenomsMetadata, 660, false) } func (suite *DeterministicTestSuite) TestGRPCDenomMetadata() { @@ -444,21 +342,21 @@ func (suite *DeterministicTestSuite) TestGRPCDenomMetadata() { denomMetadata := suite.createAndReturnMetadatas(t, 1) suite.Require().Len(denomMetadata, 1) suite.bankKeeper.SetDenomMetaData(suite.ctx, denomMetadata[0]) - suite.runDenomMetadataIterations(denomMetadata[0].Base, denomMetadata[0]) + + req := &banktypes.QueryDenomMetadataRequest{ + Denom: denomMetadata[0].Base, + } + + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.DenomMetadata, 0, true) }) suite.bankKeeper.SetDenomMetaData(suite.ctx, metadataAtom) - suite.runDenomMetadataIterations(metadataAtom.Base, metadataAtom) -} -func (suite *DeterministicTestSuite) runSendEnabledIterations(req *banktypes.QuerySendEnabledRequest, prevRes *banktypes.QuerySendEnabledResponse) { - for i := 0; i < iterCount; i++ { - res, err := suite.queryClient.SendEnabled(suite.ctx, req) - suite.Require().NoError(err) - suite.Require().NotNil(res) - - suite.Require().Equal(prevRes, res) + req := &banktypes.QueryDenomMetadataRequest{ + Denom: metadataAtom.Base, } + + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.DenomMetadata, 1300, false) } func (suite *DeterministicTestSuite) TestGRPCSendEnabled() { @@ -485,10 +383,7 @@ func (suite *DeterministicTestSuite) TestGRPCSendEnabled() { // Pagination is only taken into account when `denoms` is an empty array Pagination: testdata.PaginationGenerator(t, uint64(len(allDenoms))).Draw(t, "pagination"), } - res, err := suite.queryClient.SendEnabled(suite.ctx, req) - suite.Require().NoError(err) - - suite.runSendEnabledIterations(req, res) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.SendEnabled, 0, true) }) coin1 := banktypes.SendEnabled{ @@ -503,19 +398,11 @@ func (suite *DeterministicTestSuite) TestGRPCSendEnabled() { suite.bankKeeper.SetSendEnabled(suite.ctx, coin1.Denom, false) suite.bankKeeper.SetSendEnabled(suite.ctx, coin2.Denom, true) - suite.runSendEnabledIterations( - &banktypes.QuerySendEnabledRequest{Denoms: []string{coin1.Denom, coin2.Denom}}, - &banktypes.QuerySendEnabledResponse{SendEnabled: []*banktypes.SendEnabled{&coin1, &coin2}}, - ) -} - -func (suite *DeterministicTestSuite) runDenomOwnerIterations(req *banktypes.QueryDenomOwnersRequest, prevRes *banktypes.QueryDenomOwnersResponse) { - for i := 0; i < iterCount; i++ { - res, err := suite.queryClient.DenomOwners(suite.ctx, req) - - suite.Require().NoError(err) - suite.Require().Equal(prevRes, res) + req := &banktypes.QuerySendEnabledRequest{ + Denoms: []string{coin1.GetDenom(), coin2.GetDenom()}, } + + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.SendEnabled, 4063, false) } func (suite *DeterministicTestSuite) TestGRPCDenomOwners() { @@ -538,10 +425,7 @@ func (suite *DeterministicTestSuite) TestGRPCDenomOwners() { Denom: denom, Pagination: testdata.PaginationGenerator(t, uint64(numAddr)).Draw(t, "pagination"), } - res, err := suite.queryClient.DenomOwners(suite.ctx, req) - suite.Require().NoError(err) - - suite.runDenomOwnerIterations(req, res) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.DenomOwners, 0, true) }) denomOwners := []*banktypes.DenomOwner{ @@ -563,8 +447,8 @@ func (suite *DeterministicTestSuite) TestGRPCDenomOwners() { suite.Require().NoError(err) } - suite.runDenomOwnerIterations( - &banktypes.QueryDenomOwnersRequest{Denom: coin1.Denom}, - &banktypes.QueryDenomOwnersResponse{DenomOwners: denomOwners, Pagination: &query.PageResponse{Total: 2}}, - ) + req := &banktypes.QueryDenomOwnersRequest{ + Denom: coin1.GetDenom(), + } + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.DenomOwners, 2525, false) } diff --git a/tests/integration/bank/keeper/keeper_test.go b/tests/integration/bank/keeper/keeper_test.go index a1e1d741017f..4d93f9d765b4 100644 --- a/tests/integration/bank/keeper/keeper_test.go +++ b/tests/integration/bank/keeper/keeper_test.go @@ -37,7 +37,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/bank/keeper" "github.com/cosmos/cosmos-sdk/x/bank/testutil" "github.com/cosmos/cosmos-sdk/x/bank/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" ) @@ -1616,11 +1615,11 @@ func (suite *IntegrationTestSuite) TestGetAllSendEnabledEntries() { } type mockSubspace struct { - ps banktypes.Params + ps types.Params } func (ms mockSubspace) GetParamSet(ctx sdk.Context, ps exported.ParamSet) { - *ps.(*banktypes.Params) = ms.ps + *ps.(*types.Params) = ms.ps } func (suite *IntegrationTestSuite) TestMigrator_Migrate3to4() { @@ -1632,7 +1631,7 @@ func (suite *IntegrationTestSuite) TestMigrator_Migrate3to4() { suite.T().Run(fmt.Sprintf("default %t does not change", def), func(t *testing.T) { legacySubspace := func(ps types.Params) mockSubspace { return mockSubspace{ps: ps} - }(banktypes.NewParams(def)) + }(types.NewParams(def)) migrator := keeper.NewMigrator(bankKeeper, legacySubspace) require.NoError(t, migrator.Migrate3to4(ctx)) actual := bankKeeper.GetParams(ctx) @@ -1651,7 +1650,7 @@ func (suite *IntegrationTestSuite) TestMigrator_Migrate3to4() { suite.T().Run(fmt.Sprintf("default %t send enabled info moved to store", def), func(t *testing.T) { legacySubspace := func(ps types.Params) mockSubspace { return mockSubspace{ps: ps} - }(banktypes.NewParams(def)) + }(types.NewParams(def)) migrator := keeper.NewMigrator(bankKeeper, legacySubspace) require.NoError(t, migrator.Migrate3to4(ctx)) newParams := bankKeeper.GetParams(ctx) diff --git a/tests/integration/staking/keeper/determinstic_test.go b/tests/integration/staking/keeper/determinstic_test.go index e9f0aaf0f574..7d5e4b8a5df8 100644 --- a/tests/integration/staking/keeper/determinstic_test.go +++ b/tests/integration/staking/keeper/determinstic_test.go @@ -60,7 +60,8 @@ func (s *DeterministicTestSuite) SetupTest() { ) s.Require().NoError(err) - s.ctx = app.BaseApp.NewContext(false, tmproto.Header{Height: 1, Time: time.Now()}).WithGasMeter(sdk.NewInfiniteGasMeter()) + // s.ctx = app.BaseApp.NewContext(false, tmproto.Header{Height: 1, Time: time.Now()}).WithGasMeter(sdk.NewInfiniteGasMeter()) + s.ctx = app.BaseApp.NewContext(false, tmproto.Header{}) queryHelper := baseapp.NewQueryServerTestHelper(s.ctx, interfaceRegistry) stakingtypes.RegisterQueryServer(queryHelper, stakingkeeper.Querier{Keeper: s.stakingKeeper}) @@ -241,21 +242,6 @@ func (suite *DeterministicTestSuite) fundAccountAndDelegate(delegator sdk.AccAdd return shares, err } -func (suite *DeterministicTestSuite) runValidatorIterations( - req *stakingtypes.QueryValidatorRequest, - prevValRes *stakingtypes.QueryValidatorResponse, - gasConsumed uint64, -) { - for i := 0; i < 1000; i++ { - before := suite.ctx.GasMeter().GasConsumed() - res, err := suite.queryClient.Validator(suite.ctx, req) - suite.Require().Equal(suite.ctx.GasMeter().GasConsumed()-before, gasConsumed) - - suite.Require().NoError(err) - suite.Require().Equal(res, prevValRes) - } -} - func (suite *DeterministicTestSuite) TestGRPCValidator() { rapid.Check(suite.T(), func(t *rapid.T) { val := suite.createAndSetValidator(t) @@ -263,35 +249,16 @@ func (suite *DeterministicTestSuite) TestGRPCValidator() { ValidatorAddr: val.OperatorAddress, } - before := suite.ctx.GasMeter().GasConsumed() - res, err := suite.queryClient.Validator(suite.ctx, req) - suite.Require().NoError(err) - - suite.runValidatorIterations(req, res, suite.ctx.GasMeter().GasConsumed()-before) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.Validator, 0, true) }) + suite.SetupTest() // reset val := suite.getStaticValidator() req := &stakingtypes.QueryValidatorRequest{ ValidatorAddr: val.OperatorAddress, } - before := suite.ctx.GasMeter().GasConsumed() - res, err := suite.queryClient.Validator(suite.ctx, req) - suite.Require().NoError(err) - - suite.runValidatorIterations(req, res, suite.ctx.GasMeter().GasConsumed()-before) -} - -func (suite *DeterministicTestSuite) runValidatorsIterations( - req *stakingtypes.QueryValidatorsRequest, - prevRes *stakingtypes.QueryValidatorsResponse, -) { - for i := 0; i < 1000; i++ { - res, err := suite.queryClient.Validators(suite.ctx, req) - suite.Require().NoError(err) - suite.Require().NotNil(res) - suite.Require().Equal(res, prevRes) - } + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.Validator, 1915, false) } func (suite *DeterministicTestSuite) TestGRPCValidators() { @@ -306,30 +273,15 @@ func (suite *DeterministicTestSuite) TestGRPCValidators() { Status: validatorStatus[rapid.IntRange(0, 3).Draw(t, "status")], Pagination: testdata.PaginationGenerator(t, uint64(valsCount)).Draw(t, "pagination"), } - res, err := suite.queryClient.Validators(suite.ctx, req) - suite.Require().NoError(err) - suite.runValidatorsIterations(req, res) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.Validators, 0, true) }) suite.SetupTest() // reset suite.getStaticValidator() suite.getStaticValidator2() - req := &stakingtypes.QueryValidatorsRequest{} - res, err := suite.queryClient.Validators(suite.ctx, req) - suite.Require().NoError(err) - - suite.runValidatorsIterations(req, res) -} - -func (suite *DeterministicTestSuite) runValidatorDelegationsIterations(req *stakingtypes.QueryValidatorDelegationsRequest, prevDels *stakingtypes.QueryValidatorDelegationsResponse) { - for i := 0; i < 1000; i++ { - res, err := suite.queryClient.ValidatorDelegations(suite.ctx, req) - suite.Require().NoError(err) - - suite.Require().Equal(res, prevDels) - } + testdata.DeterministicIterations(suite.ctx, suite.Require(), &stakingtypes.QueryValidatorsRequest{}, suite.queryClient.Validators, 3525, false) } func (suite *DeterministicTestSuite) TestGRPCValidatorDelegations() { @@ -348,9 +300,7 @@ func (suite *DeterministicTestSuite) TestGRPCValidatorDelegations() { Pagination: testdata.PaginationGenerator(t, uint64(numDels)).Draw(t, "pagination"), } - res, err := suite.queryClient.ValidatorDelegations(suite.ctx, req) - suite.Require().NoError(err) - suite.runValidatorDelegationsIterations(req, res) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.ValidatorDelegations, 0, true) }) suite.SetupTest() // reset @@ -367,17 +317,7 @@ func (suite *DeterministicTestSuite) TestGRPCValidatorDelegations() { ValidatorAddr: validator.OperatorAddress, } - res, err := suite.queryClient.ValidatorDelegations(suite.ctx, req) - suite.Require().NoError(err) - suite.runValidatorDelegationsIterations(req, res) -} - -func (suite *DeterministicTestSuite) runValidatorUnbondingDelegationsIterations(req *stakingtypes.QueryValidatorUnbondingDelegationsRequest, prevRes *stakingtypes.QueryValidatorUnbondingDelegationsResponse) { - for i := 0; i < 1000; i++ { - res, err := suite.queryClient.ValidatorUnbondingDelegations(suite.ctx, req) - suite.Require().NoError(err) - suite.Require().Equal(res, prevRes) - } + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.ValidatorDelegations, 11985, false) } func (suite *DeterministicTestSuite) TestGRPCValidatorUnbondingDelegations() { @@ -398,10 +338,8 @@ func (suite *DeterministicTestSuite) TestGRPCValidatorUnbondingDelegations() { ValidatorAddr: validator.OperatorAddress, Pagination: testdata.PaginationGenerator(t, uint64(numDels)).Draw(t, "pagination"), } - res, err := suite.queryClient.ValidatorUnbondingDelegations(suite.ctx, req) - suite.Require().NoError(err) - suite.runValidatorUnbondingDelegationsIterations(req, res) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.ValidatorUnbondingDelegations, 0, true) }) suite.SetupTest() // reset @@ -422,18 +360,8 @@ func (suite *DeterministicTestSuite) TestGRPCValidatorUnbondingDelegations() { req := &stakingtypes.QueryValidatorUnbondingDelegationsRequest{ ValidatorAddr: validator.OperatorAddress, } - res, err := suite.queryClient.ValidatorUnbondingDelegations(suite.ctx, req) - suite.Require().NoError(err) - suite.runValidatorUnbondingDelegationsIterations(req, res) -} - -func (suite *DeterministicTestSuite) runDelegationIteratons(req *stakingtypes.QueryDelegationRequest, prevRes *stakingtypes.QueryDelegationResponse) { - for i := 0; i < 1000; i++ { - res, err := suite.queryClient.Delegation(suite.ctx, req) - suite.Require().NoError(err) - suite.Require().Equal(res, prevRes) - } + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.ValidatorUnbondingDelegations, 3719, false) } func (suite *DeterministicTestSuite) TestGRPCDelegation() { @@ -448,9 +376,7 @@ func (suite *DeterministicTestSuite) TestGRPCDelegation() { DelegatorAddr: delegator.String(), } - res, err := suite.queryClient.Delegation(suite.ctx, req) - suite.Require().NoError(err) - suite.runDelegationIteratons(req, res) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.Delegation, 0, true) }) suite.SetupTest() // reset @@ -464,17 +390,7 @@ func (suite *DeterministicTestSuite) TestGRPCDelegation() { DelegatorAddr: delegator1, } - res, err := suite.queryClient.Delegation(suite.ctx, req) - suite.Require().NoError(err) - suite.runDelegationIteratons(req, res) -} - -func (suite *DeterministicTestSuite) runUnbondingDelegationIterations(req *stakingtypes.QueryUnbondingDelegationRequest, prevRes *stakingtypes.QueryUnbondingDelegationResponse) { - for i := 0; i < 1000; i++ { - res, err := suite.queryClient.UnbondingDelegation(suite.ctx, req) - suite.Require().NoError(err) - suite.Require().Equal(res, prevRes) - } + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.Delegation, 4635, false) } func (suite *DeterministicTestSuite) TestGRPCUnbondingDelegation() { @@ -491,10 +407,8 @@ func (suite *DeterministicTestSuite) TestGRPCUnbondingDelegation() { ValidatorAddr: validator.OperatorAddress, DelegatorAddr: delegator.String(), } - res, err := suite.queryClient.UnbondingDelegation(suite.ctx, req) - suite.Require().NoError(err) - suite.runUnbondingDelegationIterations(req, res) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.UnbondingDelegation, 0, true) }) suite.SetupTest() // reset @@ -510,19 +424,8 @@ func (suite *DeterministicTestSuite) TestGRPCUnbondingDelegation() { ValidatorAddr: validator.OperatorAddress, DelegatorAddr: delegator1, } - res, err := suite.queryClient.UnbondingDelegation(suite.ctx, req) - suite.Require().NoError(err) - - suite.runUnbondingDelegationIterations(req, res) -} - -func (suite *DeterministicTestSuite) runDelegatorDelegationsIterations(req *stakingtypes.QueryDelegatorDelegationsRequest, prevDels *stakingtypes.QueryDelegatorDelegationsResponse) { - for i := 0; i < 1000; i++ { - res, err := suite.queryClient.DelegatorDelegations(suite.ctx, req) - suite.Require().NoError(err) - suite.Require().Equal(res, prevDels) - } + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.UnbondingDelegation, 1621, false) } func (suite *DeterministicTestSuite) TestGRPCDelegatorDelegations() { @@ -541,9 +444,7 @@ func (suite *DeterministicTestSuite) TestGRPCDelegatorDelegations() { Pagination: testdata.PaginationGenerator(t, uint64(numVals)).Draw(t, "pagination"), } - res, err := suite.queryClient.DelegatorDelegations(suite.ctx, req) - suite.Require().NoError(err) - suite.runDelegatorDelegationsIterations(req, res) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.DelegatorDelegations, 0, true) }) suite.SetupTest() // reset @@ -556,18 +457,7 @@ func (suite *DeterministicTestSuite) TestGRPCDelegatorDelegations() { DelegatorAddr: delegator1, } - res, err := suite.queryClient.DelegatorDelegations(suite.ctx, req) - suite.Require().NoError(err) - suite.runDelegatorDelegationsIterations(req, res) -} - -func (suite *DeterministicTestSuite) runDelegatorValidatorIterations(req *stakingtypes.QueryDelegatorValidatorRequest, prevDels *stakingtypes.QueryDelegatorValidatorResponse) { - for i := 0; i < 1000; i++ { - res, err := suite.queryClient.DelegatorValidator(suite.ctx, req) - suite.Require().NoError(err) - - suite.Require().Equal(res, prevDels) - } + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.DelegatorDelegations, 4238, false) } func (suite *DeterministicTestSuite) TestGRPCDelegatorValidator() { @@ -583,9 +473,7 @@ func (suite *DeterministicTestSuite) TestGRPCDelegatorValidator() { ValidatorAddr: validator.OperatorAddress, } - res, err := suite.queryClient.DelegatorValidator(suite.ctx, req) - suite.Require().NoError(err) - suite.runDelegatorValidatorIterations(req, res) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.DelegatorValidator, 0, true) }) suite.SetupTest() // reset @@ -600,17 +488,7 @@ func (suite *DeterministicTestSuite) TestGRPCDelegatorValidator() { ValidatorAddr: validator.OperatorAddress, } - res, err := suite.queryClient.DelegatorValidator(suite.ctx, req) - suite.Require().NoError(err) - suite.runDelegatorValidatorIterations(req, res) -} - -func (suite *DeterministicTestSuite) runDelegatorUnbondingDelegationsIterations(req *stakingtypes.QueryDelegatorUnbondingDelegationsRequest, prevRes *stakingtypes.QueryDelegatorUnbondingDelegationsResponse) { - for i := 0; i < 1000; i++ { - res, err := suite.queryClient.DelegatorUnbondingDelegations(suite.ctx, req) - suite.Require().NoError(err) - suite.Require().Equal(res, prevRes) - } + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.DelegatorValidator, 3563, false) } func (suite *DeterministicTestSuite) TestGRPCDelegatorUnbondingDelegations() { @@ -631,10 +509,8 @@ func (suite *DeterministicTestSuite) TestGRPCDelegatorUnbondingDelegations() { DelegatorAddr: delegator.String(), Pagination: testdata.PaginationGenerator(t, uint64(numVals)).Draw(t, "pagination"), } - res, err := suite.queryClient.DelegatorUnbondingDelegations(suite.ctx, req) - suite.Require().NoError(err) - suite.runDelegatorUnbondingDelegationsIterations(req, res) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.DelegatorUnbondingDelegations, 0, true) }) suite.SetupTest() // reset @@ -649,18 +525,8 @@ func (suite *DeterministicTestSuite) TestGRPCDelegatorUnbondingDelegations() { req := &stakingtypes.QueryDelegatorUnbondingDelegationsRequest{ DelegatorAddr: delegator1, } - res, err := suite.queryClient.DelegatorUnbondingDelegations(suite.ctx, req) - suite.Require().NoError(err) - - suite.runDelegatorUnbondingDelegationsIterations(req, res) -} -func (suite *DeterministicTestSuite) runHistoricalInfoIterations(req *stakingtypes.QueryHistoricalInfoRequest, prevRes *stakingtypes.QueryHistoricalInfoResponse) { - for i := 0; i < 1000; i++ { - res, err := suite.queryClient.HistoricalInfo(suite.ctx, req) - suite.Require().NoError(err) - suite.Require().Equal(res, prevRes) - } + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.DelegatorUnbondingDelegations, 1302, false) } func (suite *DeterministicTestSuite) TestGRPCHistoricalInfo() { @@ -688,10 +554,8 @@ func (suite *DeterministicTestSuite) TestGRPCHistoricalInfo() { req := &stakingtypes.QueryHistoricalInfoRequest{ Height: height, } - res, err := suite.queryClient.HistoricalInfo(suite.ctx, req) - suite.Require().NoError(err) - suite.runHistoricalInfoIterations(req, res) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.HistoricalInfo, 0, true) }) suite.SetupTest() // reset @@ -714,19 +578,8 @@ func (suite *DeterministicTestSuite) TestGRPCHistoricalInfo() { req := &stakingtypes.QueryHistoricalInfoRequest{ Height: height, } - res, err := suite.queryClient.HistoricalInfo(suite.ctx, req) - suite.Require().NoError(err) - suite.runHistoricalInfoIterations(req, res) -} - -func (suite *DeterministicTestSuite) runDelegatorValidatorsIterations(req *stakingtypes.QueryDelegatorValidatorsRequest, prevDels *stakingtypes.QueryDelegatorValidatorsResponse) { - for i := 0; i < 1000; i++ { - res, err := suite.queryClient.DelegatorValidators(suite.ctx, req) - suite.Require().NoError(err) - - suite.Require().Equal(res, prevDels) - } + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.HistoricalInfo, 1930, false) } func (suite *DeterministicTestSuite) TestGRPCDelegatorValidators() { @@ -745,9 +598,7 @@ func (suite *DeterministicTestSuite) TestGRPCDelegatorValidators() { Pagination: testdata.PaginationGenerator(t, uint64(numVals)).Draw(t, "pagination"), } - res, err := suite.queryClient.DelegatorValidators(suite.ctx, req) - suite.Require().NoError(err) - suite.runDelegatorValidatorsIterations(req, res) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.DelegatorValidators, 0, true) }) suite.SetupTest() // reset @@ -757,52 +608,20 @@ func (suite *DeterministicTestSuite) TestGRPCDelegatorValidators() { _, err := suite.fundAccountAndDelegate(delegatorAddr1, validator, suite.amt1) suite.Require().NoError(err) - req := &stakingtypes.QueryDelegatorValidatorsRequest{ - DelegatorAddr: delegator1, - } - - res, err := suite.queryClient.DelegatorValidators(suite.ctx, req) - suite.Require().NoError(err) - suite.runDelegatorValidatorsIterations(req, res) -} - -func (suite *DeterministicTestSuite) runPoolIterations(req *stakingtypes.QueryPoolRequest, prevDels *stakingtypes.QueryPoolResponse) { - for i := 0; i < 1000; i++ { - res, err := suite.queryClient.Pool(suite.ctx, req) - suite.Require().NoError(err) - - suite.Require().Equal(res, prevDels) - } + req := &stakingtypes.QueryDelegatorValidatorsRequest{DelegatorAddr: delegator1} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.DelegatorValidators, 3166, false) } func (suite *DeterministicTestSuite) TestGRPCPool() { rapid.Check(suite.T(), func(t *rapid.T) { suite.createAndSetValidator(t) - req := &stakingtypes.QueryPoolRequest{} - res, err := suite.queryClient.Pool(suite.ctx, req) - suite.Require().NoError(err) - - suite.runPoolIterations(req, res) + testdata.DeterministicIterations(suite.ctx, suite.Require(), &stakingtypes.QueryPoolRequest{}, suite.queryClient.Pool, 0, true) }) suite.SetupTest() // reset suite.getStaticValidator() - - req := &stakingtypes.QueryPoolRequest{} - - res, err := suite.queryClient.Pool(suite.ctx, req) - suite.Require().NoError(err) - suite.runPoolIterations(req, res) -} - -func (suite *DeterministicTestSuite) runRedelegationsIterations(req *stakingtypes.QueryRedelegationsRequest, prevDels *stakingtypes.QueryRedelegationsResponse) { - for i := 0; i < 1000; i++ { - res, err := suite.queryClient.Redelegations(suite.ctx, req) - suite.Require().NoError(err) - - suite.Require().Equal(res, prevDels) - } + testdata.DeterministicIterations(suite.ctx, suite.Require(), &stakingtypes.QueryPoolRequest{}, suite.queryClient.Pool, 6185, false) } func (suite *DeterministicTestSuite) TestGRPCRedelegations() { @@ -845,14 +664,10 @@ func (suite *DeterministicTestSuite) TestGRPCRedelegations() { } req.Pagination = testdata.PaginationGenerator(t, uint64(numDels)).Draw(t, "pagination") - - res, err := suite.queryClient.Redelegations(suite.ctx, req) - suite.Require().NoError(err) - suite.runRedelegationsIterations(req, res) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.Redelegations, 0, true) }) suite.SetupTest() // reset - validator := suite.getStaticValidator() _ = suite.getStaticValidator2() @@ -868,20 +683,7 @@ func (suite *DeterministicTestSuite) TestGRPCRedelegations() { DstValidatorAddr: validator2, } - res, err := suite.queryClient.Redelegations(suite.ctx, req) - suite.Require().NoError(err) - suite.runRedelegationsIterations(req, res) -} - -func (suite *DeterministicTestSuite) runParamsIterations(prevParams stakingtypes.Params) { - for i := 0; i < 1000; i++ { - res, err := suite.queryClient.Params(suite.ctx, &stakingtypes.QueryParamsRequest{}) - suite.Require().NoError(err) - suite.Require().NotNil(res) - - suite.Require().Equal(res.Params, prevParams) - prevParams = res.Params - } + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.Redelegations, 3920, false) } func (suite *DeterministicTestSuite) TestGRPCParams() { @@ -898,7 +700,7 @@ func (suite *DeterministicTestSuite) TestGRPCParams() { err := suite.stakingKeeper.SetParams(suite.ctx, params) suite.Require().NoError(err) - suite.runParamsIterations(params) + testdata.DeterministicIterations(suite.ctx, suite.Require(), &stakingtypes.QueryParamsRequest{}, suite.queryClient.Params, 0, true) }) params := stakingtypes.Params{ @@ -913,5 +715,5 @@ func (suite *DeterministicTestSuite) TestGRPCParams() { err := suite.stakingKeeper.SetParams(suite.ctx, params) suite.Require().NoError(err) - suite.runParamsIterations(params) + testdata.DeterministicIterations(suite.ctx, suite.Require(), &stakingtypes.QueryParamsRequest{}, suite.queryClient.Params, 1114, false) } diff --git a/testutil/testdata/grpc_query.go b/testutil/testdata/grpc_query.go index d4f34319d3c5..85c14f7f1a50 100644 --- a/testutil/testdata/grpc_query.go +++ b/testutil/testdata/grpc_query.go @@ -5,8 +5,17 @@ import ( "fmt" "github.com/cosmos/gogoproto/proto" + "github.com/stretchr/testify/require" + grpc "google.golang.org/grpc" "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +var ( + // iterCount defines the number of iterations to run on each query to test + // determinism. + iterCount = 1000 ) type QueryImpl struct{} @@ -51,3 +60,33 @@ var _ types.UnpackInterfacesMessage = &TestAnyResponse{} func (m *TestAnyResponse) UnpackInterfaces(unpacker types.AnyUnpacker) error { return m.HasAnimal.UnpackInterfaces(unpacker) } + +// DeterministicIterations is a function to handle deterministic query requests. It tests 2 things: +// 1. That the response is always the same when calling the +// grpc query `iterCount` times (defaults to 1000). +// 2. That the gas consumption of the query is the same. When +// `gasOverwrite` is set to true, we also check that this consumed +// gas value is equal to the hardcoded `gasConsumed`. +func DeterministicIterations[request proto.Message, response proto.Message]( + ctx sdk.Context, + require *require.Assertions, + req request, + grpcFn func(context.Context, request, ...grpc.CallOption) (response, error), + gasConsumed uint64, + gasOverwrite bool, +) { + before := ctx.GasMeter().GasConsumed() + prevRes, err := grpcFn(ctx, req) + require.NoError(err) + if gasOverwrite { // to handle regressions, i.e. check that gas consumption didn't change + gasConsumed = ctx.GasMeter().GasConsumed() - before + } + + for i := 0; i < iterCount; i++ { + before := ctx.GasMeter().GasConsumed() + res, err := grpcFn(ctx, req) + require.Equal(ctx.GasMeter().GasConsumed()-before, gasConsumed) + require.NoError(err) + require.Equal(res, prevRes) + } +} diff --git a/x/auth/keeper/deterministic_test.go b/x/auth/keeper/deterministic_test.go index 30b58af74630..d5f90ac79e32 100644 --- a/x/auth/keeper/deterministic_test.go +++ b/x/auth/keeper/deterministic_test.go @@ -10,7 +10,6 @@ import ( "pgregory.net/rapid" "github.com/cosmos/cosmos-sdk/baseapp" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/cosmos/cosmos-sdk/testutil" @@ -34,9 +33,8 @@ type DeterministicTestSuite struct { } var ( - iterCount = 1000 - addr = sdk.MustAccAddressFromBech32("cosmos1j364pjm8jkxxmujj0vp2xjg0y7w8tyveuamfm6") - pub, _ = hex.DecodeString("01090C02812F010C25200ED40E004105160196E801F70005070EA21603FF06001E") + addr = sdk.MustAccAddressFromBech32("cosmos1j364pjm8jkxxmujj0vp2xjg0y7w8tyveuamfm6") + pub, _ = hex.DecodeString("01090C02812F010C25200ED40E004105160196E801F70005070EA21603FF06001E") ) func TestDeterministicTestSuite(t *testing.T) { @@ -46,6 +44,7 @@ func TestDeterministicTestSuite(t *testing.T) { func (suite *DeterministicTestSuite) SetupTest() { suite.encCfg = moduletestutil.MakeTestEncodingConfig(auth.AppModuleBasic{}) + suite.Require() key := sdk.NewKVStoreKey(types.StoreKey) testCtx := testutil.DefaultContextWithDB(suite.T(), key, sdk.NewTransientStoreKey("transient_test")) suite.ctx = testCtx.Ctx.WithBlockHeader(tmproto.Header{}) @@ -97,22 +96,12 @@ func (suite *DeterministicTestSuite) createAndSetAccounts(t *rapid.T, count int) return accs } -func (suite *DeterministicTestSuite) runAccountIterations(addr sdk.AccAddress, prevRes *codectypes.Any) { - for i := 0; i < iterCount; i++ { - acc, err := suite.queryClient.Account(suite.ctx, &types.QueryAccountRequest{Address: addr.String()}) - suite.Require().NoError(err) - suite.Require().NotNil(acc) - suite.Require().Equal(acc.Account, prevRes) - } -} - func (suite *DeterministicTestSuite) TestGRPCQueryAccount() { rapid.Check(suite.T(), func(t *rapid.T) { accs := suite.createAndSetAccounts(t, 1) - suite.Require().Len(accs, 1) - any, err := codectypes.NewAnyWithValue(accs[0]) - suite.Require().NoError(err) - suite.runAccountIterations(accs[0].GetAddress(), any) + + req := &types.QueryAccountRequest{Address: accs[0].GetAddress().String()} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.Account, 0, true) }) // Regression tests @@ -122,10 +111,9 @@ func (suite *DeterministicTestSuite) TestGRPCQueryAccount() { acc1 := types.NewBaseAccount(addr, &secp256k1.PubKey{Key: pub}, accNum, seq) suite.accountKeeper.SetAccount(suite.ctx, acc1) - any, err := codectypes.NewAnyWithValue(acc1) - suite.Require().NoError(err) + req := &types.QueryAccountRequest{Address: acc1.GetAddress().String()} - suite.runAccountIterations(addr, any) + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.Account, 1543, false) } // pubkeyGenerator creates and returns a random pubkey generator using rapid. @@ -136,30 +124,13 @@ func pubkeyGenerator(t *rapid.T) *rapid.Generator[secp256k1.PubKey] { }) } -func (suite *DeterministicTestSuite) runAccountsIterations(req *types.QueryAccountsRequest, prevRes *types.QueryAccountsResponse) { - for i := 0; i < iterCount; i++ { - res, err := suite.queryClient.Accounts(suite.ctx, req) - suite.Require().NoError(err) - suite.Require().NotNil(res) - - suite.Require().Len(res.GetAccounts(), len(prevRes.GetAccounts())) - suite.Require().Equal(res, prevRes) - } -} - func (suite *DeterministicTestSuite) TestGRPCQueryAccounts() { rapid.Check(suite.T(), func(t *rapid.T) { numAccs := rapid.IntRange(1, 10).Draw(t, "accounts") accs := suite.createAndSetAccounts(t, numAccs) - req := types.QueryAccountsRequest{ - Pagination: testdata.PaginationGenerator(t, uint64(numAccs)).Draw(t, "accounts"), - } - - res, err := suite.queryClient.Accounts(suite.ctx, &req) - suite.Require().NoError(err) - - suite.runAccountsIterations(&req, res) + req := &types.QueryAccountsRequest{Pagination: testdata.PaginationGenerator(t, uint64(numAccs)).Draw(t, "accounts")} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.Accounts, 0, true) for i := 0; i < numAccs; i++ { suite.accountKeeper.RemoveAccount(suite.ctx, accs[i]) @@ -183,20 +154,8 @@ func (suite *DeterministicTestSuite) TestGRPCQueryAccounts() { suite.accountKeeper.SetAccount(suite.ctx, acc1) suite.accountKeeper.SetAccount(suite.ctx, acc2) - req := types.QueryAccountsRequest{} - res, err := suite.queryClient.Accounts(suite.ctx, &req) - suite.Require().NoError(err) - - suite.runAccountsIterations(&req, res) -} - -func (suite *DeterministicTestSuite) runAccountAddressByIDIterations(id int64, prevRes string) { - for i := 0; i < iterCount; i++ { - res, err := suite.queryClient.AccountAddressByID(suite.ctx, &types.QueryAccountAddressByIDRequest{Id: id}) - suite.Require().NoError(err) - suite.Require().NotNil(res) - suite.Require().Equal(res.AccountAddress, prevRes) - } + req := &types.QueryAccountsRequest{} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.Accounts, 1716, false) } func (suite *DeterministicTestSuite) TestGRPCQueryAccountAddressByID() { @@ -210,7 +169,8 @@ func (suite *DeterministicTestSuite) TestGRPCQueryAccountAddressByID() { acc1 := types.NewBaseAccount(addr, &pub, uint64(accNum), seq) suite.accountKeeper.SetAccount(suite.ctx, acc1) - suite.runAccountAddressByIDIterations(accNum, addr.String()) + req := &types.QueryAccountAddressByIDRequest{Id: accNum} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.AccountAddressByID, 0, true) }) // Regression test @@ -220,17 +180,8 @@ func (suite *DeterministicTestSuite) TestGRPCQueryAccountAddressByID() { acc1 := types.NewBaseAccount(addr, &secp256k1.PubKey{Key: pub}, uint64(accNum), seq) suite.accountKeeper.SetAccount(suite.ctx, acc1) - suite.runAccountAddressByIDIterations(accNum, addr.String()) -} - -func (suite *DeterministicTestSuite) runParamsIterations(prevRes types.Params) { - for i := 0; i < iterCount; i++ { - res, err := suite.queryClient.Params(suite.ctx, &types.QueryParamsRequest{}) - suite.Require().NoError(err) - suite.Require().NotNil(res) - - suite.Require().Equal(res.Params, prevRes) - } + req := &types.QueryAccountAddressByIDRequest{Id: accNum} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.AccountAddressByID, 1123, false) } func (suite *DeterministicTestSuite) TestGRPCQueryParameters() { @@ -242,11 +193,11 @@ func (suite *DeterministicTestSuite) TestGRPCQueryParameters() { rapid.Uint64Min(1).Draw(t, "sig-verify-cost-ed25519"), rapid.Uint64Min(1).Draw(t, "sig-verify-cost-Secp256k1"), ) - err := suite.accountKeeper.SetParams(suite.ctx, params) suite.Require().NoError(err) - suite.runParamsIterations(params) + req := &types.QueryParamsRequest{} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.Params, 0, true) }) // Regression test @@ -255,22 +206,8 @@ func (suite *DeterministicTestSuite) TestGRPCQueryParameters() { err := suite.accountKeeper.SetParams(suite.ctx, params) suite.Require().NoError(err) - suite.runParamsIterations(params) -} - -func (suite *DeterministicTestSuite) runAccountInfoIterations(addr sdk.AccAddress, prevRes *types.BaseAccount) { - for i := 0; i < iterCount; i++ { - res, err := suite.queryClient.AccountInfo(suite.ctx, &types.QueryAccountInfoRequest{Address: addr.String()}) - suite.Require().NoError(err) - suite.Require().NotNil(res) - suite.Require().NotNil(res.Info) - - suite.Require().Equal(res.GetInfo().Address, prevRes.Address) - suite.Require().True(res.GetInfo().PubKey.Equal(prevRes.PubKey)) - suite.Require().Equal(res.GetInfo().AccountNumber, prevRes.AccountNumber) - suite.Require().Equal(res.GetInfo().Sequence, prevRes.Sequence) - - } + req := &types.QueryParamsRequest{} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.Params, 1042, false) } func (suite *DeterministicTestSuite) TestGRPCQueryAccountInfo() { @@ -278,20 +215,19 @@ func (suite *DeterministicTestSuite) TestGRPCQueryAccountInfo() { accs := suite.createAndSetAccounts(t, 1) suite.Require().Len(accs, 1) - acc, ok := accs[0].(*types.BaseAccount) - suite.Require().True(ok) - - suite.runAccountInfoIterations(acc.GetAddress(), acc) + req := &types.QueryAccountInfoRequest{Address: accs[0].GetAddress().String()} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.AccountInfo, 0, true) }) // Regression test accNum := uint64(10087) seq := uint64(10) - acc1 := types.NewBaseAccount(addr, &secp256k1.PubKey{Key: pub}, accNum, seq) + acc := types.NewBaseAccount(addr, &secp256k1.PubKey{Key: pub}, accNum, seq) - suite.accountKeeper.SetAccount(suite.ctx, acc1) - suite.runAccountInfoIterations(addr, acc1) + suite.accountKeeper.SetAccount(suite.ctx, acc) + req := &types.QueryAccountInfoRequest{Address: acc.GetAddress().String()} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.AccountInfo, 1543, false) } func (suite *DeterministicTestSuite) createAndReturnQueryClient(ak keeper.AccountKeeper) types.QueryClient { @@ -300,18 +236,6 @@ func (suite *DeterministicTestSuite) createAndReturnQueryClient(ak keeper.Accoun return types.NewQueryClient(queryHelper) } -func (suite *DeterministicTestSuite) runBech32PrefixIterations(ak keeper.AccountKeeper, preRes string) { - queryClient := suite.createAndReturnQueryClient(ak) - - for i := 0; i < iterCount; i++ { - res, err := queryClient.Bech32Prefix(suite.ctx, &types.Bech32PrefixRequest{}) - suite.Require().NoError(err) - suite.Require().NotNil(res) - - suite.Require().Equal(res.Bech32Prefix, preRes) - } -} - func (suite *DeterministicTestSuite) TestGRPCQueryBech32Prefix() { rapid.Check(suite.T(), func(t *rapid.T) { prefix := rapid.StringMatching(`[a-zA-Z]+[1-9a-zA-Z]*`).Draw(t, "prefix") @@ -324,54 +248,37 @@ func (suite *DeterministicTestSuite) TestGRPCQueryBech32Prefix() { types.NewModuleAddress("gov").String(), ) - suite.runBech32PrefixIterations(ak, prefix) + queryClient := suite.createAndReturnQueryClient(ak) + req := &types.Bech32PrefixRequest{} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, queryClient.Bech32Prefix, 0, true) }) - suite.runBech32PrefixIterations(suite.accountKeeper, "cosmos") -} - -func (suite *DeterministicTestSuite) runAddressBytesToStringIterations(addressBytes []byte, prevRes string) { - for i := 0; i < iterCount; i++ { - res, err := suite.queryClient.AddressBytesToString(suite.ctx, &types.AddressBytesToStringRequest{ - AddressBytes: addressBytes, - }) - - suite.Require().NoError(err) - suite.Require().NotNil(res) - - suite.Require().Equal(res.AddressString, prevRes) - } + req := &types.Bech32PrefixRequest{} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.Bech32Prefix, 0, false) } func (suite *DeterministicTestSuite) TestGRPCQueryAddressBytesToString() { rapid.Check(suite.T(), func(t *rapid.T) { address := testdata.AddressGenerator(t).Draw(t, "address-bytes") - suite.runAddressBytesToStringIterations(address.Bytes(), address.String()) - }) - - suite.runAddressBytesToStringIterations(addr.Bytes(), addr.String()) -} - -func (suite *DeterministicTestSuite) runStringToAddressBytesIterations(addressString string, prevRes []byte) { - for i := 0; i < iterCount; i++ { - res, err := suite.queryClient.AddressStringToBytes(suite.ctx, &types.AddressStringToBytesRequest{ - AddressString: addressString, - }) - suite.Require().NoError(err) - suite.Require().NotNil(res) + req := &types.AddressBytesToStringRequest{AddressBytes: address.Bytes()} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.AddressBytesToString, 0, true) + }) - suite.Require().Equal(res.AddressBytes, prevRes) - } + req := &types.AddressBytesToStringRequest{AddressBytes: addr.Bytes()} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.AddressBytesToString, 0, false) } func (suite *DeterministicTestSuite) TestGRPCQueryAddressStringToBytes() { rapid.Check(suite.T(), func(t *rapid.T) { address := testdata.AddressGenerator(t).Draw(t, "address-string") - suite.runStringToAddressBytesIterations(address.String(), address.Bytes()) + + req := &types.AddressStringToBytesRequest{AddressString: address.String()} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.AddressStringToBytes, 0, true) }) - suite.runStringToAddressBytesIterations(addr.String(), addr.Bytes()) + req := &types.AddressStringToBytesRequest{AddressString: addr.String()} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.AddressStringToBytes, 0, false) } func (suite *DeterministicTestSuite) setModuleAccounts( @@ -389,34 +296,6 @@ func (suite *DeterministicTestSuite) setModuleAccounts( return moduleAccounts } -func (suite *DeterministicTestSuite) runModuleAccountsIterations(ak keeper.AccountKeeper, prevRes []types.AccountI) { - queryClient := suite.createAndReturnQueryClient(ak) - for i := 0; i < iterCount; i++ { - res, err := queryClient.ModuleAccounts(suite.ctx, &types.QueryModuleAccountsRequest{}) - suite.Require().NoError(err) - suite.Require().NotNil(res) - suite.Require().NotNil(res.Accounts) - suite.Require().Len(res.Accounts, len(prevRes)) - - unpackedAccs := make([]types.AccountI, len(res.Accounts)) - for i := 0; i < len(res.Accounts); i++ { - var account types.AccountI - err = suite.encCfg.InterfaceRegistry.UnpackAny(res.Accounts[i], &account) - suite.Require().NoError(err) - - unpackedAccs[i] = account - } - - if prevRes != nil { - for i := 0; i < len(prevRes); i++ { - suite.Require().Equal(unpackedAccs[i].GetAddress(), prevRes[i].GetAddress()) - suite.Require().Equal(unpackedAccs[i].GetAccountNumber(), prevRes[i].GetAccountNumber()) - suite.Require().Equal(unpackedAccs[i].GetSequence(), prevRes[i].GetSequence()) - } - } - } -} - func (suite *DeterministicTestSuite) TestGRPCQueryModuleAccounts() { permissions := []string{"burner", "minter", "staking", "random"} @@ -453,13 +332,11 @@ func (suite *DeterministicTestSuite) TestGRPCQueryModuleAccounts() { "cosmos", types.NewModuleAddress("gov").String(), ) + suite.setModuleAccounts(suite.ctx, ak, maccs) - storedMaccs := suite.setModuleAccounts(suite.ctx, ak, maccs) - - suite.runModuleAccountsIterations(ak, storedMaccs) - for i := 0; i < len(storedMaccs); i++ { - suite.accountKeeper.RemoveAccount(suite.ctx, storedMaccs[i]) - } + queryClient := suite.createAndReturnQueryClient(ak) + req := &types.QueryModuleAccountsRequest{} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, queryClient.ModuleAccounts, 0, true) }) maccs := make([]string, 0, len(suite.maccPerms)) @@ -467,7 +344,9 @@ func (suite *DeterministicTestSuite) TestGRPCQueryModuleAccounts() { maccs = append(maccs, k) } - sort.Strings(maccs) - storedMaccs := suite.setModuleAccounts(suite.ctx, suite.accountKeeper, maccs) - suite.runModuleAccountsIterations(suite.accountKeeper, storedMaccs) + suite.setModuleAccounts(suite.ctx, suite.accountKeeper, maccs) + + queryClient := suite.createAndReturnQueryClient(suite.accountKeeper) + req := &types.QueryModuleAccountsRequest{} + testdata.DeterministicIterations(suite.ctx, suite.Require(), req, queryClient.ModuleAccounts, 0x2175, false) } From a1b8ec2a2cbdc03fde50e8135d90ae194c05c850 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Tue, 25 Oct 2022 05:17:30 -0400 Subject: [PATCH 22/26] feat: add autocli service proto (#13597) * feat: add autocli service proto * protogen * protogen * move to cosmos.reflection.v1 * docs * proto gen * proto lint * Update proto/cosmos/autocli/v1/service.proto Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> * address review comments Co-authored-by: Marko Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> --- api/cosmos/autocli/v1/options.pulsar.go | 205 ++- api/cosmos/autocli/v1/service.pulsar.go | 1260 +++++++++++++++++ api/cosmos/autocli/v1/service_grpc.pb.go | 107 ++ api/cosmos/nft/v1beta1/tx.pulsar.go | 9 +- api/cosmos/query/v1/query.pulsar.go | 3 +- api/cosmos/reflection/v1/reflection.pulsar.go | 1260 +++++++++++++++++ .../reflection/v1/reflection_grpc.pb.go | 109 ++ api/cosmos/tx/v1beta1/service.pulsar.go | 9 +- proto/cosmos/autocli/v1/options.proto | 2 - proto/cosmos/autocli/v1/query.proto | 28 + proto/cosmos/reflection/v1/reflection.proto | 35 + 11 files changed, 2909 insertions(+), 118 deletions(-) create mode 100644 api/cosmos/autocli/v1/service.pulsar.go create mode 100644 api/cosmos/autocli/v1/service_grpc.pb.go create mode 100644 api/cosmos/reflection/v1/reflection.pulsar.go create mode 100644 api/cosmos/reflection/v1/reflection_grpc.pb.go create mode 100644 proto/cosmos/autocli/v1/query.proto create mode 100644 proto/cosmos/reflection/v1/reflection.proto diff --git a/api/cosmos/autocli/v1/options.pulsar.go b/api/cosmos/autocli/v1/options.pulsar.go index 227c194d03c4..bc175f979e1d 100644 --- a/api/cosmos/autocli/v1/options.pulsar.go +++ b/api/cosmos/autocli/v1/options.pulsar.go @@ -7,7 +7,6 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/descriptorpb" io "io" reflect "reflect" sort "sort" @@ -4740,109 +4739,107 @@ var file_cosmos_autocli_v1_options_proto_rawDesc = []byte{ 0x0a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, - 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x01, 0x0a, 0x0d, 0x4d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3b, 0x0a, 0x02, 0x74, 0x78, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, - 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x52, 0x02, 0x74, 0x78, 0x12, 0x41, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, - 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0xd8, 0x02, 0x0a, 0x18, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x54, 0x0a, 0x13, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x70, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x11, 0x72, 0x70, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5f, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x5f, 0x63, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x44, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x53, 0x75, 0x62, 0x43, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x43, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x1a, 0x6b, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x43, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x41, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x44, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0x9c, 0x04, 0x0a, 0x11, 0x52, 0x70, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x70, 0x63, - 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, - 0x70, 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x73, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, - 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x6f, 0x6e, 0x67, 0x12, 0x14, - 0x0a, 0x05, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, - 0x68, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, - 0x6c, 0x69, 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x5f, - 0x66, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x67, 0x67, 0x65, - 0x73, 0x74, 0x46, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x58, 0x0a, 0x0c, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x70, 0x63, 0x43, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x6c, 0x61, 0x67, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x66, 0x6c, - 0x61, 0x67, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x53, 0x0a, 0x0f, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x72, 0x67, 0x73, 0x18, 0x0b, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x6f, - 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, - 0x6c, 0x41, 0x72, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0e, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x12, 0x12, - 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x73, 0x6b, - 0x69, 0x70, 0x1a, 0x5e, 0x0a, 0x10, 0x46, 0x6c, 0x61, 0x67, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x67, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x96, 0x02, 0x0a, 0x0b, 0x46, 0x6c, 0x61, 0x67, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x68, - 0x61, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x68, 0x6f, 0x72, 0x74, - 0x68, 0x61, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x2f, 0x0a, 0x14, 0x6e, 0x6f, 0x5f, 0x6f, 0x70, 0x74, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6e, - 0x6f, 0x4f, 0x70, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x12, 0x31, 0x0a, 0x14, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x68, 0x61, 0x6e, 0x64, 0x5f, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, - 0x73, 0x68, 0x6f, 0x72, 0x74, 0x68, 0x61, 0x6e, 0x64, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x22, 0x54, 0x0a, 0x17, 0x50, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x72, 0x67, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x61, 0x72, 0x61, 0x72, - 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x61, 0x72, 0x61, 0x72, 0x67, - 0x73, 0x42, 0xb9, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2f, 0x76, 0x31, 0x3b, - 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, - 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, - 0x6f, 0x63, 0x6c, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x2e, 0x76, 0x31, 0x22, 0x8f, 0x01, 0x0a, 0x0d, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3b, 0x0a, 0x02, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x6f, + 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, + 0x02, 0x74, 0x78, 0x12, 0x41, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x6f, + 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, + 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0xd8, 0x02, 0x0a, 0x18, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x54, 0x0a, + 0x13, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x70, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x11, 0x72, 0x70, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x5f, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x53, 0x75, 0x62, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x43, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x73, 0x1a, 0x6b, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x43, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x41, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x9c, 0x04, 0x0a, 0x11, 0x52, 0x70, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x70, 0x63, 0x5f, 0x6d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x70, 0x63, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x73, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x6e, 0x67, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x6f, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x68, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x6f, + 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, + 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x5f, 0x66, 0x6f, + 0x72, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, + 0x46, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, + 0x0c, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0a, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x70, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x6c, 0x61, 0x67, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x66, 0x6c, 0x61, 0x67, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x53, 0x0a, 0x0f, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x72, 0x67, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x41, + 0x72, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0e, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x73, 0x6b, 0x69, 0x70, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x73, 0x6b, 0x69, 0x70, + 0x1a, 0x5e, 0x0a, 0x10, 0x46, 0x6c, 0x61, 0x67, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x67, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x96, 0x02, 0x0a, 0x0b, 0x46, 0x6c, 0x61, 0x67, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x68, 0x61, 0x6e, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x68, 0x61, + 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2f, 0x0a, + 0x14, 0x6e, 0x6f, 0x5f, 0x6f, 0x70, 0x74, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6e, 0x6f, 0x4f, + 0x70, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1e, + 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x31, + 0x0a, 0x14, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x68, 0x61, 0x6e, 0x64, 0x5f, 0x64, 0x65, 0x70, 0x72, + 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x68, + 0x6f, 0x72, 0x74, 0x68, 0x61, 0x6e, 0x64, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x06, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x22, 0x54, 0x0a, 0x17, 0x50, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x72, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x61, 0x72, 0x61, 0x72, 0x67, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x61, 0x72, 0x61, 0x72, 0x67, 0x73, 0x42, + 0xb9, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x75, + 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x11, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x6f, 0x63, + 0x6c, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, + 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, + 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/autocli/v1/service.pulsar.go b/api/cosmos/autocli/v1/service.pulsar.go new file mode 100644 index 000000000000..852ac5dc3dfd --- /dev/null +++ b/api/cosmos/autocli/v1/service.pulsar.go @@ -0,0 +1,1260 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package autocliv1 + +import ( + _ "cosmossdk.io/api/cosmos/query/v1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sort "sort" + sync "sync" +) + +var ( + md_AppOptionsRequest protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_autocli_v1_service_proto_init() + md_AppOptionsRequest = File_cosmos_autocli_v1_service_proto.Messages().ByName("AppOptionsRequest") +} + +var _ protoreflect.Message = (*fastReflection_AppOptionsRequest)(nil) + +type fastReflection_AppOptionsRequest AppOptionsRequest + +func (x *AppOptionsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_AppOptionsRequest)(x) +} + +func (x *AppOptionsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_autocli_v1_service_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_AppOptionsRequest_messageType fastReflection_AppOptionsRequest_messageType +var _ protoreflect.MessageType = fastReflection_AppOptionsRequest_messageType{} + +type fastReflection_AppOptionsRequest_messageType struct{} + +func (x fastReflection_AppOptionsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_AppOptionsRequest)(nil) +} +func (x fastReflection_AppOptionsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_AppOptionsRequest) +} +func (x fastReflection_AppOptionsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AppOptionsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AppOptionsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_AppOptionsRequest +} + +// 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_AppOptionsRequest) Type() protoreflect.MessageType { + return _fastReflection_AppOptionsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AppOptionsRequest) New() protoreflect.Message { + return new(fastReflection_AppOptionsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AppOptionsRequest) Interface() protoreflect.ProtoMessage { + return (*AppOptionsRequest)(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_AppOptionsRequest) 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_AppOptionsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.autocli.v1.AppOptionsRequest")) + } + panic(fmt.Errorf("message cosmos.autocli.v1.AppOptionsRequest 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_AppOptionsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.autocli.v1.AppOptionsRequest")) + } + panic(fmt.Errorf("message cosmos.autocli.v1.AppOptionsRequest 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_AppOptionsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.autocli.v1.AppOptionsRequest")) + } + panic(fmt.Errorf("message cosmos.autocli.v1.AppOptionsRequest 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_AppOptionsRequest) 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.autocli.v1.AppOptionsRequest")) + } + panic(fmt.Errorf("message cosmos.autocli.v1.AppOptionsRequest 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_AppOptionsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.autocli.v1.AppOptionsRequest")) + } + panic(fmt.Errorf("message cosmos.autocli.v1.AppOptionsRequest 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_AppOptionsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.autocli.v1.AppOptionsRequest")) + } + panic(fmt.Errorf("message cosmos.autocli.v1.AppOptionsRequest 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_AppOptionsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.autocli.v1.AppOptionsRequest", 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_AppOptionsRequest) 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_AppOptionsRequest) 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_AppOptionsRequest) 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_AppOptionsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AppOptionsRequest) + 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().(*AppOptionsRequest) + 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().(*AppOptionsRequest) + 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: AppOptionsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AppOptionsRequest: 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 _ protoreflect.Map = (*_AppOptionsResponse_1_map)(nil) + +type _AppOptionsResponse_1_map struct { + m *map[string]*ModuleOptions +} + +func (x *_AppOptionsResponse_1_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_AppOptionsResponse_1_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { + if x.m == nil { + return + } + for k, v := range *x.m { + mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) + mapValue := protoreflect.ValueOfMessage(v.ProtoReflect()) + if !f(mapKey, mapValue) { + break + } + } +} + +func (x *_AppOptionsResponse_1_map) Has(key protoreflect.MapKey) bool { + if x.m == nil { + return false + } + keyUnwrapped := key.String() + concreteValue := keyUnwrapped + _, ok := (*x.m)[concreteValue] + return ok +} + +func (x *_AppOptionsResponse_1_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_AppOptionsResponse_1_map) Get(key protoreflect.MapKey) protoreflect.Value { + if x.m == nil { + return protoreflect.Value{} + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if !ok { + return protoreflect.Value{} + } + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_AppOptionsResponse_1_map) Set(key protoreflect.MapKey, value protoreflect.Value) { + if !key.IsValid() || !value.IsValid() { + panic("invalid key or value provided") + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ModuleOptions) + (*x.m)[concreteKey] = concreteValue +} + +func (x *_AppOptionsResponse_1_map) Mutable(key protoreflect.MapKey) protoreflect.Value { + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if ok { + return protoreflect.ValueOfMessage(v.ProtoReflect()) + } + newValue := new(ModuleOptions) + (*x.m)[concreteKey] = newValue + return protoreflect.ValueOfMessage(newValue.ProtoReflect()) +} + +func (x *_AppOptionsResponse_1_map) NewValue() protoreflect.Value { + v := new(ModuleOptions) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_AppOptionsResponse_1_map) IsValid() bool { + return x.m != nil +} + +var ( + md_AppOptionsResponse protoreflect.MessageDescriptor + fd_AppOptionsResponse_module_options protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_autocli_v1_service_proto_init() + md_AppOptionsResponse = File_cosmos_autocli_v1_service_proto.Messages().ByName("AppOptionsResponse") + fd_AppOptionsResponse_module_options = md_AppOptionsResponse.Fields().ByName("module_options") +} + +var _ protoreflect.Message = (*fastReflection_AppOptionsResponse)(nil) + +type fastReflection_AppOptionsResponse AppOptionsResponse + +func (x *AppOptionsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_AppOptionsResponse)(x) +} + +func (x *AppOptionsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_autocli_v1_service_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_AppOptionsResponse_messageType fastReflection_AppOptionsResponse_messageType +var _ protoreflect.MessageType = fastReflection_AppOptionsResponse_messageType{} + +type fastReflection_AppOptionsResponse_messageType struct{} + +func (x fastReflection_AppOptionsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_AppOptionsResponse)(nil) +} +func (x fastReflection_AppOptionsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_AppOptionsResponse) +} +func (x fastReflection_AppOptionsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AppOptionsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AppOptionsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_AppOptionsResponse +} + +// 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_AppOptionsResponse) Type() protoreflect.MessageType { + return _fastReflection_AppOptionsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AppOptionsResponse) New() protoreflect.Message { + return new(fastReflection_AppOptionsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AppOptionsResponse) Interface() protoreflect.ProtoMessage { + return (*AppOptionsResponse)(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_AppOptionsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.ModuleOptions) != 0 { + value := protoreflect.ValueOfMap(&_AppOptionsResponse_1_map{m: &x.ModuleOptions}) + if !f(fd_AppOptionsResponse_module_options, 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_AppOptionsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.autocli.v1.AppOptionsResponse.module_options": + return len(x.ModuleOptions) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.autocli.v1.AppOptionsResponse")) + } + panic(fmt.Errorf("message cosmos.autocli.v1.AppOptionsResponse 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_AppOptionsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.autocli.v1.AppOptionsResponse.module_options": + x.ModuleOptions = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.autocli.v1.AppOptionsResponse")) + } + panic(fmt.Errorf("message cosmos.autocli.v1.AppOptionsResponse 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_AppOptionsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.autocli.v1.AppOptionsResponse.module_options": + if len(x.ModuleOptions) == 0 { + return protoreflect.ValueOfMap(&_AppOptionsResponse_1_map{}) + } + mapValue := &_AppOptionsResponse_1_map{m: &x.ModuleOptions} + return protoreflect.ValueOfMap(mapValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.autocli.v1.AppOptionsResponse")) + } + panic(fmt.Errorf("message cosmos.autocli.v1.AppOptionsResponse 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_AppOptionsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.autocli.v1.AppOptionsResponse.module_options": + mv := value.Map() + cmv := mv.(*_AppOptionsResponse_1_map) + x.ModuleOptions = *cmv.m + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.autocli.v1.AppOptionsResponse")) + } + panic(fmt.Errorf("message cosmos.autocli.v1.AppOptionsResponse 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_AppOptionsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.autocli.v1.AppOptionsResponse.module_options": + if x.ModuleOptions == nil { + x.ModuleOptions = make(map[string]*ModuleOptions) + } + value := &_AppOptionsResponse_1_map{m: &x.ModuleOptions} + return protoreflect.ValueOfMap(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.autocli.v1.AppOptionsResponse")) + } + panic(fmt.Errorf("message cosmos.autocli.v1.AppOptionsResponse 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_AppOptionsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.autocli.v1.AppOptionsResponse.module_options": + m := make(map[string]*ModuleOptions) + return protoreflect.ValueOfMap(&_AppOptionsResponse_1_map{m: &m}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.autocli.v1.AppOptionsResponse")) + } + panic(fmt.Errorf("message cosmos.autocli.v1.AppOptionsResponse 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_AppOptionsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.autocli.v1.AppOptionsResponse", 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_AppOptionsResponse) 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_AppOptionsResponse) 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_AppOptionsResponse) 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_AppOptionsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AppOptionsResponse) + 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.ModuleOptions) > 0 { + SiZeMaP := func(k string, v *ModuleOptions) { + l := 0 + if v != nil { + l = options.Size(v) + } + l += 1 + runtime.Sov(uint64(l)) + mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + l + n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) + } + if options.Deterministic { + sortme := make([]string, 0, len(x.ModuleOptions)) + for k := range x.ModuleOptions { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.ModuleOptions[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.ModuleOptions { + SiZeMaP(k, v) + } + } + } + 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().(*AppOptionsResponse) + 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.ModuleOptions) > 0 { + MaRsHaLmAp := func(k string, v *ModuleOptions) (protoiface.MarshalOutput, error) { + baseI := i + encoded, err := options.Marshal(v) + 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 + i -= len(k) + copy(dAtA[i:], k) + i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForModuleOptions := make([]string, 0, len(x.ModuleOptions)) + for k := range x.ModuleOptions { + keysForModuleOptions = append(keysForModuleOptions, string(k)) + } + sort.Slice(keysForModuleOptions, func(i, j int) bool { + return keysForModuleOptions[i] < keysForModuleOptions[j] + }) + for iNdEx := len(keysForModuleOptions) - 1; iNdEx >= 0; iNdEx-- { + v := x.ModuleOptions[string(keysForModuleOptions[iNdEx])] + out, err := MaRsHaLmAp(keysForModuleOptions[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.ModuleOptions { + v := x.ModuleOptions[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } + } + } + 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().(*AppOptionsResponse) + 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: AppOptionsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AppOptionsResponse: 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 ModuleOptions", 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.ModuleOptions == nil { + x.ModuleOptions = make(map[string]*ModuleOptions) + } + var mapkey string + var mapvalue *ModuleOptions + for iNdEx < postIndex { + entryPreIndex := 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) + if fieldNum == 1 { + var stringLenmapkey 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++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapkey > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen 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++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postmsgIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapvalue = &ModuleOptions{} + if err := options.Unmarshal(dAtA[iNdEx:postmsgIndex], mapvalue); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + 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) > postIndex { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + x.ModuleOptions[mapkey] = mapvalue + 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/autocli/v1/service.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) +) + +// AppOptionsRequest is the RemoteInfoService/AppOptions request type. +type AppOptionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AppOptionsRequest) Reset() { + *x = AppOptionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_autocli_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppOptionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppOptionsRequest) ProtoMessage() {} + +// Deprecated: Use AppOptionsRequest.ProtoReflect.Descriptor instead. +func (*AppOptionsRequest) Descriptor() ([]byte, []int) { + return file_cosmos_autocli_v1_service_proto_rawDescGZIP(), []int{0} +} + +// AppOptionsResponse is the RemoteInfoService/AppOptions response type. +type AppOptionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // module_options is a map of module name to autocli module options. + ModuleOptions map[string]*ModuleOptions `protobuf:"bytes,1,rep,name=module_options,json=moduleOptions,proto3" json:"module_options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *AppOptionsResponse) Reset() { + *x = AppOptionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_autocli_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppOptionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppOptionsResponse) ProtoMessage() {} + +// Deprecated: Use AppOptionsResponse.ProtoReflect.Descriptor instead. +func (*AppOptionsResponse) Descriptor() ([]byte, []int) { + return file_cosmos_autocli_v1_service_proto_rawDescGZIP(), []int{1} +} + +func (x *AppOptionsResponse) GetModuleOptions() map[string]*ModuleOptions { + if x != nil { + return x.ModuleOptions + } + return nil +} + +var File_cosmos_autocli_v1_service_proto protoreflect.FileDescriptor + +var file_cosmos_autocli_v1_service_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x11, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, + 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, + 0x6f, 0x63, 0x6c, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x13, 0x0a, 0x11, 0x41, 0x70, 0x70, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xd9, 0x01, 0x0a, 0x12, 0x41, 0x70, 0x70, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, + 0x0a, 0x0e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, + 0x62, 0x0a, 0x12, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x32, 0x75, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x60, 0x0a, 0x0a, 0x41, 0x70, 0x70, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x70, 0x70, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x05, 0x88, 0xe7, 0xb0, 0x2a, 0x00, 0x42, 0xb9, 0x01, 0x0a, 0x15, 0x63, + 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, + 0x69, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, + 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, + 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6c, + 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, 0x63, + 0x6c, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_autocli_v1_service_proto_rawDescOnce sync.Once + file_cosmos_autocli_v1_service_proto_rawDescData = file_cosmos_autocli_v1_service_proto_rawDesc +) + +func file_cosmos_autocli_v1_service_proto_rawDescGZIP() []byte { + file_cosmos_autocli_v1_service_proto_rawDescOnce.Do(func() { + file_cosmos_autocli_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_autocli_v1_service_proto_rawDescData) + }) + return file_cosmos_autocli_v1_service_proto_rawDescData +} + +var file_cosmos_autocli_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_cosmos_autocli_v1_service_proto_goTypes = []interface{}{ + (*AppOptionsRequest)(nil), // 0: cosmos.autocli.v1.AppOptionsRequest + (*AppOptionsResponse)(nil), // 1: cosmos.autocli.v1.AppOptionsResponse + nil, // 2: cosmos.autocli.v1.AppOptionsResponse.ModuleOptionsEntry + (*ModuleOptions)(nil), // 3: cosmos.autocli.v1.ModuleOptions +} +var file_cosmos_autocli_v1_service_proto_depIdxs = []int32{ + 2, // 0: cosmos.autocli.v1.AppOptionsResponse.module_options:type_name -> cosmos.autocli.v1.AppOptionsResponse.ModuleOptionsEntry + 3, // 1: cosmos.autocli.v1.AppOptionsResponse.ModuleOptionsEntry.value:type_name -> cosmos.autocli.v1.ModuleOptions + 0, // 2: cosmos.autocli.v1.RemoteInfoService.AppOptions:input_type -> cosmos.autocli.v1.AppOptionsRequest + 1, // 3: cosmos.autocli.v1.RemoteInfoService.AppOptions:output_type -> cosmos.autocli.v1.AppOptionsResponse + 3, // [3:4] is the sub-list for method output_type + 2, // [2:3] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_cosmos_autocli_v1_service_proto_init() } +func file_cosmos_autocli_v1_service_proto_init() { + if File_cosmos_autocli_v1_service_proto != nil { + return + } + file_cosmos_autocli_v1_options_proto_init() + if !protoimpl.UnsafeEnabled { + file_cosmos_autocli_v1_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppOptionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_autocli_v1_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppOptionsResponse); 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_autocli_v1_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_cosmos_autocli_v1_service_proto_goTypes, + DependencyIndexes: file_cosmos_autocli_v1_service_proto_depIdxs, + MessageInfos: file_cosmos_autocli_v1_service_proto_msgTypes, + }.Build() + File_cosmos_autocli_v1_service_proto = out.File + file_cosmos_autocli_v1_service_proto_rawDesc = nil + file_cosmos_autocli_v1_service_proto_goTypes = nil + file_cosmos_autocli_v1_service_proto_depIdxs = nil +} diff --git a/api/cosmos/autocli/v1/service_grpc.pb.go b/api/cosmos/autocli/v1/service_grpc.pb.go new file mode 100644 index 000000000000..f7022c3c9e04 --- /dev/null +++ b/api/cosmos/autocli/v1/service_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: cosmos/autocli/v1/service.proto + +package autocliv1 + +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 + +// RemoteInfoServiceClient is the client API for RemoteInfoService 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 RemoteInfoServiceClient interface { + // AppOptions returns the autocli options for all of the modules in an app. + AppOptions(ctx context.Context, in *AppOptionsRequest, opts ...grpc.CallOption) (*AppOptionsResponse, error) +} + +type remoteInfoServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewRemoteInfoServiceClient(cc grpc.ClientConnInterface) RemoteInfoServiceClient { + return &remoteInfoServiceClient{cc} +} + +func (c *remoteInfoServiceClient) AppOptions(ctx context.Context, in *AppOptionsRequest, opts ...grpc.CallOption) (*AppOptionsResponse, error) { + out := new(AppOptionsResponse) + err := c.cc.Invoke(ctx, "/cosmos.autocli.v1.RemoteInfoService/AppOptions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RemoteInfoServiceServer is the server API for RemoteInfoService service. +// All implementations must embed UnimplementedRemoteInfoServiceServer +// for forward compatibility +type RemoteInfoServiceServer interface { + // AppOptions returns the autocli options for all of the modules in an app. + AppOptions(context.Context, *AppOptionsRequest) (*AppOptionsResponse, error) + mustEmbedUnimplementedRemoteInfoServiceServer() +} + +// UnimplementedRemoteInfoServiceServer must be embedded to have forward compatible implementations. +type UnimplementedRemoteInfoServiceServer struct { +} + +func (UnimplementedRemoteInfoServiceServer) AppOptions(context.Context, *AppOptionsRequest) (*AppOptionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AppOptions not implemented") +} +func (UnimplementedRemoteInfoServiceServer) mustEmbedUnimplementedRemoteInfoServiceServer() {} + +// UnsafeRemoteInfoServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RemoteInfoServiceServer will +// result in compilation errors. +type UnsafeRemoteInfoServiceServer interface { + mustEmbedUnimplementedRemoteInfoServiceServer() +} + +func RegisterRemoteInfoServiceServer(s grpc.ServiceRegistrar, srv RemoteInfoServiceServer) { + s.RegisterService(&RemoteInfoService_ServiceDesc, srv) +} + +func _RemoteInfoService_AppOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AppOptionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RemoteInfoServiceServer).AppOptions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.autocli.v1.RemoteInfoService/AppOptions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RemoteInfoServiceServer).AppOptions(ctx, req.(*AppOptionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// RemoteInfoService_ServiceDesc is the grpc.ServiceDesc for RemoteInfoService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RemoteInfoService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.autocli.v1.RemoteInfoService", + HandlerType: (*RemoteInfoServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "AppOptions", + Handler: _RemoteInfoService_AppOptions_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/autocli/v1/service.proto", +} diff --git a/api/cosmos/nft/v1beta1/tx.pulsar.go b/api/cosmos/nft/v1beta1/tx.pulsar.go index e3ba0b462e95..246a0a34c1e2 100644 --- a/api/cosmos/nft/v1beta1/tx.pulsar.go +++ b/api/cosmos/nft/v1beta1/tx.pulsar.go @@ -2,17 +2,16 @@ package nftv1beta1 import ( - fmt "fmt" - io "io" - reflect "reflect" - sync "sync" - _ "cosmossdk.io/api/cosmos/msg/v1" + fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" ) var ( diff --git a/api/cosmos/query/v1/query.pulsar.go b/api/cosmos/query/v1/query.pulsar.go index bf8c3c95252e..0c3a26a6f9a9 100644 --- a/api/cosmos/query/v1/query.pulsar.go +++ b/api/cosmos/query/v1/query.pulsar.go @@ -2,11 +2,10 @@ package queryv1 import ( - reflect "reflect" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" ) // Code generated by protoc-gen-go. DO NOT EDIT. diff --git a/api/cosmos/reflection/v1/reflection.pulsar.go b/api/cosmos/reflection/v1/reflection.pulsar.go new file mode 100644 index 000000000000..4654fe580b28 --- /dev/null +++ b/api/cosmos/reflection/v1/reflection.pulsar.go @@ -0,0 +1,1260 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package reflectionv1 + +import ( + v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" + _ "cosmossdk.io/api/cosmos/query/v1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_QueryFileDescriptorsRequest protoreflect.MessageDescriptor + fd_QueryFileDescriptorsRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_reflection_v1_reflection_proto_init() + md_QueryFileDescriptorsRequest = File_cosmos_reflection_v1_reflection_proto.Messages().ByName("QueryFileDescriptorsRequest") + fd_QueryFileDescriptorsRequest_pagination = md_QueryFileDescriptorsRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryFileDescriptorsRequest)(nil) + +type fastReflection_QueryFileDescriptorsRequest QueryFileDescriptorsRequest + +func (x *QueryFileDescriptorsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryFileDescriptorsRequest)(x) +} + +func (x *QueryFileDescriptorsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_reflection_v1_reflection_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_QueryFileDescriptorsRequest_messageType fastReflection_QueryFileDescriptorsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryFileDescriptorsRequest_messageType{} + +type fastReflection_QueryFileDescriptorsRequest_messageType struct{} + +func (x fastReflection_QueryFileDescriptorsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryFileDescriptorsRequest)(nil) +} +func (x fastReflection_QueryFileDescriptorsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryFileDescriptorsRequest) +} +func (x fastReflection_QueryFileDescriptorsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryFileDescriptorsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryFileDescriptorsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryFileDescriptorsRequest +} + +// 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_QueryFileDescriptorsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryFileDescriptorsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryFileDescriptorsRequest) New() protoreflect.Message { + return new(fastReflection_QueryFileDescriptorsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryFileDescriptorsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryFileDescriptorsRequest)(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_QueryFileDescriptorsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryFileDescriptorsRequest_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_QueryFileDescriptorsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.reflection.v1.QueryFileDescriptorsRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.QueryFileDescriptorsRequest")) + } + panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsRequest 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_QueryFileDescriptorsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.reflection.v1.QueryFileDescriptorsRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.QueryFileDescriptorsRequest")) + } + panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsRequest 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_QueryFileDescriptorsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.reflection.v1.QueryFileDescriptorsRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.QueryFileDescriptorsRequest")) + } + panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsRequest 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_QueryFileDescriptorsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.reflection.v1.QueryFileDescriptorsRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.QueryFileDescriptorsRequest")) + } + panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsRequest 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_QueryFileDescriptorsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.reflection.v1.QueryFileDescriptorsRequest.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.reflection.v1.QueryFileDescriptorsRequest")) + } + panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsRequest 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_QueryFileDescriptorsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.reflection.v1.QueryFileDescriptorsRequest.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.reflection.v1.QueryFileDescriptorsRequest")) + } + panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsRequest 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_QueryFileDescriptorsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.reflection.v1.QueryFileDescriptorsRequest", 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_QueryFileDescriptorsRequest) 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_QueryFileDescriptorsRequest) 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_QueryFileDescriptorsRequest) 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_QueryFileDescriptorsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryFileDescriptorsRequest) + 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().(*QueryFileDescriptorsRequest) + 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().(*QueryFileDescriptorsRequest) + 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: QueryFileDescriptorsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryFileDescriptorsRequest: 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 = (*_QueryFileDescriptorsResponse_1_list)(nil) + +type _QueryFileDescriptorsResponse_1_list struct { + list *[]*descriptorpb.FileDescriptorProto +} + +func (x *_QueryFileDescriptorsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryFileDescriptorsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryFileDescriptorsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*descriptorpb.FileDescriptorProto) + (*x.list)[i] = concreteValue +} + +func (x *_QueryFileDescriptorsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*descriptorpb.FileDescriptorProto) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryFileDescriptorsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(descriptorpb.FileDescriptorProto) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryFileDescriptorsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryFileDescriptorsResponse_1_list) NewElement() protoreflect.Value { + v := new(descriptorpb.FileDescriptorProto) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryFileDescriptorsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryFileDescriptorsResponse protoreflect.MessageDescriptor + fd_QueryFileDescriptorsResponse_file protoreflect.FieldDescriptor + fd_QueryFileDescriptorsResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_reflection_v1_reflection_proto_init() + md_QueryFileDescriptorsResponse = File_cosmos_reflection_v1_reflection_proto.Messages().ByName("QueryFileDescriptorsResponse") + fd_QueryFileDescriptorsResponse_file = md_QueryFileDescriptorsResponse.Fields().ByName("file") + fd_QueryFileDescriptorsResponse_pagination = md_QueryFileDescriptorsResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryFileDescriptorsResponse)(nil) + +type fastReflection_QueryFileDescriptorsResponse QueryFileDescriptorsResponse + +func (x *QueryFileDescriptorsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryFileDescriptorsResponse)(x) +} + +func (x *QueryFileDescriptorsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_reflection_v1_reflection_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_QueryFileDescriptorsResponse_messageType fastReflection_QueryFileDescriptorsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryFileDescriptorsResponse_messageType{} + +type fastReflection_QueryFileDescriptorsResponse_messageType struct{} + +func (x fastReflection_QueryFileDescriptorsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryFileDescriptorsResponse)(nil) +} +func (x fastReflection_QueryFileDescriptorsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryFileDescriptorsResponse) +} +func (x fastReflection_QueryFileDescriptorsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryFileDescriptorsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryFileDescriptorsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryFileDescriptorsResponse +} + +// 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_QueryFileDescriptorsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryFileDescriptorsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryFileDescriptorsResponse) New() protoreflect.Message { + return new(fastReflection_QueryFileDescriptorsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryFileDescriptorsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryFileDescriptorsResponse)(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_QueryFileDescriptorsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.File) != 0 { + value := protoreflect.ValueOfList(&_QueryFileDescriptorsResponse_1_list{list: &x.File}) + if !f(fd_QueryFileDescriptorsResponse_file, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryFileDescriptorsResponse_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_QueryFileDescriptorsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.reflection.v1.QueryFileDescriptorsResponse.file": + return len(x.File) != 0 + case "cosmos.reflection.v1.QueryFileDescriptorsResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.QueryFileDescriptorsResponse")) + } + panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsResponse 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_QueryFileDescriptorsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.reflection.v1.QueryFileDescriptorsResponse.file": + x.File = nil + case "cosmos.reflection.v1.QueryFileDescriptorsResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.QueryFileDescriptorsResponse")) + } + panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsResponse 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_QueryFileDescriptorsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.reflection.v1.QueryFileDescriptorsResponse.file": + if len(x.File) == 0 { + return protoreflect.ValueOfList(&_QueryFileDescriptorsResponse_1_list{}) + } + listValue := &_QueryFileDescriptorsResponse_1_list{list: &x.File} + return protoreflect.ValueOfList(listValue) + case "cosmos.reflection.v1.QueryFileDescriptorsResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.QueryFileDescriptorsResponse")) + } + panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsResponse 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_QueryFileDescriptorsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.reflection.v1.QueryFileDescriptorsResponse.file": + lv := value.List() + clv := lv.(*_QueryFileDescriptorsResponse_1_list) + x.File = *clv.list + case "cosmos.reflection.v1.QueryFileDescriptorsResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.QueryFileDescriptorsResponse")) + } + panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsResponse 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_QueryFileDescriptorsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.reflection.v1.QueryFileDescriptorsResponse.file": + if x.File == nil { + x.File = []*descriptorpb.FileDescriptorProto{} + } + value := &_QueryFileDescriptorsResponse_1_list{list: &x.File} + return protoreflect.ValueOfList(value) + case "cosmos.reflection.v1.QueryFileDescriptorsResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.QueryFileDescriptorsResponse")) + } + panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsResponse 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_QueryFileDescriptorsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.reflection.v1.QueryFileDescriptorsResponse.file": + list := []*descriptorpb.FileDescriptorProto{} + return protoreflect.ValueOfList(&_QueryFileDescriptorsResponse_1_list{list: &list}) + case "cosmos.reflection.v1.QueryFileDescriptorsResponse.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.reflection.v1.QueryFileDescriptorsResponse")) + } + panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsResponse 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_QueryFileDescriptorsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.reflection.v1.QueryFileDescriptorsResponse", 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_QueryFileDescriptorsResponse) 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_QueryFileDescriptorsResponse) 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_QueryFileDescriptorsResponse) 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_QueryFileDescriptorsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryFileDescriptorsResponse) + 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.File) > 0 { + for _, e := range x.File { + 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().(*QueryFileDescriptorsResponse) + 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 len(x.File) > 0 { + for iNdEx := len(x.File) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.File[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().(*QueryFileDescriptorsResponse) + 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: QueryFileDescriptorsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryFileDescriptorsResponse: 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 File", 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.File = append(x.File, &descriptorpb.FileDescriptorProto{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.File[len(x.File)-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 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, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/reflection/v1/reflection.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) +) + +// QueryFileDescriptorsRequest is the Query/FileDescriptorSet request type. +type QueryFileDescriptorsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // pagination defines the optional pagination request. + Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryFileDescriptorsRequest) Reset() { + *x = QueryFileDescriptorsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_reflection_v1_reflection_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryFileDescriptorsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryFileDescriptorsRequest) ProtoMessage() {} + +// Deprecated: Use QueryFileDescriptorsRequest.ProtoReflect.Descriptor instead. +func (*QueryFileDescriptorsRequest) Descriptor() ([]byte, []int) { + return file_cosmos_reflection_v1_reflection_proto_rawDescGZIP(), []int{0} +} + +func (x *QueryFileDescriptorsRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryFileDescriptorsResponse is the Query/FileDescriptorSet response type. +type QueryFileDescriptorsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // files is the file descriptors. + File []*descriptorpb.FileDescriptorProto `protobuf:"bytes,1,rep,name=file,proto3" json:"file,omitempty"` + // pagination defines the pagination response. + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryFileDescriptorsResponse) Reset() { + *x = QueryFileDescriptorsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_reflection_v1_reflection_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryFileDescriptorsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryFileDescriptorsResponse) ProtoMessage() {} + +// Deprecated: Use QueryFileDescriptorsResponse.ProtoReflect.Descriptor instead. +func (*QueryFileDescriptorsResponse) Descriptor() ([]byte, []int) { + return file_cosmos_reflection_v1_reflection_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryFileDescriptorsResponse) GetFile() []*descriptorpb.FileDescriptorProto { + if x != nil { + return x.File + } + return nil +} + +func (x *QueryFileDescriptorsResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +var File_cosmos_reflection_v1_reflection_proto protoreflect.FileDescriptor + +var file_cosmos_reflection_v1_reflection_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, + 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 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, 0x22, 0x65, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, + 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, + 0xa1, 0x01, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x38, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 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, 0x32, 0x94, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7f, 0x0a, 0x0f, 0x46, 0x69, 0x6c, + 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x31, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x65, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x05, 0x88, 0xe7, 0xb0, 0x2a, 0x00, 0x42, 0xd1, 0x01, 0x0a, 0x18, 0x63, + 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, + 0x31, 0x3b, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x43, 0x52, 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x52, 0x65, + 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x52, 0x65, 0x66, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, + 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_reflection_v1_reflection_proto_rawDescOnce sync.Once + file_cosmos_reflection_v1_reflection_proto_rawDescData = file_cosmos_reflection_v1_reflection_proto_rawDesc +) + +func file_cosmos_reflection_v1_reflection_proto_rawDescGZIP() []byte { + file_cosmos_reflection_v1_reflection_proto_rawDescOnce.Do(func() { + file_cosmos_reflection_v1_reflection_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_reflection_v1_reflection_proto_rawDescData) + }) + return file_cosmos_reflection_v1_reflection_proto_rawDescData +} + +var file_cosmos_reflection_v1_reflection_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_cosmos_reflection_v1_reflection_proto_goTypes = []interface{}{ + (*QueryFileDescriptorsRequest)(nil), // 0: cosmos.reflection.v1.QueryFileDescriptorsRequest + (*QueryFileDescriptorsResponse)(nil), // 1: cosmos.reflection.v1.QueryFileDescriptorsResponse + (*v1beta1.PageRequest)(nil), // 2: cosmos.base.query.v1beta1.PageRequest + (*descriptorpb.FileDescriptorProto)(nil), // 3: google.protobuf.FileDescriptorProto + (*v1beta1.PageResponse)(nil), // 4: cosmos.base.query.v1beta1.PageResponse +} +var file_cosmos_reflection_v1_reflection_proto_depIdxs = []int32{ + 2, // 0: cosmos.reflection.v1.QueryFileDescriptorsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 3, // 1: cosmos.reflection.v1.QueryFileDescriptorsResponse.file:type_name -> google.protobuf.FileDescriptorProto + 4, // 2: cosmos.reflection.v1.QueryFileDescriptorsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 0, // 3: cosmos.reflection.v1.ReflectionService.FileDescriptors:input_type -> cosmos.reflection.v1.QueryFileDescriptorsRequest + 1, // 4: cosmos.reflection.v1.ReflectionService.FileDescriptors:output_type -> cosmos.reflection.v1.QueryFileDescriptorsResponse + 4, // [4:5] is the sub-list for method output_type + 3, // [3:4] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_cosmos_reflection_v1_reflection_proto_init() } +func file_cosmos_reflection_v1_reflection_proto_init() { + if File_cosmos_reflection_v1_reflection_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cosmos_reflection_v1_reflection_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryFileDescriptorsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_reflection_v1_reflection_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryFileDescriptorsResponse); 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_reflection_v1_reflection_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_cosmos_reflection_v1_reflection_proto_goTypes, + DependencyIndexes: file_cosmos_reflection_v1_reflection_proto_depIdxs, + MessageInfos: file_cosmos_reflection_v1_reflection_proto_msgTypes, + }.Build() + File_cosmos_reflection_v1_reflection_proto = out.File + file_cosmos_reflection_v1_reflection_proto_rawDesc = nil + file_cosmos_reflection_v1_reflection_proto_goTypes = nil + file_cosmos_reflection_v1_reflection_proto_depIdxs = nil +} diff --git a/api/cosmos/reflection/v1/reflection_grpc.pb.go b/api/cosmos/reflection/v1/reflection_grpc.pb.go new file mode 100644 index 000000000000..b78556411859 --- /dev/null +++ b/api/cosmos/reflection/v1/reflection_grpc.pb.go @@ -0,0 +1,109 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: cosmos/reflection/v1/reflection.proto + +package reflectionv1 + +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 + +// ReflectionServiceClient is the client API for ReflectionService 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 ReflectionServiceClient interface { + // FileDescriptors queries all the file descriptors in the app in order + // to enable easier generation of dynamic clients. + FileDescriptors(ctx context.Context, in *QueryFileDescriptorsRequest, opts ...grpc.CallOption) (*QueryFileDescriptorsResponse, error) +} + +type reflectionServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewReflectionServiceClient(cc grpc.ClientConnInterface) ReflectionServiceClient { + return &reflectionServiceClient{cc} +} + +func (c *reflectionServiceClient) FileDescriptors(ctx context.Context, in *QueryFileDescriptorsRequest, opts ...grpc.CallOption) (*QueryFileDescriptorsResponse, error) { + out := new(QueryFileDescriptorsResponse) + err := c.cc.Invoke(ctx, "/cosmos.reflection.v1.ReflectionService/FileDescriptors", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ReflectionServiceServer is the server API for ReflectionService service. +// All implementations must embed UnimplementedReflectionServiceServer +// for forward compatibility +type ReflectionServiceServer interface { + // FileDescriptors queries all the file descriptors in the app in order + // to enable easier generation of dynamic clients. + FileDescriptors(context.Context, *QueryFileDescriptorsRequest) (*QueryFileDescriptorsResponse, error) + mustEmbedUnimplementedReflectionServiceServer() +} + +// UnimplementedReflectionServiceServer must be embedded to have forward compatible implementations. +type UnimplementedReflectionServiceServer struct { +} + +func (UnimplementedReflectionServiceServer) FileDescriptors(context.Context, *QueryFileDescriptorsRequest) (*QueryFileDescriptorsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FileDescriptors not implemented") +} +func (UnimplementedReflectionServiceServer) mustEmbedUnimplementedReflectionServiceServer() {} + +// UnsafeReflectionServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ReflectionServiceServer will +// result in compilation errors. +type UnsafeReflectionServiceServer interface { + mustEmbedUnimplementedReflectionServiceServer() +} + +func RegisterReflectionServiceServer(s grpc.ServiceRegistrar, srv ReflectionServiceServer) { + s.RegisterService(&ReflectionService_ServiceDesc, srv) +} + +func _ReflectionService_FileDescriptors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryFileDescriptorsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReflectionServiceServer).FileDescriptors(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.reflection.v1.ReflectionService/FileDescriptors", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReflectionServiceServer).FileDescriptors(ctx, req.(*QueryFileDescriptorsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ReflectionService_ServiceDesc is the grpc.ServiceDesc for ReflectionService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ReflectionService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.reflection.v1.ReflectionService", + HandlerType: (*ReflectionServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "FileDescriptors", + Handler: _ReflectionService_FileDescriptors_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/reflection/v1/reflection.proto", +} diff --git a/api/cosmos/tx/v1beta1/service.pulsar.go b/api/cosmos/tx/v1beta1/service.pulsar.go index 2e672c58d908..8aa6936cb0c9 100644 --- a/api/cosmos/tx/v1beta1/service.pulsar.go +++ b/api/cosmos/tx/v1beta1/service.pulsar.go @@ -2,19 +2,18 @@ package txv1beta1 import ( - fmt "fmt" - io "io" - reflect "reflect" - sync "sync" - v1beta11 "cosmossdk.io/api/cosmos/base/abci/v1beta1" v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" types "cosmossdk.io/api/tendermint/types" + fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "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" + io "io" + reflect "reflect" + sync "sync" ) var _ protoreflect.List = (*_GetTxsEventRequest_1_list)(nil) diff --git a/proto/cosmos/autocli/v1/options.proto b/proto/cosmos/autocli/v1/options.proto index 9fb73c1aff75..558775128094 100644 --- a/proto/cosmos/autocli/v1/options.proto +++ b/proto/cosmos/autocli/v1/options.proto @@ -2,8 +2,6 @@ syntax = "proto3"; package cosmos.autocli.v1; -import "google/protobuf/descriptor.proto"; - option go_package = "cosmossdk.io/api/cosmos/base/cli/v1;cliv1"; // ModuleOptions describes the CLI options for a Cosmos SDK module. diff --git a/proto/cosmos/autocli/v1/query.proto b/proto/cosmos/autocli/v1/query.proto new file mode 100644 index 000000000000..a998978ef00d --- /dev/null +++ b/proto/cosmos/autocli/v1/query.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; + +package cosmos.autocli.v1; + +import "cosmos/autocli/v1/options.proto"; +import "cosmos/query/v1/query.proto"; + +option go_package = "cosmossdk.io/api/cosmos/base/cli/v1;cliv1"; + +// RemoteInfoService provides clients with the information they need +// to build dynamically CLI clients for remote chains. +service Query { + // AppOptions returns the autocli options for all of the modules in an app. + rpc AppOptions(AppOptionsRequest) returns (AppOptionsResponse) { + // NOTE: autocli options SHOULD NOT be part of consensus and module_query_safe + // should be kept as false. + option (cosmos.query.v1.module_query_safe) = false; + } +} + +// AppOptionsRequest is the RemoteInfoService/AppOptions request type. +message AppOptionsRequest {} + +// AppOptionsResponse is the RemoteInfoService/AppOptions response type. +message AppOptionsResponse { + // module_options is a map of module name to autocli module options. + map module_options = 1; +} diff --git a/proto/cosmos/reflection/v1/reflection.proto b/proto/cosmos/reflection/v1/reflection.proto new file mode 100644 index 000000000000..76f72fad36a7 --- /dev/null +++ b/proto/cosmos/reflection/v1/reflection.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package cosmos.reflection.v1; + +import "google/protobuf/descriptor.proto"; +import "cosmos/query/v1/query.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; + +// Package cosmos.reflection.v1 provides support for inspecting protobuf +// file descriptors. +service ReflectionService { + // FileDescriptors queries all the file descriptors in the app in order + // to enable easier generation of dynamic clients. + rpc FileDescriptors(FileDescriptorsRequest) returns (FileDescriptorsResponse) { + // NOTE: file descriptors SHOULD NOT be part of consensus because they + // include changes to doc commands and module_query_safe should be kept as false. + option (cosmos.query.v1.module_query_safe) = false; + } +} + + +// FileDescriptorsRequest is the Query/FileDescriptors request type. +message FileDescriptorsRequest { + // pagination defines the optional pagination request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// FileDescriptorsResponse is the Query/FileDescriptors response type. +message FileDescriptorsResponse { + // files is the file descriptors. + repeated google.protobuf.FileDescriptorProto file = 1; + + // pagination defines the pagination response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} From 3c238ebc1d73d78834d2dd707a10f4914dbbc9fe Mon Sep 17 00:00:00 2001 From: atheeshp <59333759+atheeshp@users.noreply.github.com> Date: Tue, 25 Oct 2022 16:19:44 +0530 Subject: [PATCH 23/26] chore: remove `module_query_safe` for few auth queries (#13642) --- api/cosmos/auth/v1beta1/query.pulsar.go | 99 ++-- .../v1/{service.pulsar.go => query.pulsar.go} | 139 +++--- api/cosmos/autocli/v1/query_grpc.pb.go | 107 +++++ api/cosmos/autocli/v1/service_grpc.pb.go | 107 ----- api/cosmos/reflection/v1/reflection.pulsar.go | 437 +++++++++--------- .../reflection/v1/reflection_grpc.pb.go | 14 +- proto/cosmos/auth/v1beta1/query.proto | 3 - proto/tendermint/crypto/proof.proto | 2 +- x/auth/keeper/deterministic_test.go | 45 -- x/auth/types/query.pb.go | 133 +++--- 10 files changed, 518 insertions(+), 568 deletions(-) rename api/cosmos/autocli/v1/{service.pulsar.go => query.pulsar.go} (88%) create mode 100644 api/cosmos/autocli/v1/query_grpc.pb.go delete mode 100644 api/cosmos/autocli/v1/service_grpc.pb.go diff --git a/api/cosmos/auth/v1beta1/query.pulsar.go b/api/cosmos/auth/v1beta1/query.pulsar.go index 5f7a90427a7a..cea8222a35fe 100644 --- a/api/cosmos/auth/v1beta1/query.pulsar.go +++ b/api/cosmos/auth/v1beta1/query.pulsar.go @@ -9382,7 +9382,7 @@ var file_cosmos_auth_v1beta1_query_proto_rawDesc = []byte{ 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x04, - 0x69, 0x6e, 0x66, 0x6f, 0x32, 0xfe, 0x0c, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x8d, + 0x69, 0x6e, 0x66, 0x6f, 0x32, 0xef, 0x0c, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x8d, 0x01, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, @@ -9443,63 +9443,62 @@ var file_cosmos_auth_v1beta1_query_proto_rawDesc = []byte{ 0x6e, 0x73, 0x65, 0x22, 0x38, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x8d, 0x01, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x88, 0x01, 0x0a, 0x0c, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x28, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, - 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x12, 0xb5, 0x01, - 0x0a, 0x14, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, + 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x12, 0xb0, 0x01, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x88, 0xe7, 0xb0, - 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, - 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x62, - 0x79, 0x74, 0x65, 0x73, 0x7d, 0x12, 0xb6, 0x01, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x30, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x39, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, - 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x7d, 0x12, 0xa4, - 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2c, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, + 0x67, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x7d, 0x12, 0xb1, 0x01, 0x0a, 0x14, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x79, 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, 0x61, 0x75, 0x74, 0x68, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x2f, 0x7b, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x7d, 0x12, + 0xa4, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x88, 0xe7, + 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x7b, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x42, 0xc5, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x88, 0xe7, 0xb0, - 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x7b, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x7d, 0x42, 0xc5, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x5c, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, - 0x68, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, - 0x41, 0x75, 0x74, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, + 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, 0x74, 0x68, 0x5c, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x75, + 0x74, 0x68, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, + 0x3a, 0x41, 0x75, 0x74, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/cosmos/autocli/v1/service.pulsar.go b/api/cosmos/autocli/v1/query.pulsar.go similarity index 88% rename from api/cosmos/autocli/v1/service.pulsar.go rename to api/cosmos/autocli/v1/query.pulsar.go index 852ac5dc3dfd..ce5f90ba7c69 100644 --- a/api/cosmos/autocli/v1/service.pulsar.go +++ b/api/cosmos/autocli/v1/query.pulsar.go @@ -19,8 +19,8 @@ var ( ) func init() { - file_cosmos_autocli_v1_service_proto_init() - md_AppOptionsRequest = File_cosmos_autocli_v1_service_proto.Messages().ByName("AppOptionsRequest") + file_cosmos_autocli_v1_query_proto_init() + md_AppOptionsRequest = File_cosmos_autocli_v1_query_proto.Messages().ByName("AppOptionsRequest") } var _ protoreflect.Message = (*fastReflection_AppOptionsRequest)(nil) @@ -32,7 +32,7 @@ func (x *AppOptionsRequest) ProtoReflect() protoreflect.Message { } func (x *AppOptionsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_autocli_v1_service_proto_msgTypes[0] + mi := &file_cosmos_autocli_v1_query_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -466,8 +466,8 @@ var ( ) func init() { - file_cosmos_autocli_v1_service_proto_init() - md_AppOptionsResponse = File_cosmos_autocli_v1_service_proto.Messages().ByName("AppOptionsResponse") + file_cosmos_autocli_v1_query_proto_init() + md_AppOptionsResponse = File_cosmos_autocli_v1_query_proto.Messages().ByName("AppOptionsResponse") fd_AppOptionsResponse_module_options = md_AppOptionsResponse.Fields().ByName("module_options") } @@ -480,7 +480,7 @@ func (x *AppOptionsResponse) ProtoReflect() protoreflect.Message { } func (x *AppOptionsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_autocli_v1_service_proto_msgTypes[1] + mi := &file_cosmos_autocli_v1_query_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1056,7 +1056,7 @@ func (x *fastReflection_AppOptionsResponse) ProtoMethods() *protoiface.Methods { // versions: // protoc-gen-go v1.27.0 // protoc (unknown) -// source: cosmos/autocli/v1/service.proto +// source: cosmos/autocli/v1/query.proto const ( // Verify that this generated code is sufficiently up-to-date. @@ -1075,7 +1075,7 @@ type AppOptionsRequest struct { func (x *AppOptionsRequest) Reset() { *x = AppOptionsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_autocli_v1_service_proto_msgTypes[0] + mi := &file_cosmos_autocli_v1_query_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1089,7 +1089,7 @@ func (*AppOptionsRequest) ProtoMessage() {} // Deprecated: Use AppOptionsRequest.ProtoReflect.Descriptor instead. func (*AppOptionsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_autocli_v1_service_proto_rawDescGZIP(), []int{0} + return file_cosmos_autocli_v1_query_proto_rawDescGZIP(), []int{0} } // AppOptionsResponse is the RemoteInfoService/AppOptions response type. @@ -1105,7 +1105,7 @@ type AppOptionsResponse struct { func (x *AppOptionsResponse) Reset() { *x = AppOptionsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_autocli_v1_service_proto_msgTypes[1] + mi := &file_cosmos_autocli_v1_query_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1119,7 +1119,7 @@ func (*AppOptionsResponse) ProtoMessage() {} // Deprecated: Use AppOptionsResponse.ProtoReflect.Descriptor instead. func (*AppOptionsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_autocli_v1_service_proto_rawDescGZIP(), []int{1} + return file_cosmos_autocli_v1_query_proto_rawDescGZIP(), []int{1} } func (x *AppOptionsResponse) GetModuleOptions() map[string]*ModuleOptions { @@ -1129,41 +1129,40 @@ func (x *AppOptionsResponse) GetModuleOptions() map[string]*ModuleOptions { return nil } -var File_cosmos_autocli_v1_service_proto protoreflect.FileDescriptor - -var file_cosmos_autocli_v1_service_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, - 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x11, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, - 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, - 0x6f, 0x63, 0x6c, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x13, 0x0a, 0x11, 0x41, 0x70, 0x70, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xd9, 0x01, 0x0a, 0x12, 0x41, 0x70, 0x70, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, - 0x0a, 0x0e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x0d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, - 0x62, 0x0a, 0x12, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x32, 0x75, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x60, 0x0a, 0x0a, 0x41, 0x70, 0x70, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x70, 0x70, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x05, 0x88, 0xe7, 0xb0, 0x2a, 0x00, 0x42, 0xb9, 0x01, 0x0a, 0x15, 0x63, - 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, - 0x69, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, +var File_cosmos_autocli_v1_query_proto protoreflect.FileDescriptor + +var file_cosmos_autocli_v1_query_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x11, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, + 0x76, 0x31, 0x1a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x63, + 0x6c, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x13, 0x0a, 0x11, 0x41, 0x70, 0x70, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xd9, 0x01, 0x0a, 0x12, 0x41, 0x70, 0x70, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x0e, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, + 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x62, 0x0a, + 0x12, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, + 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x32, 0x69, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x60, 0x0a, 0x0a, 0x41, 0x70, + 0x70, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x05, 0x88, 0xe7, 0xb0, 0x2a, 0x00, 0x42, 0xb7, 0x01, 0x0a, + 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x75, 0x74, 0x6f, + 0x63, 0x6c, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6c, 0x69, @@ -1177,29 +1176,29 @@ var file_cosmos_autocli_v1_service_proto_rawDesc = []byte{ } var ( - file_cosmos_autocli_v1_service_proto_rawDescOnce sync.Once - file_cosmos_autocli_v1_service_proto_rawDescData = file_cosmos_autocli_v1_service_proto_rawDesc + file_cosmos_autocli_v1_query_proto_rawDescOnce sync.Once + file_cosmos_autocli_v1_query_proto_rawDescData = file_cosmos_autocli_v1_query_proto_rawDesc ) -func file_cosmos_autocli_v1_service_proto_rawDescGZIP() []byte { - file_cosmos_autocli_v1_service_proto_rawDescOnce.Do(func() { - file_cosmos_autocli_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_autocli_v1_service_proto_rawDescData) +func file_cosmos_autocli_v1_query_proto_rawDescGZIP() []byte { + file_cosmos_autocli_v1_query_proto_rawDescOnce.Do(func() { + file_cosmos_autocli_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_autocli_v1_query_proto_rawDescData) }) - return file_cosmos_autocli_v1_service_proto_rawDescData + return file_cosmos_autocli_v1_query_proto_rawDescData } -var file_cosmos_autocli_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_cosmos_autocli_v1_service_proto_goTypes = []interface{}{ +var file_cosmos_autocli_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_cosmos_autocli_v1_query_proto_goTypes = []interface{}{ (*AppOptionsRequest)(nil), // 0: cosmos.autocli.v1.AppOptionsRequest (*AppOptionsResponse)(nil), // 1: cosmos.autocli.v1.AppOptionsResponse nil, // 2: cosmos.autocli.v1.AppOptionsResponse.ModuleOptionsEntry (*ModuleOptions)(nil), // 3: cosmos.autocli.v1.ModuleOptions } -var file_cosmos_autocli_v1_service_proto_depIdxs = []int32{ +var file_cosmos_autocli_v1_query_proto_depIdxs = []int32{ 2, // 0: cosmos.autocli.v1.AppOptionsResponse.module_options:type_name -> cosmos.autocli.v1.AppOptionsResponse.ModuleOptionsEntry 3, // 1: cosmos.autocli.v1.AppOptionsResponse.ModuleOptionsEntry.value:type_name -> cosmos.autocli.v1.ModuleOptions - 0, // 2: cosmos.autocli.v1.RemoteInfoService.AppOptions:input_type -> cosmos.autocli.v1.AppOptionsRequest - 1, // 3: cosmos.autocli.v1.RemoteInfoService.AppOptions:output_type -> cosmos.autocli.v1.AppOptionsResponse + 0, // 2: cosmos.autocli.v1.Query.AppOptions:input_type -> cosmos.autocli.v1.AppOptionsRequest + 1, // 3: cosmos.autocli.v1.Query.AppOptions:output_type -> cosmos.autocli.v1.AppOptionsResponse 3, // [3:4] is the sub-list for method output_type 2, // [2:3] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name @@ -1207,14 +1206,14 @@ var file_cosmos_autocli_v1_service_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_cosmos_autocli_v1_service_proto_init() } -func file_cosmos_autocli_v1_service_proto_init() { - if File_cosmos_autocli_v1_service_proto != nil { +func init() { file_cosmos_autocli_v1_query_proto_init() } +func file_cosmos_autocli_v1_query_proto_init() { + if File_cosmos_autocli_v1_query_proto != nil { return } file_cosmos_autocli_v1_options_proto_init() if !protoimpl.UnsafeEnabled { - file_cosmos_autocli_v1_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cosmos_autocli_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AppOptionsRequest); i { case 0: return &v.state @@ -1226,7 +1225,7 @@ func file_cosmos_autocli_v1_service_proto_init() { return nil } } - file_cosmos_autocli_v1_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_cosmos_autocli_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AppOptionsResponse); i { case 0: return &v.state @@ -1243,18 +1242,18 @@ func file_cosmos_autocli_v1_service_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_autocli_v1_service_proto_rawDesc, + RawDescriptor: file_cosmos_autocli_v1_query_proto_rawDesc, NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_cosmos_autocli_v1_service_proto_goTypes, - DependencyIndexes: file_cosmos_autocli_v1_service_proto_depIdxs, - MessageInfos: file_cosmos_autocli_v1_service_proto_msgTypes, + GoTypes: file_cosmos_autocli_v1_query_proto_goTypes, + DependencyIndexes: file_cosmos_autocli_v1_query_proto_depIdxs, + MessageInfos: file_cosmos_autocli_v1_query_proto_msgTypes, }.Build() - File_cosmos_autocli_v1_service_proto = out.File - file_cosmos_autocli_v1_service_proto_rawDesc = nil - file_cosmos_autocli_v1_service_proto_goTypes = nil - file_cosmos_autocli_v1_service_proto_depIdxs = nil + File_cosmos_autocli_v1_query_proto = out.File + file_cosmos_autocli_v1_query_proto_rawDesc = nil + file_cosmos_autocli_v1_query_proto_goTypes = nil + file_cosmos_autocli_v1_query_proto_depIdxs = nil } diff --git a/api/cosmos/autocli/v1/query_grpc.pb.go b/api/cosmos/autocli/v1/query_grpc.pb.go new file mode 100644 index 000000000000..3c8ffe95ff23 --- /dev/null +++ b/api/cosmos/autocli/v1/query_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: cosmos/autocli/v1/query.proto + +package autocliv1 + +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 + +// QueryClient is the client API for Query 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 QueryClient interface { + // AppOptions returns the autocli options for all of the modules in an app. + AppOptions(ctx context.Context, in *AppOptionsRequest, opts ...grpc.CallOption) (*AppOptionsResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) AppOptions(ctx context.Context, in *AppOptionsRequest, opts ...grpc.CallOption) (*AppOptionsResponse, error) { + out := new(AppOptionsResponse) + err := c.cc.Invoke(ctx, "/cosmos.autocli.v1.Query/AppOptions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility +type QueryServer interface { + // AppOptions returns the autocli options for all of the modules in an app. + AppOptions(context.Context, *AppOptionsRequest) (*AppOptionsResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) AppOptions(context.Context, *AppOptionsRequest) (*AppOptionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AppOptions not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_AppOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AppOptionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AppOptions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.autocli.v1.Query/AppOptions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AppOptions(ctx, req.(*AppOptionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.autocli.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "AppOptions", + Handler: _Query_AppOptions_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/autocli/v1/query.proto", +} diff --git a/api/cosmos/autocli/v1/service_grpc.pb.go b/api/cosmos/autocli/v1/service_grpc.pb.go deleted file mode 100644 index f7022c3c9e04..000000000000 --- a/api/cosmos/autocli/v1/service_grpc.pb.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: cosmos/autocli/v1/service.proto - -package autocliv1 - -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 - -// RemoteInfoServiceClient is the client API for RemoteInfoService 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 RemoteInfoServiceClient interface { - // AppOptions returns the autocli options for all of the modules in an app. - AppOptions(ctx context.Context, in *AppOptionsRequest, opts ...grpc.CallOption) (*AppOptionsResponse, error) -} - -type remoteInfoServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewRemoteInfoServiceClient(cc grpc.ClientConnInterface) RemoteInfoServiceClient { - return &remoteInfoServiceClient{cc} -} - -func (c *remoteInfoServiceClient) AppOptions(ctx context.Context, in *AppOptionsRequest, opts ...grpc.CallOption) (*AppOptionsResponse, error) { - out := new(AppOptionsResponse) - err := c.cc.Invoke(ctx, "/cosmos.autocli.v1.RemoteInfoService/AppOptions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// RemoteInfoServiceServer is the server API for RemoteInfoService service. -// All implementations must embed UnimplementedRemoteInfoServiceServer -// for forward compatibility -type RemoteInfoServiceServer interface { - // AppOptions returns the autocli options for all of the modules in an app. - AppOptions(context.Context, *AppOptionsRequest) (*AppOptionsResponse, error) - mustEmbedUnimplementedRemoteInfoServiceServer() -} - -// UnimplementedRemoteInfoServiceServer must be embedded to have forward compatible implementations. -type UnimplementedRemoteInfoServiceServer struct { -} - -func (UnimplementedRemoteInfoServiceServer) AppOptions(context.Context, *AppOptionsRequest) (*AppOptionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AppOptions not implemented") -} -func (UnimplementedRemoteInfoServiceServer) mustEmbedUnimplementedRemoteInfoServiceServer() {} - -// UnsafeRemoteInfoServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to RemoteInfoServiceServer will -// result in compilation errors. -type UnsafeRemoteInfoServiceServer interface { - mustEmbedUnimplementedRemoteInfoServiceServer() -} - -func RegisterRemoteInfoServiceServer(s grpc.ServiceRegistrar, srv RemoteInfoServiceServer) { - s.RegisterService(&RemoteInfoService_ServiceDesc, srv) -} - -func _RemoteInfoService_AppOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AppOptionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RemoteInfoServiceServer).AppOptions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.autocli.v1.RemoteInfoService/AppOptions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RemoteInfoServiceServer).AppOptions(ctx, req.(*AppOptionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// RemoteInfoService_ServiceDesc is the grpc.ServiceDesc for RemoteInfoService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var RemoteInfoService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.autocli.v1.RemoteInfoService", - HandlerType: (*RemoteInfoServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "AppOptions", - Handler: _RemoteInfoService_AppOptions_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/autocli/v1/service.proto", -} diff --git a/api/cosmos/reflection/v1/reflection.pulsar.go b/api/cosmos/reflection/v1/reflection.pulsar.go index 4654fe580b28..24c29f791790 100644 --- a/api/cosmos/reflection/v1/reflection.pulsar.go +++ b/api/cosmos/reflection/v1/reflection.pulsar.go @@ -16,25 +16,25 @@ import ( ) var ( - md_QueryFileDescriptorsRequest protoreflect.MessageDescriptor - fd_QueryFileDescriptorsRequest_pagination protoreflect.FieldDescriptor + md_FileDescriptorsRequest protoreflect.MessageDescriptor + fd_FileDescriptorsRequest_pagination protoreflect.FieldDescriptor ) func init() { file_cosmos_reflection_v1_reflection_proto_init() - md_QueryFileDescriptorsRequest = File_cosmos_reflection_v1_reflection_proto.Messages().ByName("QueryFileDescriptorsRequest") - fd_QueryFileDescriptorsRequest_pagination = md_QueryFileDescriptorsRequest.Fields().ByName("pagination") + md_FileDescriptorsRequest = File_cosmos_reflection_v1_reflection_proto.Messages().ByName("FileDescriptorsRequest") + fd_FileDescriptorsRequest_pagination = md_FileDescriptorsRequest.Fields().ByName("pagination") } -var _ protoreflect.Message = (*fastReflection_QueryFileDescriptorsRequest)(nil) +var _ protoreflect.Message = (*fastReflection_FileDescriptorsRequest)(nil) -type fastReflection_QueryFileDescriptorsRequest QueryFileDescriptorsRequest +type fastReflection_FileDescriptorsRequest FileDescriptorsRequest -func (x *QueryFileDescriptorsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryFileDescriptorsRequest)(x) +func (x *FileDescriptorsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_FileDescriptorsRequest)(x) } -func (x *QueryFileDescriptorsRequest) slowProtoReflect() protoreflect.Message { +func (x *FileDescriptorsRequest) slowProtoReflect() protoreflect.Message { mi := &file_cosmos_reflection_v1_reflection_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46,43 +46,43 @@ func (x *QueryFileDescriptorsRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryFileDescriptorsRequest_messageType fastReflection_QueryFileDescriptorsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryFileDescriptorsRequest_messageType{} +var _fastReflection_FileDescriptorsRequest_messageType fastReflection_FileDescriptorsRequest_messageType +var _ protoreflect.MessageType = fastReflection_FileDescriptorsRequest_messageType{} -type fastReflection_QueryFileDescriptorsRequest_messageType struct{} +type fastReflection_FileDescriptorsRequest_messageType struct{} -func (x fastReflection_QueryFileDescriptorsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryFileDescriptorsRequest)(nil) +func (x fastReflection_FileDescriptorsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_FileDescriptorsRequest)(nil) } -func (x fastReflection_QueryFileDescriptorsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryFileDescriptorsRequest) +func (x fastReflection_FileDescriptorsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_FileDescriptorsRequest) } -func (x fastReflection_QueryFileDescriptorsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryFileDescriptorsRequest +func (x fastReflection_FileDescriptorsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_FileDescriptorsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryFileDescriptorsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryFileDescriptorsRequest +func (x *fastReflection_FileDescriptorsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_FileDescriptorsRequest } // 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_QueryFileDescriptorsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryFileDescriptorsRequest_messageType +func (x *fastReflection_FileDescriptorsRequest) Type() protoreflect.MessageType { + return _fastReflection_FileDescriptorsRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryFileDescriptorsRequest) New() protoreflect.Message { - return new(fastReflection_QueryFileDescriptorsRequest) +func (x *fastReflection_FileDescriptorsRequest) New() protoreflect.Message { + return new(fastReflection_FileDescriptorsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryFileDescriptorsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryFileDescriptorsRequest)(x) +func (x *fastReflection_FileDescriptorsRequest) Interface() protoreflect.ProtoMessage { + return (*FileDescriptorsRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -90,10 +90,10 @@ func (x *fastReflection_QueryFileDescriptorsRequest) Interface() protoreflect.Pr // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryFileDescriptorsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_FileDescriptorsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryFileDescriptorsRequest_pagination, value) { + if !f(fd_FileDescriptorsRequest_pagination, value) { return } } @@ -110,15 +110,15 @@ func (x *fastReflection_QueryFileDescriptorsRequest) Range(f func(protoreflect.F // 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_QueryFileDescriptorsRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_FileDescriptorsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.reflection.v1.QueryFileDescriptorsRequest.pagination": + case "cosmos.reflection.v1.FileDescriptorsRequest.pagination": return x.Pagination != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.QueryFileDescriptorsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.FileDescriptorsRequest")) } - panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.reflection.v1.FileDescriptorsRequest does not contain field %s", fd.FullName())) } } @@ -128,15 +128,15 @@ func (x *fastReflection_QueryFileDescriptorsRequest) Has(fd protoreflect.FieldDe // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryFileDescriptorsRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_FileDescriptorsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.reflection.v1.QueryFileDescriptorsRequest.pagination": + case "cosmos.reflection.v1.FileDescriptorsRequest.pagination": x.Pagination = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.QueryFileDescriptorsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.FileDescriptorsRequest")) } - panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.reflection.v1.FileDescriptorsRequest does not contain field %s", fd.FullName())) } } @@ -146,16 +146,16 @@ func (x *fastReflection_QueryFileDescriptorsRequest) Clear(fd protoreflect.Field // 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_QueryFileDescriptorsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_FileDescriptorsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.reflection.v1.QueryFileDescriptorsRequest.pagination": + case "cosmos.reflection.v1.FileDescriptorsRequest.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.QueryFileDescriptorsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.FileDescriptorsRequest")) } - panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.reflection.v1.FileDescriptorsRequest does not contain field %s", descriptor.FullName())) } } @@ -169,15 +169,15 @@ func (x *fastReflection_QueryFileDescriptorsRequest) Get(descriptor protoreflect // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryFileDescriptorsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_FileDescriptorsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.reflection.v1.QueryFileDescriptorsRequest.pagination": + case "cosmos.reflection.v1.FileDescriptorsRequest.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.QueryFileDescriptorsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.FileDescriptorsRequest")) } - panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.reflection.v1.FileDescriptorsRequest does not contain field %s", fd.FullName())) } } @@ -191,44 +191,44 @@ func (x *fastReflection_QueryFileDescriptorsRequest) Set(fd protoreflect.FieldDe // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryFileDescriptorsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_FileDescriptorsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.reflection.v1.QueryFileDescriptorsRequest.pagination": + case "cosmos.reflection.v1.FileDescriptorsRequest.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.reflection.v1.QueryFileDescriptorsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.FileDescriptorsRequest")) } - panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.reflection.v1.FileDescriptorsRequest 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_QueryFileDescriptorsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_FileDescriptorsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.reflection.v1.QueryFileDescriptorsRequest.pagination": + case "cosmos.reflection.v1.FileDescriptorsRequest.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.reflection.v1.QueryFileDescriptorsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.FileDescriptorsRequest")) } - panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.reflection.v1.FileDescriptorsRequest 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_QueryFileDescriptorsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_FileDescriptorsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.reflection.v1.QueryFileDescriptorsRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.reflection.v1.FileDescriptorsRequest", d.FullName())) } panic("unreachable") } @@ -236,7 +236,7 @@ func (x *fastReflection_QueryFileDescriptorsRequest) WhichOneof(d protoreflect.O // 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_QueryFileDescriptorsRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_FileDescriptorsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -247,7 +247,7 @@ func (x *fastReflection_QueryFileDescriptorsRequest) GetUnknown() protoreflect.R // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryFileDescriptorsRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_FileDescriptorsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -259,7 +259,7 @@ func (x *fastReflection_QueryFileDescriptorsRequest) SetUnknown(fields protorefl // 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_QueryFileDescriptorsRequest) IsValid() bool { +func (x *fastReflection_FileDescriptorsRequest) IsValid() bool { return x != nil } @@ -269,9 +269,9 @@ func (x *fastReflection_QueryFileDescriptorsRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryFileDescriptorsRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_FileDescriptorsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryFileDescriptorsRequest) + x := input.Message.Interface().(*FileDescriptorsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -297,7 +297,7 @@ func (x *fastReflection_QueryFileDescriptorsRequest) ProtoMethods() *protoiface. } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryFileDescriptorsRequest) + x := input.Message.Interface().(*FileDescriptorsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -341,7 +341,7 @@ func (x *fastReflection_QueryFileDescriptorsRequest) ProtoMethods() *protoiface. }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryFileDescriptorsRequest) + x := input.Message.Interface().(*FileDescriptorsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -373,10 +373,10 @@ func (x *fastReflection_QueryFileDescriptorsRequest) ProtoMethods() *protoiface. fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryFileDescriptorsRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FileDescriptorsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryFileDescriptorsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FileDescriptorsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -450,79 +450,79 @@ func (x *fastReflection_QueryFileDescriptorsRequest) ProtoMethods() *protoiface. } } -var _ protoreflect.List = (*_QueryFileDescriptorsResponse_1_list)(nil) +var _ protoreflect.List = (*_FileDescriptorsResponse_1_list)(nil) -type _QueryFileDescriptorsResponse_1_list struct { +type _FileDescriptorsResponse_1_list struct { list *[]*descriptorpb.FileDescriptorProto } -func (x *_QueryFileDescriptorsResponse_1_list) Len() int { +func (x *_FileDescriptorsResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_QueryFileDescriptorsResponse_1_list) Get(i int) protoreflect.Value { +func (x *_FileDescriptorsResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_QueryFileDescriptorsResponse_1_list) Set(i int, value protoreflect.Value) { +func (x *_FileDescriptorsResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*descriptorpb.FileDescriptorProto) (*x.list)[i] = concreteValue } -func (x *_QueryFileDescriptorsResponse_1_list) Append(value protoreflect.Value) { +func (x *_FileDescriptorsResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*descriptorpb.FileDescriptorProto) *x.list = append(*x.list, concreteValue) } -func (x *_QueryFileDescriptorsResponse_1_list) AppendMutable() protoreflect.Value { +func (x *_FileDescriptorsResponse_1_list) AppendMutable() protoreflect.Value { v := new(descriptorpb.FileDescriptorProto) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_QueryFileDescriptorsResponse_1_list) Truncate(n int) { +func (x *_FileDescriptorsResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_QueryFileDescriptorsResponse_1_list) NewElement() protoreflect.Value { +func (x *_FileDescriptorsResponse_1_list) NewElement() protoreflect.Value { v := new(descriptorpb.FileDescriptorProto) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_QueryFileDescriptorsResponse_1_list) IsValid() bool { +func (x *_FileDescriptorsResponse_1_list) IsValid() bool { return x.list != nil } var ( - md_QueryFileDescriptorsResponse protoreflect.MessageDescriptor - fd_QueryFileDescriptorsResponse_file protoreflect.FieldDescriptor - fd_QueryFileDescriptorsResponse_pagination protoreflect.FieldDescriptor + md_FileDescriptorsResponse protoreflect.MessageDescriptor + fd_FileDescriptorsResponse_file protoreflect.FieldDescriptor + fd_FileDescriptorsResponse_pagination protoreflect.FieldDescriptor ) func init() { file_cosmos_reflection_v1_reflection_proto_init() - md_QueryFileDescriptorsResponse = File_cosmos_reflection_v1_reflection_proto.Messages().ByName("QueryFileDescriptorsResponse") - fd_QueryFileDescriptorsResponse_file = md_QueryFileDescriptorsResponse.Fields().ByName("file") - fd_QueryFileDescriptorsResponse_pagination = md_QueryFileDescriptorsResponse.Fields().ByName("pagination") + md_FileDescriptorsResponse = File_cosmos_reflection_v1_reflection_proto.Messages().ByName("FileDescriptorsResponse") + fd_FileDescriptorsResponse_file = md_FileDescriptorsResponse.Fields().ByName("file") + fd_FileDescriptorsResponse_pagination = md_FileDescriptorsResponse.Fields().ByName("pagination") } -var _ protoreflect.Message = (*fastReflection_QueryFileDescriptorsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_FileDescriptorsResponse)(nil) -type fastReflection_QueryFileDescriptorsResponse QueryFileDescriptorsResponse +type fastReflection_FileDescriptorsResponse FileDescriptorsResponse -func (x *QueryFileDescriptorsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryFileDescriptorsResponse)(x) +func (x *FileDescriptorsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_FileDescriptorsResponse)(x) } -func (x *QueryFileDescriptorsResponse) slowProtoReflect() protoreflect.Message { +func (x *FileDescriptorsResponse) slowProtoReflect() protoreflect.Message { mi := &file_cosmos_reflection_v1_reflection_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -534,43 +534,43 @@ func (x *QueryFileDescriptorsResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryFileDescriptorsResponse_messageType fastReflection_QueryFileDescriptorsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryFileDescriptorsResponse_messageType{} +var _fastReflection_FileDescriptorsResponse_messageType fastReflection_FileDescriptorsResponse_messageType +var _ protoreflect.MessageType = fastReflection_FileDescriptorsResponse_messageType{} -type fastReflection_QueryFileDescriptorsResponse_messageType struct{} +type fastReflection_FileDescriptorsResponse_messageType struct{} -func (x fastReflection_QueryFileDescriptorsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryFileDescriptorsResponse)(nil) +func (x fastReflection_FileDescriptorsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_FileDescriptorsResponse)(nil) } -func (x fastReflection_QueryFileDescriptorsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryFileDescriptorsResponse) +func (x fastReflection_FileDescriptorsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_FileDescriptorsResponse) } -func (x fastReflection_QueryFileDescriptorsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryFileDescriptorsResponse +func (x fastReflection_FileDescriptorsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_FileDescriptorsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryFileDescriptorsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryFileDescriptorsResponse +func (x *fastReflection_FileDescriptorsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_FileDescriptorsResponse } // 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_QueryFileDescriptorsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryFileDescriptorsResponse_messageType +func (x *fastReflection_FileDescriptorsResponse) Type() protoreflect.MessageType { + return _fastReflection_FileDescriptorsResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryFileDescriptorsResponse) New() protoreflect.Message { - return new(fastReflection_QueryFileDescriptorsResponse) +func (x *fastReflection_FileDescriptorsResponse) New() protoreflect.Message { + return new(fastReflection_FileDescriptorsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryFileDescriptorsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryFileDescriptorsResponse)(x) +func (x *fastReflection_FileDescriptorsResponse) Interface() protoreflect.ProtoMessage { + return (*FileDescriptorsResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -578,16 +578,16 @@ func (x *fastReflection_QueryFileDescriptorsResponse) Interface() protoreflect.P // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryFileDescriptorsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_FileDescriptorsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.File) != 0 { - value := protoreflect.ValueOfList(&_QueryFileDescriptorsResponse_1_list{list: &x.File}) - if !f(fd_QueryFileDescriptorsResponse_file, value) { + value := protoreflect.ValueOfList(&_FileDescriptorsResponse_1_list{list: &x.File}) + if !f(fd_FileDescriptorsResponse_file, value) { return } } if x.Pagination != nil { value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryFileDescriptorsResponse_pagination, value) { + if !f(fd_FileDescriptorsResponse_pagination, value) { return } } @@ -604,17 +604,17 @@ func (x *fastReflection_QueryFileDescriptorsResponse) Range(f func(protoreflect. // 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_QueryFileDescriptorsResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_FileDescriptorsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.reflection.v1.QueryFileDescriptorsResponse.file": + case "cosmos.reflection.v1.FileDescriptorsResponse.file": return len(x.File) != 0 - case "cosmos.reflection.v1.QueryFileDescriptorsResponse.pagination": + case "cosmos.reflection.v1.FileDescriptorsResponse.pagination": return x.Pagination != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.QueryFileDescriptorsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.FileDescriptorsResponse")) } - panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.reflection.v1.FileDescriptorsResponse does not contain field %s", fd.FullName())) } } @@ -624,17 +624,17 @@ func (x *fastReflection_QueryFileDescriptorsResponse) Has(fd protoreflect.FieldD // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryFileDescriptorsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_FileDescriptorsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.reflection.v1.QueryFileDescriptorsResponse.file": + case "cosmos.reflection.v1.FileDescriptorsResponse.file": x.File = nil - case "cosmos.reflection.v1.QueryFileDescriptorsResponse.pagination": + case "cosmos.reflection.v1.FileDescriptorsResponse.pagination": x.Pagination = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.QueryFileDescriptorsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.FileDescriptorsResponse")) } - panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.reflection.v1.FileDescriptorsResponse does not contain field %s", fd.FullName())) } } @@ -644,22 +644,22 @@ func (x *fastReflection_QueryFileDescriptorsResponse) Clear(fd protoreflect.Fiel // 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_QueryFileDescriptorsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_FileDescriptorsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.reflection.v1.QueryFileDescriptorsResponse.file": + case "cosmos.reflection.v1.FileDescriptorsResponse.file": if len(x.File) == 0 { - return protoreflect.ValueOfList(&_QueryFileDescriptorsResponse_1_list{}) + return protoreflect.ValueOfList(&_FileDescriptorsResponse_1_list{}) } - listValue := &_QueryFileDescriptorsResponse_1_list{list: &x.File} + listValue := &_FileDescriptorsResponse_1_list{list: &x.File} return protoreflect.ValueOfList(listValue) - case "cosmos.reflection.v1.QueryFileDescriptorsResponse.pagination": + case "cosmos.reflection.v1.FileDescriptorsResponse.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.QueryFileDescriptorsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.FileDescriptorsResponse")) } - panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.reflection.v1.FileDescriptorsResponse does not contain field %s", descriptor.FullName())) } } @@ -673,19 +673,19 @@ func (x *fastReflection_QueryFileDescriptorsResponse) Get(descriptor protoreflec // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryFileDescriptorsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_FileDescriptorsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.reflection.v1.QueryFileDescriptorsResponse.file": + case "cosmos.reflection.v1.FileDescriptorsResponse.file": lv := value.List() - clv := lv.(*_QueryFileDescriptorsResponse_1_list) + clv := lv.(*_FileDescriptorsResponse_1_list) x.File = *clv.list - case "cosmos.reflection.v1.QueryFileDescriptorsResponse.pagination": + case "cosmos.reflection.v1.FileDescriptorsResponse.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.QueryFileDescriptorsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.FileDescriptorsResponse")) } - panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.reflection.v1.FileDescriptorsResponse does not contain field %s", fd.FullName())) } } @@ -699,53 +699,53 @@ func (x *fastReflection_QueryFileDescriptorsResponse) Set(fd protoreflect.FieldD // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryFileDescriptorsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_FileDescriptorsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.reflection.v1.QueryFileDescriptorsResponse.file": + case "cosmos.reflection.v1.FileDescriptorsResponse.file": if x.File == nil { x.File = []*descriptorpb.FileDescriptorProto{} } - value := &_QueryFileDescriptorsResponse_1_list{list: &x.File} + value := &_FileDescriptorsResponse_1_list{list: &x.File} return protoreflect.ValueOfList(value) - case "cosmos.reflection.v1.QueryFileDescriptorsResponse.pagination": + case "cosmos.reflection.v1.FileDescriptorsResponse.pagination": if x.Pagination == nil { x.Pagination = new(v1beta1.PageResponse) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.QueryFileDescriptorsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.FileDescriptorsResponse")) } - panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.reflection.v1.FileDescriptorsResponse 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_QueryFileDescriptorsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_FileDescriptorsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.reflection.v1.QueryFileDescriptorsResponse.file": + case "cosmos.reflection.v1.FileDescriptorsResponse.file": list := []*descriptorpb.FileDescriptorProto{} - return protoreflect.ValueOfList(&_QueryFileDescriptorsResponse_1_list{list: &list}) - case "cosmos.reflection.v1.QueryFileDescriptorsResponse.pagination": + return protoreflect.ValueOfList(&_FileDescriptorsResponse_1_list{list: &list}) + case "cosmos.reflection.v1.FileDescriptorsResponse.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.reflection.v1.QueryFileDescriptorsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.reflection.v1.FileDescriptorsResponse")) } - panic(fmt.Errorf("message cosmos.reflection.v1.QueryFileDescriptorsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.reflection.v1.FileDescriptorsResponse 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_QueryFileDescriptorsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_FileDescriptorsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.reflection.v1.QueryFileDescriptorsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.reflection.v1.FileDescriptorsResponse", d.FullName())) } panic("unreachable") } @@ -753,7 +753,7 @@ func (x *fastReflection_QueryFileDescriptorsResponse) WhichOneof(d protoreflect. // 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_QueryFileDescriptorsResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_FileDescriptorsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -764,7 +764,7 @@ func (x *fastReflection_QueryFileDescriptorsResponse) GetUnknown() protoreflect. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryFileDescriptorsResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_FileDescriptorsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -776,7 +776,7 @@ func (x *fastReflection_QueryFileDescriptorsResponse) SetUnknown(fields protoref // 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_QueryFileDescriptorsResponse) IsValid() bool { +func (x *fastReflection_FileDescriptorsResponse) IsValid() bool { return x != nil } @@ -786,9 +786,9 @@ func (x *fastReflection_QueryFileDescriptorsResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryFileDescriptorsResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_FileDescriptorsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryFileDescriptorsResponse) + x := input.Message.Interface().(*FileDescriptorsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -820,7 +820,7 @@ func (x *fastReflection_QueryFileDescriptorsResponse) ProtoMethods() *protoiface } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryFileDescriptorsResponse) + x := input.Message.Interface().(*FileDescriptorsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -880,7 +880,7 @@ func (x *fastReflection_QueryFileDescriptorsResponse) ProtoMethods() *protoiface }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryFileDescriptorsResponse) + x := input.Message.Interface().(*FileDescriptorsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -912,10 +912,10 @@ func (x *fastReflection_QueryFileDescriptorsResponse) ProtoMethods() *protoiface fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryFileDescriptorsResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FileDescriptorsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryFileDescriptorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FileDescriptorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1036,8 +1036,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// QueryFileDescriptorsRequest is the Query/FileDescriptorSet request type. -type QueryFileDescriptorsRequest struct { +// FileDescriptorsRequest is the Query/FileDescriptors request type. +type FileDescriptorsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1046,8 +1046,8 @@ type QueryFileDescriptorsRequest struct { Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (x *QueryFileDescriptorsRequest) Reset() { - *x = QueryFileDescriptorsRequest{} +func (x *FileDescriptorsRequest) Reset() { + *x = FileDescriptorsRequest{} if protoimpl.UnsafeEnabled { mi := &file_cosmos_reflection_v1_reflection_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1055,26 +1055,26 @@ func (x *QueryFileDescriptorsRequest) Reset() { } } -func (x *QueryFileDescriptorsRequest) String() string { +func (x *FileDescriptorsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryFileDescriptorsRequest) ProtoMessage() {} +func (*FileDescriptorsRequest) ProtoMessage() {} -// Deprecated: Use QueryFileDescriptorsRequest.ProtoReflect.Descriptor instead. -func (*QueryFileDescriptorsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use FileDescriptorsRequest.ProtoReflect.Descriptor instead. +func (*FileDescriptorsRequest) Descriptor() ([]byte, []int) { return file_cosmos_reflection_v1_reflection_proto_rawDescGZIP(), []int{0} } -func (x *QueryFileDescriptorsRequest) GetPagination() *v1beta1.PageRequest { +func (x *FileDescriptorsRequest) GetPagination() *v1beta1.PageRequest { if x != nil { return x.Pagination } return nil } -// QueryFileDescriptorsResponse is the Query/FileDescriptorSet response type. -type QueryFileDescriptorsResponse struct { +// FileDescriptorsResponse is the Query/FileDescriptors response type. +type FileDescriptorsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1085,8 +1085,8 @@ type QueryFileDescriptorsResponse struct { Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (x *QueryFileDescriptorsResponse) Reset() { - *x = QueryFileDescriptorsResponse{} +func (x *FileDescriptorsResponse) Reset() { + *x = FileDescriptorsResponse{} if protoimpl.UnsafeEnabled { mi := &file_cosmos_reflection_v1_reflection_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1094,25 +1094,25 @@ func (x *QueryFileDescriptorsResponse) Reset() { } } -func (x *QueryFileDescriptorsResponse) String() string { +func (x *FileDescriptorsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryFileDescriptorsResponse) ProtoMessage() {} +func (*FileDescriptorsResponse) ProtoMessage() {} -// Deprecated: Use QueryFileDescriptorsResponse.ProtoReflect.Descriptor instead. -func (*QueryFileDescriptorsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use FileDescriptorsResponse.ProtoReflect.Descriptor instead. +func (*FileDescriptorsResponse) Descriptor() ([]byte, []int) { return file_cosmos_reflection_v1_reflection_proto_rawDescGZIP(), []int{1} } -func (x *QueryFileDescriptorsResponse) GetFile() []*descriptorpb.FileDescriptorProto { +func (x *FileDescriptorsResponse) GetFile() []*descriptorpb.FileDescriptorProto { if x != nil { return x.File } return nil } -func (x *QueryFileDescriptorsResponse) GetPagination() *v1beta1.PageResponse { +func (x *FileDescriptorsResponse) GetPagination() *v1beta1.PageResponse { if x != nil { return x.Pagination } @@ -1132,47 +1132,46 @@ var file_cosmos_reflection_v1_reflection_proto_rawDesc = []byte{ 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 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, 0x22, 0x65, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, - 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, - 0xa1, 0x01, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x38, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 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, 0x32, 0x94, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7f, 0x0a, 0x0f, 0x46, 0x69, 0x6c, - 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x60, 0x0a, 0x16, 0x46, 0x69, 0x6c, 0x65, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 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, 0x9c, 0x01, 0x0a, 0x17, 0x46, + 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, + 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, 0x32, 0x8a, 0x01, 0x0a, 0x11, 0x52, 0x65, + 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x75, 0x0a, 0x0f, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, + 0x72, 0x73, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x66, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x05, 0x88, 0xe7, 0xb0, 0x2a, 0x00, 0x42, 0xd1, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x65, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x05, 0x88, 0xe7, 0xb0, 0x2a, 0x00, 0x42, 0xd1, 0x01, 0x0a, 0x18, 0x63, - 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, - 0x31, 0x3b, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, - 0x03, 0x43, 0x52, 0x58, 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x52, 0x65, - 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x52, 0x65, 0x66, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, - 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, + 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x65, + 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x52, 0x58, + 0xaa, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x14, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, + 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x52, 0x65, 0x66, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -1189,18 +1188,18 @@ func file_cosmos_reflection_v1_reflection_proto_rawDescGZIP() []byte { var file_cosmos_reflection_v1_reflection_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_cosmos_reflection_v1_reflection_proto_goTypes = []interface{}{ - (*QueryFileDescriptorsRequest)(nil), // 0: cosmos.reflection.v1.QueryFileDescriptorsRequest - (*QueryFileDescriptorsResponse)(nil), // 1: cosmos.reflection.v1.QueryFileDescriptorsResponse + (*FileDescriptorsRequest)(nil), // 0: cosmos.reflection.v1.FileDescriptorsRequest + (*FileDescriptorsResponse)(nil), // 1: cosmos.reflection.v1.FileDescriptorsResponse (*v1beta1.PageRequest)(nil), // 2: cosmos.base.query.v1beta1.PageRequest (*descriptorpb.FileDescriptorProto)(nil), // 3: google.protobuf.FileDescriptorProto (*v1beta1.PageResponse)(nil), // 4: cosmos.base.query.v1beta1.PageResponse } var file_cosmos_reflection_v1_reflection_proto_depIdxs = []int32{ - 2, // 0: cosmos.reflection.v1.QueryFileDescriptorsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 3, // 1: cosmos.reflection.v1.QueryFileDescriptorsResponse.file:type_name -> google.protobuf.FileDescriptorProto - 4, // 2: cosmos.reflection.v1.QueryFileDescriptorsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 0, // 3: cosmos.reflection.v1.ReflectionService.FileDescriptors:input_type -> cosmos.reflection.v1.QueryFileDescriptorsRequest - 1, // 4: cosmos.reflection.v1.ReflectionService.FileDescriptors:output_type -> cosmos.reflection.v1.QueryFileDescriptorsResponse + 2, // 0: cosmos.reflection.v1.FileDescriptorsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 3, // 1: cosmos.reflection.v1.FileDescriptorsResponse.file:type_name -> google.protobuf.FileDescriptorProto + 4, // 2: cosmos.reflection.v1.FileDescriptorsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 0, // 3: cosmos.reflection.v1.ReflectionService.FileDescriptors:input_type -> cosmos.reflection.v1.FileDescriptorsRequest + 1, // 4: cosmos.reflection.v1.ReflectionService.FileDescriptors:output_type -> cosmos.reflection.v1.FileDescriptorsResponse 4, // [4:5] is the sub-list for method output_type 3, // [3:4] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name @@ -1215,7 +1214,7 @@ func file_cosmos_reflection_v1_reflection_proto_init() { } if !protoimpl.UnsafeEnabled { file_cosmos_reflection_v1_reflection_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryFileDescriptorsRequest); i { + switch v := v.(*FileDescriptorsRequest); i { case 0: return &v.state case 1: @@ -1227,7 +1226,7 @@ func file_cosmos_reflection_v1_reflection_proto_init() { } } file_cosmos_reflection_v1_reflection_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryFileDescriptorsResponse); i { + switch v := v.(*FileDescriptorsResponse); i { case 0: return &v.state case 1: diff --git a/api/cosmos/reflection/v1/reflection_grpc.pb.go b/api/cosmos/reflection/v1/reflection_grpc.pb.go index b78556411859..1f170ef69efb 100644 --- a/api/cosmos/reflection/v1/reflection_grpc.pb.go +++ b/api/cosmos/reflection/v1/reflection_grpc.pb.go @@ -24,7 +24,7 @@ const _ = grpc.SupportPackageIsVersion7 type ReflectionServiceClient interface { // FileDescriptors queries all the file descriptors in the app in order // to enable easier generation of dynamic clients. - FileDescriptors(ctx context.Context, in *QueryFileDescriptorsRequest, opts ...grpc.CallOption) (*QueryFileDescriptorsResponse, error) + FileDescriptors(ctx context.Context, in *FileDescriptorsRequest, opts ...grpc.CallOption) (*FileDescriptorsResponse, error) } type reflectionServiceClient struct { @@ -35,8 +35,8 @@ func NewReflectionServiceClient(cc grpc.ClientConnInterface) ReflectionServiceCl return &reflectionServiceClient{cc} } -func (c *reflectionServiceClient) FileDescriptors(ctx context.Context, in *QueryFileDescriptorsRequest, opts ...grpc.CallOption) (*QueryFileDescriptorsResponse, error) { - out := new(QueryFileDescriptorsResponse) +func (c *reflectionServiceClient) FileDescriptors(ctx context.Context, in *FileDescriptorsRequest, opts ...grpc.CallOption) (*FileDescriptorsResponse, error) { + out := new(FileDescriptorsResponse) err := c.cc.Invoke(ctx, "/cosmos.reflection.v1.ReflectionService/FileDescriptors", in, out, opts...) if err != nil { return nil, err @@ -50,7 +50,7 @@ func (c *reflectionServiceClient) FileDescriptors(ctx context.Context, in *Query type ReflectionServiceServer interface { // FileDescriptors queries all the file descriptors in the app in order // to enable easier generation of dynamic clients. - FileDescriptors(context.Context, *QueryFileDescriptorsRequest) (*QueryFileDescriptorsResponse, error) + FileDescriptors(context.Context, *FileDescriptorsRequest) (*FileDescriptorsResponse, error) mustEmbedUnimplementedReflectionServiceServer() } @@ -58,7 +58,7 @@ type ReflectionServiceServer interface { type UnimplementedReflectionServiceServer struct { } -func (UnimplementedReflectionServiceServer) FileDescriptors(context.Context, *QueryFileDescriptorsRequest) (*QueryFileDescriptorsResponse, error) { +func (UnimplementedReflectionServiceServer) FileDescriptors(context.Context, *FileDescriptorsRequest) (*FileDescriptorsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FileDescriptors not implemented") } func (UnimplementedReflectionServiceServer) mustEmbedUnimplementedReflectionServiceServer() {} @@ -75,7 +75,7 @@ func RegisterReflectionServiceServer(s grpc.ServiceRegistrar, srv ReflectionServ } func _ReflectionService_FileDescriptors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryFileDescriptorsRequest) + in := new(FileDescriptorsRequest) if err := dec(in); err != nil { return nil, err } @@ -87,7 +87,7 @@ func _ReflectionService_FileDescriptors_Handler(srv interface{}, ctx context.Con FullMethod: "/cosmos.reflection.v1.ReflectionService/FileDescriptors", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ReflectionServiceServer).FileDescriptors(ctx, req.(*QueryFileDescriptorsRequest)) + return srv.(ReflectionServiceServer).FileDescriptors(ctx, req.(*FileDescriptorsRequest)) } return interceptor(ctx, in, info, handler) } diff --git a/proto/cosmos/auth/v1beta1/query.proto b/proto/cosmos/auth/v1beta1/query.proto index 2665563e798a..5cf8bea557cb 100644 --- a/proto/cosmos/auth/v1beta1/query.proto +++ b/proto/cosmos/auth/v1beta1/query.proto @@ -62,7 +62,6 @@ service Query { // // Since: cosmos-sdk 0.46 rpc Bech32Prefix(Bech32PrefixRequest) returns (Bech32PrefixResponse) { - option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/cosmos/auth/v1beta1/bech32"; } @@ -70,7 +69,6 @@ service Query { // // Since: cosmos-sdk 0.46 rpc AddressBytesToString(AddressBytesToStringRequest) returns (AddressBytesToStringResponse) { - option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_bytes}"; } @@ -78,7 +76,6 @@ service Query { // // Since: cosmos-sdk 0.46 rpc AddressStringToBytes(AddressStringToBytesRequest) returns (AddressStringToBytesResponse) { - option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_string}"; } diff --git a/proto/tendermint/crypto/proof.proto b/proto/tendermint/crypto/proof.proto index 975df7685397..7293ae63ee58 100644 --- a/proto/tendermint/crypto/proof.proto +++ b/proto/tendermint/crypto/proof.proto @@ -27,7 +27,7 @@ message DominoOp { } // ProofOp defines an operation used for calculating Merkle root -// The data could be arbitrary format, providing nessecary data +// The data could be arbitrary format, providing necessary data // for example neighbouring node hash message ProofOp { string type = 1; diff --git a/x/auth/keeper/deterministic_test.go b/x/auth/keeper/deterministic_test.go index d5f90ac79e32..9d49e040aab1 100644 --- a/x/auth/keeper/deterministic_test.go +++ b/x/auth/keeper/deterministic_test.go @@ -236,51 +236,6 @@ func (suite *DeterministicTestSuite) createAndReturnQueryClient(ak keeper.Accoun return types.NewQueryClient(queryHelper) } -func (suite *DeterministicTestSuite) TestGRPCQueryBech32Prefix() { - rapid.Check(suite.T(), func(t *rapid.T) { - prefix := rapid.StringMatching(`[a-zA-Z]+[1-9a-zA-Z]*`).Draw(t, "prefix") - ak := keeper.NewAccountKeeper( - suite.encCfg.Codec, - suite.key, - types.ProtoBaseAccount, - nil, - prefix, - types.NewModuleAddress("gov").String(), - ) - - queryClient := suite.createAndReturnQueryClient(ak) - req := &types.Bech32PrefixRequest{} - testdata.DeterministicIterations(suite.ctx, suite.Require(), req, queryClient.Bech32Prefix, 0, true) - }) - - req := &types.Bech32PrefixRequest{} - testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.Bech32Prefix, 0, false) -} - -func (suite *DeterministicTestSuite) TestGRPCQueryAddressBytesToString() { - rapid.Check(suite.T(), func(t *rapid.T) { - address := testdata.AddressGenerator(t).Draw(t, "address-bytes") - - req := &types.AddressBytesToStringRequest{AddressBytes: address.Bytes()} - testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.AddressBytesToString, 0, true) - }) - - req := &types.AddressBytesToStringRequest{AddressBytes: addr.Bytes()} - testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.AddressBytesToString, 0, false) -} - -func (suite *DeterministicTestSuite) TestGRPCQueryAddressStringToBytes() { - rapid.Check(suite.T(), func(t *rapid.T) { - address := testdata.AddressGenerator(t).Draw(t, "address-string") - - req := &types.AddressStringToBytesRequest{AddressString: address.String()} - testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.AddressStringToBytes, 0, true) - }) - - req := &types.AddressStringToBytesRequest{AddressString: addr.String()} - testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.AddressStringToBytes, 0, false) -} - func (suite *DeterministicTestSuite) setModuleAccounts( ctx sdk.Context, ak keeper.AccountKeeper, maccs []string, ) []types.AccountI { diff --git a/x/auth/types/query.pb.go b/x/auth/types/query.pb.go index cd2005ecb770..af198a88c18c 100644 --- a/x/auth/types/query.pb.go +++ b/x/auth/types/query.pb.go @@ -974,72 +974,73 @@ func init() { func init() { proto.RegisterFile("cosmos/auth/v1beta1/query.proto", fileDescriptor_c451370b3929a27c) } var fileDescriptor_c451370b3929a27c = []byte{ - // 1038 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0x4f, 0x6f, 0x1b, 0xc5, - 0x1b, 0xc7, 0xbd, 0x69, 0x7e, 0x49, 0x7e, 0x4f, 0xdc, 0x20, 0x4d, 0x5c, 0x11, 0xd6, 0xa9, 0x1d, - 0x6d, 0xa1, 0x71, 0x42, 0xbd, 0xdb, 0x38, 0xa9, 0x44, 0x01, 0x21, 0x65, 0x1b, 0x40, 0x39, 0x14, - 0x19, 0x37, 0x27, 0x0e, 0x58, 0x63, 0x7b, 0xed, 0xac, 0xa8, 0x77, 0x5c, 0xef, 0x1a, 0xd5, 0x8a, - 0x7c, 0x41, 0x42, 0xea, 0x05, 0x09, 0x09, 0x5e, 0x40, 0x0e, 0x88, 0x33, 0x87, 0xc0, 0x89, 0x17, - 0x50, 0xf5, 0x54, 0xc1, 0x85, 0x13, 0x42, 0x09, 0x12, 0xbc, 0x0a, 0x84, 0x3c, 0xf3, 0xcc, 0xfe, - 0x49, 0xc6, 0xf1, 0x46, 0x9c, 0xb2, 0x9e, 0x79, 0x9e, 0xef, 0xf3, 0x99, 0x99, 0x67, 0xe6, 0x1b, - 0x28, 0x36, 0x99, 0xdf, 0x65, 0xbe, 0x45, 0x07, 0xc1, 0xa1, 0xf5, 0xf9, 0x56, 0xc3, 0x09, 0xe8, - 0x96, 0xf5, 0x64, 0xe0, 0xf4, 0x87, 0x66, 0xaf, 0xcf, 0x02, 0x46, 0x96, 0x45, 0x80, 0x39, 0x0e, - 0x30, 0x31, 0x40, 0xdf, 0xc4, 0xac, 0x06, 0xf5, 0x1d, 0x11, 0x1d, 0xe6, 0xf6, 0x68, 0xc7, 0xf5, - 0x68, 0xe0, 0x32, 0x4f, 0x08, 0xe8, 0xb9, 0x0e, 0xeb, 0x30, 0xfe, 0x69, 0x8d, 0xbf, 0x70, 0xf4, - 0xb5, 0x0e, 0x63, 0x9d, 0xc7, 0x8e, 0xc5, 0x7f, 0x35, 0x06, 0x6d, 0x8b, 0x7a, 0x58, 0x51, 0x5f, - 0xc5, 0x29, 0xda, 0x73, 0x2d, 0xea, 0x79, 0x2c, 0xe0, 0x6a, 0x3e, 0xce, 0x16, 0x54, 0xc0, 0x1c, - 0x0e, 0x85, 0xc5, 0x7c, 0x5d, 0x54, 0x44, 0x78, 0x31, 0x95, 0xc7, 0x54, 0x09, 0x1c, 0x5f, 0xa7, - 0xf1, 0x29, 0xe4, 0x3e, 0x1e, 0xff, 0xdc, 0x6d, 0x36, 0xd9, 0xc0, 0x0b, 0xfc, 0x9a, 0xf3, 0x64, - 0xe0, 0xf8, 0x01, 0xf9, 0x00, 0x20, 0x5a, 0xd2, 0x8a, 0xb6, 0xa6, 0x95, 0x16, 0x2b, 0xb7, 0x4d, - 0xd4, 0x1d, 0xaf, 0xdf, 0x14, 0x2a, 0x88, 0x62, 0x56, 0x69, 0xc7, 0xc1, 0xdc, 0x5a, 0x2c, 0xd3, - 0x38, 0xd6, 0xe0, 0xc6, 0xb9, 0x02, 0x7e, 0x8f, 0x79, 0xbe, 0x43, 0xde, 0x83, 0x05, 0x8a, 0x63, - 0x2b, 0xda, 0xda, 0xb5, 0xd2, 0x62, 0x25, 0x67, 0x8a, 0x2d, 0x30, 0xe5, 0xee, 0x98, 0xbb, 0xde, - 0xd0, 0xce, 0xbe, 0x38, 0x29, 0x2f, 0x60, 0xf6, 0x7e, 0x2d, 0xcc, 0x21, 0x1f, 0x26, 0x08, 0x67, - 0x38, 0xe1, 0xfa, 0x54, 0x42, 0x51, 0x3c, 0x81, 0xf8, 0x08, 0x96, 0xe3, 0x84, 0x72, 0x07, 0x2a, - 0x30, 0x4f, 0x5b, 0xad, 0xbe, 0xe3, 0xfb, 0x7c, 0xf9, 0xff, 0xb7, 0x57, 0x7e, 0x39, 0x29, 0xe7, - 0x50, 0x7f, 0x57, 0xcc, 0x3c, 0x0a, 0xfa, 0xae, 0xd7, 0xa9, 0xc9, 0xc0, 0xb7, 0x17, 0x9e, 0x1d, - 0x17, 0x33, 0x7f, 0x1f, 0x17, 0x33, 0xc6, 0x41, 0x72, 0x5f, 0xc3, 0x55, 0xbf, 0x0b, 0xf3, 0xb8, - 0x02, 0xdc, 0xd4, 0x34, 0x8b, 0x96, 0x29, 0x46, 0x0e, 0x08, 0x57, 0xad, 0xd2, 0x3e, 0xed, 0xca, - 0xb3, 0x32, 0xaa, 0xb8, 0x00, 0x39, 0x8a, 0xa5, 0xee, 0xc3, 0x5c, 0x8f, 0x8f, 0x60, 0xa5, 0xbc, - 0xa9, 0xe8, 0x69, 0x53, 0x24, 0xd9, 0xb3, 0xcf, 0x7f, 0x2f, 0x66, 0x6a, 0x98, 0x60, 0xac, 0x82, - 0xce, 0x15, 0x1f, 0xb2, 0xd6, 0xe0, 0xb1, 0x73, 0xae, 0x37, 0x8c, 0x26, 0xe4, 0x95, 0xb3, 0x58, - 0x77, 0x2f, 0xe5, 0xc1, 0x92, 0x17, 0x27, 0xe5, 0xa5, 0x84, 0x46, 0xec, 0x78, 0x8d, 0x7b, 0x50, - 0xbc, 0x58, 0xc4, 0x1e, 0x7e, 0x44, 0xbb, 0xb2, 0xcf, 0x08, 0x81, 0x59, 0x8f, 0x76, 0x1d, 0x71, - 0x3c, 0x35, 0xfe, 0x6d, 0xb4, 0x61, 0x6d, 0x72, 0x1a, 0x02, 0xda, 0xe9, 0xce, 0x40, 0xc5, 0x17, - 0x9e, 0xc4, 0x0d, 0x58, 0xb6, 0x9d, 0xe6, 0xe1, 0x76, 0xa5, 0xda, 0x77, 0xda, 0xee, 0x53, 0xb9, - 0x35, 0xef, 0x40, 0x2e, 0x39, 0x8c, 0x25, 0x6f, 0xc1, 0xf5, 0x06, 0x1f, 0xaf, 0xf7, 0xf8, 0x04, - 0x32, 0x67, 0x1b, 0xb1, 0x60, 0xc3, 0x86, 0x3c, 0xf6, 0x95, 0x3d, 0x0c, 0x1c, 0xff, 0x80, 0x61, - 0x7b, 0xe1, 0x72, 0x6f, 0xc1, 0x75, 0xec, 0xb3, 0x7a, 0x63, 0x3c, 0xcf, 0x35, 0xb2, 0xb5, 0x2c, - 0x8d, 0xe5, 0x18, 0xef, 0xc3, 0xaa, 0x5a, 0x03, 0x41, 0xde, 0x80, 0x25, 0x29, 0xe2, 0xf3, 0x19, - 0x24, 0x91, 0xd2, 0x22, 0xdc, 0xd8, 0x0b, 0x51, 0xc4, 0xc0, 0x01, 0xe3, 0x72, 0x12, 0x25, 0xa5, - 0xca, 0x83, 0x10, 0xe6, 0x9c, 0x4a, 0xb4, 0x2b, 0xd3, 0x57, 0x74, 0x17, 0x0a, 0xf1, 0x9b, 0x14, - 0xae, 0x6e, 0x7f, 0x4f, 0xd2, 0x2c, 0xc1, 0x8c, 0xdb, 0xe2, 0xb9, 0xd7, 0x6a, 0x33, 0x6e, 0xcb, - 0x68, 0x61, 0xeb, 0xa8, 0x32, 0xb0, 0xf2, 0x2e, 0xbc, 0x82, 0x27, 0x59, 0x4f, 0x7b, 0xc9, 0x97, - 0x68, 0x42, 0xce, 0x78, 0x08, 0xaf, 0xc6, 0xab, 0xec, 0x7b, 0x6d, 0xf6, 0x1f, 0x9e, 0x0e, 0xa3, - 0x0a, 0x2b, 0x17, 0xe5, 0x90, 0x76, 0x07, 0x66, 0x5d, 0xaf, 0xcd, 0xb0, 0x5b, 0xd7, 0x94, 0xf7, - 0xd8, 0xa6, 0xbe, 0x6c, 0xd3, 0x1a, 0x8f, 0xae, 0xfc, 0x93, 0x85, 0xff, 0x71, 0x49, 0xf2, 0x95, - 0x06, 0xf2, 0x31, 0xf1, 0xc9, 0x86, 0x32, 0x5d, 0x65, 0x02, 0xfa, 0x66, 0x9a, 0x50, 0xc1, 0x68, - 0x6c, 0x3e, 0xfb, 0xeb, 0x87, 0x4d, 0xed, 0x8b, 0x5f, 0xff, 0xfc, 0x66, 0xa6, 0x48, 0x6e, 0x5a, - 0x4a, 0xbb, 0x92, 0x08, 0xdf, 0x6a, 0x30, 0x8f, 0x02, 0xa4, 0x34, 0xb5, 0x86, 0xa4, 0xd9, 0x48, - 0x11, 0x89, 0x30, 0x3b, 0x11, 0xcc, 0x06, 0x59, 0xbf, 0x14, 0xc6, 0x3a, 0xc2, 0x13, 0x18, 0x91, - 0x1f, 0x35, 0x20, 0x17, 0x7b, 0x86, 0x6c, 0x4f, 0xad, 0x7b, 0xb1, 0x27, 0xf5, 0x9d, 0xab, 0x25, - 0x5d, 0x81, 0x3b, 0xbc, 0x30, 0x75, 0xb7, 0x65, 0x1d, 0xb9, 0xad, 0x11, 0xf9, 0x52, 0x83, 0x39, - 0xf1, 0x8c, 0x93, 0xf5, 0xc9, 0x65, 0x13, 0x9e, 0xa1, 0x97, 0xa6, 0x07, 0x22, 0x53, 0x29, 0x62, - 0xba, 0x49, 0xf2, 0x4a, 0x26, 0xe1, 0x1a, 0xe4, 0x7b, 0x0d, 0x92, 0xef, 0xa5, 0x4f, 0xac, 0xc9, - 0x65, 0x94, 0xde, 0xa2, 0xdf, 0x4d, 0x9f, 0x80, 0x7c, 0x5b, 0x11, 0xdf, 0x6d, 0xf2, 0xba, 0x92, - 0xaf, 0xcb, 0x33, 0xeb, 0x61, 0xff, 0xfd, 0xac, 0xc1, 0xb2, 0xc2, 0x20, 0xc8, 0x4e, 0xca, 0xe2, - 0x09, 0x1b, 0xd2, 0xef, 0x5d, 0x31, 0x0b, 0xb9, 0xdf, 0x8a, 0xb8, 0xcb, 0xe4, 0xcd, 0x34, 0xdc, - 0xd6, 0xd1, 0xd8, 0xe2, 0x46, 0xe3, 0xeb, 0x9c, 0x8d, 0xbb, 0xcc, 0x84, 0x3b, 0xa4, 0xf0, 0xa7, - 0x09, 0x77, 0x48, 0x65, 0x59, 0x69, 0xce, 0x5d, 0xb8, 0xd7, 0xf8, 0xde, 0xe4, 0x54, 0xa6, 0x43, - 0xd4, 0x87, 0x79, 0x89, 0xc7, 0xe9, 0x5b, 0x57, 0xc8, 0x48, 0xbf, 0x8f, 0x82, 0x33, 0xbc, 0xe9, - 0xc2, 0x6c, 0x46, 0xe4, 0xa7, 0x88, 0x3b, 0xe1, 0x4f, 0x97, 0x73, 0xab, 0x0c, 0xf1, 0x72, 0x6e, - 0xa5, 0xf9, 0x19, 0xf7, 0x23, 0x6e, 0x93, 0xdc, 0x49, 0xc5, 0x2d, 0xbc, 0x76, 0x44, 0xbe, 0xd3, - 0x60, 0x31, 0xe6, 0x13, 0xe4, 0xce, 0xd4, 0xc7, 0x26, 0xe6, 0x4e, 0x7a, 0x39, 0x65, 0x74, 0xfa, - 0xfd, 0x95, 0x56, 0x3a, 0xb6, 0x9d, 0xe8, 0x3d, 0xb5, 0x1f, 0x3c, 0x3f, 0x2d, 0x68, 0x2f, 0x4f, - 0x0b, 0xda, 0x1f, 0xa7, 0x05, 0xed, 0xeb, 0xb3, 0x42, 0xe6, 0xe5, 0x59, 0x21, 0xf3, 0xdb, 0x59, - 0x21, 0xf3, 0xc9, 0x46, 0xc7, 0x0d, 0x0e, 0x07, 0x0d, 0xb3, 0xc9, 0xba, 0x52, 0x50, 0xfc, 0x29, - 0xfb, 0xad, 0xcf, 0xac, 0xa7, 0x42, 0x3d, 0x18, 0xf6, 0x1c, 0xbf, 0x31, 0xc7, 0xff, 0x27, 0xdb, - 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, 0x49, 0x22, 0x49, 0xcc, 0xb2, 0x0d, 0x00, 0x00, + // 1043 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xc7, 0xbd, 0x69, 0x48, 0xc2, 0x8b, 0x1b, 0xa4, 0x89, 0x2b, 0xc2, 0x3a, 0xb5, 0xa3, 0x0d, + 0x34, 0x4e, 0xa8, 0x77, 0x1b, 0xc7, 0x95, 0xf8, 0x25, 0xa4, 0x6c, 0x03, 0x28, 0x87, 0x22, 0xe3, + 0xe6, 0xc4, 0x01, 0x6b, 0xed, 0x5d, 0x3b, 0x2b, 0xea, 0x1d, 0xd7, 0xbb, 0x46, 0xb5, 0x22, 0x5f, + 0x90, 0x90, 0x72, 0x41, 0x42, 0x82, 0x3f, 0x20, 0x07, 0xc4, 0xb9, 0x48, 0xe1, 0xc6, 0x1f, 0x50, + 0xf5, 0x14, 0xc1, 0x85, 0x13, 0x42, 0x09, 0x12, 0xdc, 0xf8, 0x17, 0x90, 0x67, 0xde, 0xac, 0x77, + 0x93, 0xb1, 0xbd, 0x51, 0x4f, 0x59, 0xcf, 0xbc, 0xf7, 0x7d, 0x9f, 0x99, 0x79, 0x33, 0xdf, 0x40, + 0xbe, 0x41, 0xfd, 0x36, 0xf5, 0x0d, 0xab, 0x17, 0x1c, 0x1a, 0x5f, 0x6d, 0xd7, 0x9d, 0xc0, 0xda, + 0x36, 0x9e, 0xf4, 0x9c, 0x6e, 0x5f, 0xef, 0x74, 0x69, 0x40, 0xc9, 0x32, 0x0f, 0xd0, 0x87, 0x01, + 0x3a, 0x06, 0xa8, 0x5b, 0x98, 0x55, 0xb7, 0x7c, 0x87, 0x47, 0x87, 0xb9, 0x1d, 0xab, 0xe5, 0x7a, + 0x56, 0xe0, 0x52, 0x8f, 0x0b, 0xa8, 0x99, 0x16, 0x6d, 0x51, 0xf6, 0x69, 0x0c, 0xbf, 0x70, 0xf4, + 0x8d, 0x16, 0xa5, 0xad, 0xc7, 0x8e, 0xc1, 0x7e, 0xd5, 0x7b, 0x4d, 0xc3, 0xf2, 0xb0, 0xa2, 0xba, + 0x8a, 0x53, 0x56, 0xc7, 0x35, 0x2c, 0xcf, 0xa3, 0x01, 0x53, 0xf3, 0x71, 0x36, 0x27, 0x03, 0x66, + 0x70, 0x28, 0xcc, 0xe7, 0x6b, 0xbc, 0x22, 0xc2, 0xf3, 0xa9, 0x2c, 0xa6, 0x0a, 0xe0, 0xe8, 0x3a, + 0xb5, 0x2f, 0x20, 0xf3, 0xd9, 0xf0, 0xe7, 0x6e, 0xa3, 0x41, 0x7b, 0x5e, 0xe0, 0x57, 0x9d, 0x27, + 0x3d, 0xc7, 0x0f, 0xc8, 0xc7, 0x00, 0xa3, 0x25, 0xad, 0x28, 0x6b, 0x4a, 0x61, 0xb1, 0x74, 0x47, + 0x47, 0xdd, 0xe1, 0xfa, 0x75, 0xae, 0x82, 0x28, 0x7a, 0xc5, 0x6a, 0x39, 0x98, 0x5b, 0x8d, 0x64, + 0x6a, 0x27, 0x0a, 0xdc, 0xba, 0x54, 0xc0, 0xef, 0x50, 0xcf, 0x77, 0xc8, 0x87, 0xb0, 0x60, 0xe1, + 0xd8, 0x8a, 0xb2, 0x76, 0xa3, 0xb0, 0x58, 0xca, 0xe8, 0x7c, 0x0b, 0x74, 0xb1, 0x3b, 0xfa, 0xae, + 0xd7, 0x37, 0xd3, 0x2f, 0x4e, 0x8b, 0x0b, 0x98, 0xbd, 0x5f, 0x0d, 0x73, 0xc8, 0x27, 0x31, 0xc2, + 0x19, 0x46, 0xb8, 0x31, 0x95, 0x90, 0x17, 0x8f, 0x21, 0x3e, 0x82, 0xe5, 0x28, 0xa1, 0xd8, 0x81, + 0x12, 0xcc, 0x5b, 0xb6, 0xdd, 0x75, 0x7c, 0x9f, 0x2d, 0xff, 0x55, 0x73, 0xe5, 0xb7, 0xd3, 0x62, + 0x06, 0xf5, 0x77, 0xf9, 0xcc, 0xa3, 0xa0, 0xeb, 0x7a, 0xad, 0xaa, 0x08, 0x7c, 0x6f, 0xe1, 0xf8, + 0x24, 0x9f, 0xfa, 0xf7, 0x24, 0x9f, 0xd2, 0x0e, 0xe2, 0xfb, 0x1a, 0xae, 0xfa, 0x03, 0x98, 0xc7, + 0x15, 0xe0, 0xa6, 0x26, 0x59, 0xb4, 0x48, 0xd1, 0x32, 0x40, 0x98, 0x6a, 0xc5, 0xea, 0x5a, 0x6d, + 0x71, 0x56, 0x5a, 0x05, 0x17, 0x20, 0x46, 0xb1, 0xd4, 0xbb, 0x30, 0xd7, 0x61, 0x23, 0x58, 0x29, + 0xab, 0x4b, 0x7a, 0x5a, 0xe7, 0x49, 0xe6, 0xec, 0xf3, 0x3f, 0xf3, 0xa9, 0x2a, 0x26, 0x68, 0xab, + 0xa0, 0x32, 0xc5, 0x87, 0xd4, 0xee, 0x3d, 0x76, 0x2e, 0xf5, 0x86, 0xd6, 0x80, 0xac, 0x74, 0x16, + 0xeb, 0xee, 0x25, 0x3c, 0x58, 0xf2, 0xe2, 0xb4, 0xb8, 0x14, 0xd3, 0x88, 0x1c, 0xaf, 0x76, 0x1f, + 0xf2, 0x57, 0x8b, 0x98, 0xfd, 0x4f, 0xad, 0xb6, 0xe8, 0x33, 0x42, 0x60, 0xd6, 0xb3, 0xda, 0x0e, + 0x3f, 0x9e, 0x2a, 0xfb, 0xd6, 0x9a, 0xb0, 0x36, 0x3e, 0x0d, 0x01, 0xcd, 0x64, 0x67, 0x20, 0xe3, + 0x0b, 0x4f, 0xe2, 0x16, 0x2c, 0x9b, 0x4e, 0xe3, 0x70, 0xa7, 0x54, 0xe9, 0x3a, 0x4d, 0xf7, 0xa9, + 0xd8, 0x9a, 0xf7, 0x21, 0x13, 0x1f, 0xc6, 0x92, 0xeb, 0x70, 0xb3, 0xce, 0xc6, 0x6b, 0x1d, 0x36, + 0x81, 0xcc, 0xe9, 0x7a, 0x24, 0x58, 0x33, 0x21, 0x8b, 0x7d, 0x65, 0xf6, 0x03, 0xc7, 0x3f, 0xa0, + 0xd8, 0x5e, 0xb8, 0xdc, 0x75, 0xb8, 0x89, 0x7d, 0x56, 0xab, 0x0f, 0xe7, 0x99, 0x46, 0xba, 0x9a, + 0xb6, 0x22, 0x39, 0xda, 0x47, 0xb0, 0x2a, 0xd7, 0x40, 0x90, 0xb7, 0x60, 0x49, 0x88, 0xf8, 0x6c, + 0x06, 0x49, 0x84, 0x34, 0x0f, 0xd7, 0xf6, 0x42, 0x14, 0x3e, 0x70, 0x40, 0x99, 0x9c, 0x40, 0x49, + 0xa8, 0xf2, 0x20, 0x84, 0xb9, 0xa4, 0x32, 0xda, 0x95, 0xe9, 0x2b, 0xba, 0x07, 0xb9, 0xe8, 0x4d, + 0x0a, 0x57, 0xb7, 0xbf, 0x27, 0x68, 0x96, 0x60, 0xc6, 0xb5, 0x59, 0xee, 0x8d, 0xea, 0x8c, 0x6b, + 0x6b, 0x36, 0xb6, 0x8e, 0x2c, 0x03, 0x2b, 0xef, 0xc2, 0x6b, 0x78, 0x92, 0xb5, 0xa4, 0x97, 0x7c, + 0xc9, 0x8a, 0xc9, 0x69, 0x0f, 0xe1, 0xf5, 0x68, 0x95, 0x7d, 0xaf, 0x49, 0x5f, 0xe2, 0xe9, 0xd0, + 0x2a, 0xb0, 0x72, 0x55, 0x0e, 0x69, 0xcb, 0x30, 0xeb, 0x7a, 0x4d, 0x8a, 0xdd, 0xba, 0x26, 0xbd, + 0xc7, 0xa6, 0xe5, 0x8b, 0x36, 0xad, 0xb2, 0xe8, 0xd2, 0x7f, 0x69, 0x78, 0x85, 0x49, 0x92, 0x6f, + 0x15, 0x10, 0x8f, 0x89, 0x4f, 0x36, 0xa5, 0xe9, 0x32, 0x13, 0x50, 0xb7, 0x92, 0x84, 0x72, 0x46, + 0x6d, 0xeb, 0xf8, 0x9f, 0x67, 0x5b, 0xca, 0xd7, 0xbf, 0xff, 0xfd, 0xfd, 0x4c, 0x9e, 0xdc, 0x36, + 0xa4, 0x76, 0x25, 0x10, 0x7e, 0x50, 0x60, 0x1e, 0x05, 0x48, 0x61, 0x6a, 0x0d, 0x41, 0xb3, 0x99, + 0x20, 0x12, 0x61, 0xca, 0x23, 0x98, 0x4d, 0xb2, 0x31, 0x11, 0xc6, 0x38, 0xc2, 0x13, 0x18, 0x90, + 0x5f, 0x14, 0x20, 0x57, 0x7b, 0x86, 0xec, 0x4c, 0xad, 0x7b, 0xb5, 0x27, 0xd5, 0xf2, 0xf5, 0x92, + 0xae, 0xc1, 0x1d, 0x5e, 0x98, 0x9a, 0x6b, 0x1b, 0x47, 0xae, 0x3d, 0x20, 0xdf, 0x28, 0x30, 0xc7, + 0x9f, 0x71, 0xb2, 0x31, 0xbe, 0x6c, 0xcc, 0x33, 0xd4, 0xc2, 0xf4, 0x40, 0x64, 0x2a, 0x8c, 0x98, + 0x6e, 0x93, 0xac, 0x94, 0x89, 0xbb, 0x06, 0xf9, 0x49, 0x81, 0xf8, 0x7b, 0xe9, 0x13, 0x63, 0x7c, + 0x19, 0xa9, 0xb7, 0xa8, 0xf7, 0x92, 0x27, 0x20, 0xdf, 0xf6, 0x88, 0xef, 0x0e, 0x79, 0x53, 0xca, + 0xd7, 0x66, 0x99, 0xb5, 0xb0, 0xff, 0x7e, 0x55, 0x60, 0x59, 0x62, 0x10, 0xa4, 0x9c, 0xb0, 0x78, + 0xcc, 0x86, 0xd4, 0xfb, 0xd7, 0xcc, 0x42, 0xee, 0x77, 0x46, 0xdc, 0x45, 0xf2, 0x76, 0x12, 0x6e, + 0xe3, 0x68, 0x68, 0x71, 0x03, 0x72, 0xac, 0x40, 0x3a, 0xea, 0x32, 0x63, 0xee, 0x90, 0xc4, 0x9f, + 0xc6, 0xdc, 0x21, 0x99, 0x65, 0x69, 0xeb, 0x13, 0x8f, 0x9c, 0x1b, 0x17, 0x79, 0xa6, 0x40, 0x46, + 0xe6, 0x37, 0x44, 0x7e, 0x8e, 0x13, 0xec, 0x4d, 0xdd, 0xbe, 0x46, 0x06, 0x22, 0xee, 0x4c, 0xdc, + 0x3d, 0x8e, 0x18, 0xde, 0x6f, 0x6e, 0x31, 0x03, 0xf2, 0xf3, 0x08, 0x39, 0xe6, 0x4a, 0x93, 0x91, + 0x65, 0x36, 0x38, 0x19, 0x59, 0x6a, 0x79, 0x5a, 0x99, 0x21, 0xeb, 0xe4, 0x6e, 0x22, 0x64, 0x6e, + 0xae, 0x03, 0xf2, 0xa3, 0x02, 0x8b, 0x11, 0x63, 0x20, 0x77, 0xa7, 0xbe, 0x2e, 0x11, 0x3b, 0x52, + 0x8b, 0x09, 0xa3, 0x93, 0x37, 0xa6, 0xf0, 0xce, 0xa1, 0xcf, 0x8c, 0x1e, 0x50, 0xf3, 0xc1, 0xf3, + 0xf3, 0x9c, 0x72, 0x76, 0x9e, 0x53, 0xfe, 0x3a, 0xcf, 0x29, 0xdf, 0x5d, 0xe4, 0x52, 0x67, 0x17, + 0xb9, 0xd4, 0x1f, 0x17, 0xb9, 0xd4, 0xe7, 0x9b, 0x2d, 0x37, 0x38, 0xec, 0xd5, 0xf5, 0x06, 0x6d, + 0x0b, 0x41, 0xfe, 0xa7, 0xe8, 0xdb, 0x5f, 0x1a, 0x4f, 0xb9, 0x7a, 0xd0, 0xef, 0x38, 0x7e, 0x7d, + 0x8e, 0xfd, 0x13, 0xb6, 0xf3, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x32, 0x86, 0xd7, 0x16, 0xa3, + 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From dc3cf4a1e55da1a3b8d3b6b6fcf3c6c269940f83 Mon Sep 17 00:00:00 2001 From: Jim Larson <32469398+JimLarson@users.noreply.github.com> Date: Tue, 25 Oct 2022 10:20:52 -0700 Subject: [PATCH 24/26] feat: string and message value renderers for textual (#13510) ## Description Closes: #12713 Refs: #12878 Sign mode textual value renderers for string and message. ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules) - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable) --- tx/textual/internal/testdata/message.json | 139 ++ tx/textual/internal/testdata/string.json | 11 + tx/textual/internal/testpb/1.proto | 16 + tx/textual/internal/testpb/1.pulsar.go | 1499 ++++++++++++++++++++- tx/textual/valuerenderer/message.go | 161 +++ tx/textual/valuerenderer/message_test.go | 53 + tx/textual/valuerenderer/string.go | 28 + tx/textual/valuerenderer/string_test.go | 55 + tx/textual/valuerenderer/valuerenderer.go | 13 +- 9 files changed, 1949 insertions(+), 26 deletions(-) create mode 100644 tx/textual/internal/testdata/message.json create mode 100644 tx/textual/internal/testdata/string.json create mode 100644 tx/textual/valuerenderer/message.go create mode 100644 tx/textual/valuerenderer/message_test.go create mode 100644 tx/textual/valuerenderer/string.go create mode 100644 tx/textual/valuerenderer/string_test.go diff --git a/tx/textual/internal/testdata/message.json b/tx/textual/internal/testdata/message.json new file mode 100644 index 000000000000..0904e2510d96 --- /dev/null +++ b/tx/textual/internal/testdata/message.json @@ -0,0 +1,139 @@ +[ + { + "proto": {}, + "screens": [ + {"text": "Foo object"} + ] + }, + { + "proto": { + "full_name": "nonempty" + }, + "screens": [ + {"text": "Foo object"}, + {"text": "Full name: nonempty", "indent": 1} + ] + }, + { + "proto": { + "full_name": "thing one", + "nickname": ":thing two" + }, + "screens": [ + {"text": "Foo object"}, + {"text": "Full name: thing one", "indent": 1}, + {"text": "Nickname: :thing two", "indent": 1} + ] + }, + { + "proto": { + "full_name": "special child message", + "mtime": { + "seconds": 1136214245 + } + }, + "screens": [ + {"text": "Foo object"}, + {"text": "Full name: special child message", "indent": 1}, + {"text": "Mtime: 2006-01-02T15:04:05Z", "indent": 1} + ] + }, + { + "proto": { + "nickname": "empty child", + "left": {} + }, + "screens": [ + {"text": "Foo object"}, + {"text": "Nickname: empty child", "indent": 1}, + {"text": "Left: Foo object", "indent": 1} + ] + }, + { + "proto": { + "nickname": "empty children", + "left": {}, + "right": {}, + "bar": {} + }, + "screens": [ + {"text": "Foo object"}, + {"text": "Nickname: empty children", "indent": 1}, + {"text": "Left: Foo object", "indent": 1}, + {"text": "Right: Foo object", "indent": 1}, + {"text": "Bar: Bar object", "indent": 1} + ] + }, + { + "proto": { + "full_name": "subfield", + "left": {}, + "right": { + "nickname": "junior" + }, + "bar": {} + }, + "screens": [ + {"text": "Foo object"}, + {"text": "Full name: subfield", "indent": 1}, + {"text": "Left: Foo object", "indent": 1}, + {"text": "Right: Foo object", "indent": 1}, + {"text": "Nickname: junior", "indent": 2}, + {"text": "Bar: Bar object", "indent": 1} + ] + }, + { + "proto": { + "full_name": "deep", + "left": { + "left": {"nickname": "LL"}, + "right": {"nickname": "LR"} + }, + "right": { + "left": {"nickname": "RL"}, + "right": {"nickname": "RR"} + } + }, + "screens": [ + {"text": "Foo object"}, + {"text": "Full name: deep", "indent": 1}, + {"text": "Left: Foo object", "indent": 1}, + {"text": "Left: Foo object", "indent": 2}, + {"text": "Nickname: LL", "indent": 3}, + {"text": "Right: Foo object", "indent": 2}, + {"text": "Nickname: LR", "indent": 3}, + {"text": "Right: Foo object", "indent": 1}, + {"text": "Left: Foo object", "indent": 2}, + {"text": "Nickname: RL", "indent": 3}, + {"text": "Right: Foo object", "indent": 2}, + {"text": "Nickname: RR", "indent": 3} + ] + }, + { + "proto": { + "full_name": " the kitchen sink ", + "mtime": {}, + "left": {}, + "right": { + "nickname": "blub", + "right": {}, + "bar": { + "bar_id": "quux", + "data": [255, 254] + } + } + }, + "screens": [ + {"text": "Foo object"}, + {"text": "Full name: the kitchen sink ", "indent": 1}, + {"text": "Mtime: 1970-01-01T00:00:00Z", "indent": 1}, + {"text": "Left: Foo object", "indent": 1}, + {"text": "Right: Foo object", "indent": 1}, + {"text": "Nickname: blub", "indent": 2}, + {"text": "Right: Foo object", "indent": 2}, + {"text": "Bar: Bar object", "indent": 2}, + {"text": "Bar id: quux", "indent": 3}, + {"text": "Data: FFFE", "indent": 3} + ] + } +] diff --git a/tx/textual/internal/testdata/string.json b/tx/textual/internal/testdata/string.json new file mode 100644 index 000000000000..e37010c3d142 --- /dev/null +++ b/tx/textual/internal/testdata/string.json @@ -0,0 +1,11 @@ +[ + {"text": ""}, + {"text": "x"}, + {"text": "foo"}, + {"text": "\"able"}, + {"text": "unresolved\nambiguities\r\ncost\rbillions"}, + {"text": "stealth whitespace is significant "}, + {"text": "stealth whitespace snailed for your protection @@"}, + {"text": "co\u00F6peration"}, + {"text": "JSON limits unicode to 16 bits, surrogates must be transmitted as-is \uD852\uDF62"} +] diff --git a/tx/textual/internal/testpb/1.proto b/tx/textual/internal/testpb/1.proto index 6bf8012e6645..b242f910832a 100644 --- a/tx/textual/internal/testpb/1.proto +++ b/tx/textual/internal/testpb/1.proto @@ -39,3 +39,19 @@ message A { double DOUBLE = 110; map MAP = 111; } + +// Foo is a sample message type used for testing message rendering. +message Foo { + string full_name = 1; + string nickname = 2; + google.protobuf.Timestamp mtime = 3; + Foo left = 4; + Foo right = 5; + Bar bar = 8; // skip some field numbers +} + +// Bar is a sample message type used for testing message rendering. +message Bar { + string bar_id = 1; + bytes data = 2; +} diff --git a/tx/textual/internal/testpb/1.pulsar.go b/tx/textual/internal/testpb/1.pulsar.go index 547875c5f492..988d98575a5d 100644 --- a/tx/textual/internal/testpb/1.pulsar.go +++ b/tx/textual/internal/testpb/1.pulsar.go @@ -1823,6 +1823,1292 @@ func (x *fastReflection_A) ProtoMethods() *protoiface.Methods { } } +var ( + md_Foo protoreflect.MessageDescriptor + fd_Foo_full_name protoreflect.FieldDescriptor + fd_Foo_nickname protoreflect.FieldDescriptor + fd_Foo_mtime protoreflect.FieldDescriptor + fd_Foo_left protoreflect.FieldDescriptor + fd_Foo_right protoreflect.FieldDescriptor + fd_Foo_bar protoreflect.FieldDescriptor +) + +func init() { + file__1_proto_init() + md_Foo = File__1_proto.Messages().ByName("Foo") + fd_Foo_full_name = md_Foo.Fields().ByName("full_name") + fd_Foo_nickname = md_Foo.Fields().ByName("nickname") + fd_Foo_mtime = md_Foo.Fields().ByName("mtime") + fd_Foo_left = md_Foo.Fields().ByName("left") + fd_Foo_right = md_Foo.Fields().ByName("right") + fd_Foo_bar = md_Foo.Fields().ByName("bar") +} + +var _ protoreflect.Message = (*fastReflection_Foo)(nil) + +type fastReflection_Foo Foo + +func (x *Foo) ProtoReflect() protoreflect.Message { + return (*fastReflection_Foo)(x) +} + +func (x *Foo) slowProtoReflect() protoreflect.Message { + mi := &file__1_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_Foo_messageType fastReflection_Foo_messageType +var _ protoreflect.MessageType = fastReflection_Foo_messageType{} + +type fastReflection_Foo_messageType struct{} + +func (x fastReflection_Foo_messageType) Zero() protoreflect.Message { + return (*fastReflection_Foo)(nil) +} +func (x fastReflection_Foo_messageType) New() protoreflect.Message { + return new(fastReflection_Foo) +} +func (x fastReflection_Foo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Foo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Foo) Descriptor() protoreflect.MessageDescriptor { + return md_Foo +} + +// 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_Foo) Type() protoreflect.MessageType { + return _fastReflection_Foo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Foo) New() protoreflect.Message { + return new(fastReflection_Foo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Foo) Interface() protoreflect.ProtoMessage { + return (*Foo)(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_Foo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.FullName != "" { + value := protoreflect.ValueOfString(x.FullName) + if !f(fd_Foo_full_name, value) { + return + } + } + if x.Nickname != "" { + value := protoreflect.ValueOfString(x.Nickname) + if !f(fd_Foo_nickname, value) { + return + } + } + if x.Mtime != nil { + value := protoreflect.ValueOfMessage(x.Mtime.ProtoReflect()) + if !f(fd_Foo_mtime, value) { + return + } + } + if x.Left != nil { + value := protoreflect.ValueOfMessage(x.Left.ProtoReflect()) + if !f(fd_Foo_left, value) { + return + } + } + if x.Right != nil { + value := protoreflect.ValueOfMessage(x.Right.ProtoReflect()) + if !f(fd_Foo_right, value) { + return + } + } + if x.Bar != nil { + value := protoreflect.ValueOfMessage(x.Bar.ProtoReflect()) + if !f(fd_Foo_bar, 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_Foo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "Foo.full_name": + return x.FullName != "" + case "Foo.nickname": + return x.Nickname != "" + case "Foo.mtime": + return x.Mtime != nil + case "Foo.left": + return x.Left != nil + case "Foo.right": + return x.Right != nil + case "Foo.bar": + return x.Bar != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: Foo")) + } + panic(fmt.Errorf("message Foo 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_Foo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "Foo.full_name": + x.FullName = "" + case "Foo.nickname": + x.Nickname = "" + case "Foo.mtime": + x.Mtime = nil + case "Foo.left": + x.Left = nil + case "Foo.right": + x.Right = nil + case "Foo.bar": + x.Bar = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: Foo")) + } + panic(fmt.Errorf("message Foo 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_Foo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "Foo.full_name": + value := x.FullName + return protoreflect.ValueOfString(value) + case "Foo.nickname": + value := x.Nickname + return protoreflect.ValueOfString(value) + case "Foo.mtime": + value := x.Mtime + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "Foo.left": + value := x.Left + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "Foo.right": + value := x.Right + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "Foo.bar": + value := x.Bar + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: Foo")) + } + panic(fmt.Errorf("message Foo 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_Foo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "Foo.full_name": + x.FullName = value.Interface().(string) + case "Foo.nickname": + x.Nickname = value.Interface().(string) + case "Foo.mtime": + x.Mtime = value.Message().Interface().(*timestamppb.Timestamp) + case "Foo.left": + x.Left = value.Message().Interface().(*Foo) + case "Foo.right": + x.Right = value.Message().Interface().(*Foo) + case "Foo.bar": + x.Bar = value.Message().Interface().(*Bar) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: Foo")) + } + panic(fmt.Errorf("message Foo 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_Foo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "Foo.mtime": + if x.Mtime == nil { + x.Mtime = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.Mtime.ProtoReflect()) + case "Foo.left": + if x.Left == nil { + x.Left = new(Foo) + } + return protoreflect.ValueOfMessage(x.Left.ProtoReflect()) + case "Foo.right": + if x.Right == nil { + x.Right = new(Foo) + } + return protoreflect.ValueOfMessage(x.Right.ProtoReflect()) + case "Foo.bar": + if x.Bar == nil { + x.Bar = new(Bar) + } + return protoreflect.ValueOfMessage(x.Bar.ProtoReflect()) + case "Foo.full_name": + panic(fmt.Errorf("field full_name of message Foo is not mutable")) + case "Foo.nickname": + panic(fmt.Errorf("field nickname of message Foo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: Foo")) + } + panic(fmt.Errorf("message Foo 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_Foo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "Foo.full_name": + return protoreflect.ValueOfString("") + case "Foo.nickname": + return protoreflect.ValueOfString("") + case "Foo.mtime": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "Foo.left": + m := new(Foo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "Foo.right": + m := new(Foo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "Foo.bar": + m := new(Bar) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: Foo")) + } + panic(fmt.Errorf("message Foo 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_Foo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in Foo", 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_Foo) 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_Foo) 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_Foo) 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_Foo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Foo) + 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.FullName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Nickname) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Mtime != nil { + l = options.Size(x.Mtime) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Left != nil { + l = options.Size(x.Left) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Right != nil { + l = options.Size(x.Right) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Bar != nil { + l = options.Size(x.Bar) + 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().(*Foo) + 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.Bar != nil { + encoded, err := options.Marshal(x.Bar) + 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 x.Right != nil { + encoded, err := options.Marshal(x.Right) + 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 x.Left != nil { + encoded, err := options.Marshal(x.Left) + 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] = 0x22 + } + if x.Mtime != nil { + encoded, err := options.Marshal(x.Mtime) + 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.Nickname) > 0 { + i -= len(x.Nickname) + copy(dAtA[i:], x.Nickname) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Nickname))) + i-- + dAtA[i] = 0x12 + } + if len(x.FullName) > 0 { + i -= len(x.FullName) + copy(dAtA[i:], x.FullName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FullName))) + 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().(*Foo) + 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: Foo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Foo: 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 FullName", 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.FullName = 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 Nickname", 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.Nickname = 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 Mtime", 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.Mtime == nil { + x.Mtime = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Mtime); 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 Left", 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.Left == nil { + x.Left = &Foo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Left); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Right", 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.Right == nil { + x.Right = &Foo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Right); 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 Bar", 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.Bar == nil { + x.Bar = &Bar{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Bar); 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_Bar protoreflect.MessageDescriptor + fd_Bar_bar_id protoreflect.FieldDescriptor + fd_Bar_data protoreflect.FieldDescriptor +) + +func init() { + file__1_proto_init() + md_Bar = File__1_proto.Messages().ByName("Bar") + fd_Bar_bar_id = md_Bar.Fields().ByName("bar_id") + fd_Bar_data = md_Bar.Fields().ByName("data") +} + +var _ protoreflect.Message = (*fastReflection_Bar)(nil) + +type fastReflection_Bar Bar + +func (x *Bar) ProtoReflect() protoreflect.Message { + return (*fastReflection_Bar)(x) +} + +func (x *Bar) slowProtoReflect() protoreflect.Message { + mi := &file__1_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_Bar_messageType fastReflection_Bar_messageType +var _ protoreflect.MessageType = fastReflection_Bar_messageType{} + +type fastReflection_Bar_messageType struct{} + +func (x fastReflection_Bar_messageType) Zero() protoreflect.Message { + return (*fastReflection_Bar)(nil) +} +func (x fastReflection_Bar_messageType) New() protoreflect.Message { + return new(fastReflection_Bar) +} +func (x fastReflection_Bar_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Bar +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Bar) Descriptor() protoreflect.MessageDescriptor { + return md_Bar +} + +// 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_Bar) Type() protoreflect.MessageType { + return _fastReflection_Bar_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Bar) New() protoreflect.Message { + return new(fastReflection_Bar) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Bar) Interface() protoreflect.ProtoMessage { + return (*Bar)(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_Bar) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.BarId != "" { + value := protoreflect.ValueOfString(x.BarId) + if !f(fd_Bar_bar_id, value) { + return + } + } + if len(x.Data) != 0 { + value := protoreflect.ValueOfBytes(x.Data) + if !f(fd_Bar_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_Bar) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "Bar.bar_id": + return x.BarId != "" + case "Bar.data": + return len(x.Data) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: Bar")) + } + panic(fmt.Errorf("message Bar 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_Bar) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "Bar.bar_id": + x.BarId = "" + case "Bar.data": + x.Data = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: Bar")) + } + panic(fmt.Errorf("message Bar 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_Bar) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "Bar.bar_id": + value := x.BarId + return protoreflect.ValueOfString(value) + case "Bar.data": + value := x.Data + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: Bar")) + } + panic(fmt.Errorf("message Bar 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_Bar) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "Bar.bar_id": + x.BarId = value.Interface().(string) + case "Bar.data": + x.Data = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: Bar")) + } + panic(fmt.Errorf("message Bar 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_Bar) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "Bar.bar_id": + panic(fmt.Errorf("field bar_id of message Bar is not mutable")) + case "Bar.data": + panic(fmt.Errorf("field data of message Bar is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: Bar")) + } + panic(fmt.Errorf("message Bar 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_Bar) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "Bar.bar_id": + return protoreflect.ValueOfString("") + case "Bar.data": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: Bar")) + } + panic(fmt.Errorf("message Bar 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_Bar) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in Bar", 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_Bar) 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_Bar) 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_Bar) 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_Bar) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Bar) + 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.BarId) + 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().(*Bar) + 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] = 0x12 + } + if len(x.BarId) > 0 { + i -= len(x.BarId) + copy(dAtA[i:], x.BarId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BarId))) + 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().(*Bar) + 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: Bar: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Bar: 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 BarId", 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.BarId = 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 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, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -2072,6 +3358,126 @@ func (x *A) GetMAP() map[string]*A { return nil } +// Foo is a sample message type used for testing message rendering. +type Foo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FullName string `protobuf:"bytes,1,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"` + Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"` + Mtime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=mtime,proto3" json:"mtime,omitempty"` + Left *Foo `protobuf:"bytes,4,opt,name=left,proto3" json:"left,omitempty"` + Right *Foo `protobuf:"bytes,5,opt,name=right,proto3" json:"right,omitempty"` + Bar *Bar `protobuf:"bytes,8,opt,name=bar,proto3" json:"bar,omitempty"` // skip some field numbers +} + +func (x *Foo) Reset() { + *x = Foo{} + if protoimpl.UnsafeEnabled { + mi := &file__1_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Foo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Foo) ProtoMessage() {} + +// Deprecated: Use Foo.ProtoReflect.Descriptor instead. +func (*Foo) Descriptor() ([]byte, []int) { + return file__1_proto_rawDescGZIP(), []int{1} +} + +func (x *Foo) GetFullName() string { + if x != nil { + return x.FullName + } + return "" +} + +func (x *Foo) GetNickname() string { + if x != nil { + return x.Nickname + } + return "" +} + +func (x *Foo) GetMtime() *timestamppb.Timestamp { + if x != nil { + return x.Mtime + } + return nil +} + +func (x *Foo) GetLeft() *Foo { + if x != nil { + return x.Left + } + return nil +} + +func (x *Foo) GetRight() *Foo { + if x != nil { + return x.Right + } + return nil +} + +func (x *Foo) GetBar() *Bar { + if x != nil { + return x.Bar + } + return nil +} + +// Bar is a sample message type used for testing message rendering. +type Bar struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BarId string `protobuf:"bytes,1,opt,name=bar_id,json=barId,proto3" json:"bar_id,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *Bar) Reset() { + *x = Bar{} + if protoimpl.UnsafeEnabled { + mi := &file__1_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Bar) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bar) ProtoMessage() {} + +// Deprecated: Use Bar.ProtoReflect.Descriptor instead. +func (*Bar) Descriptor() ([]byte, []int) { + return file__1_proto_rawDescGZIP(), []int{2} +} + +func (x *Bar) GetBarId() string { + if x != nil { + return x.BarId + } + return "" +} + +func (x *Bar) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + var File__1_proto protoreflect.FileDescriptor var file__1_proto_rawDesc = []byte{ @@ -2129,13 +3535,28 @@ var file__1_proto_rawDesc = []byte{ 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x02, 0x2e, 0x41, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x1f, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x07, 0x0a, - 0x03, 0x54, 0x77, 0x6f, 0x10, 0x01, 0x42, 0x33, 0x42, 0x06, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x27, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, - 0x2f, 0x74, 0x78, 0x2f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xbe, 0x01, 0x0a, 0x03, 0x46, 0x6f, 0x6f, 0x12, 0x1b, 0x0a, + 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, + 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, + 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x04, 0x6c, 0x65, 0x66, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x04, 0x2e, 0x46, 0x6f, 0x6f, 0x52, 0x04, 0x6c, 0x65, + 0x66, 0x74, 0x12, 0x1a, 0x0a, 0x05, 0x72, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x04, 0x2e, 0x46, 0x6f, 0x6f, 0x52, 0x05, 0x72, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, + 0x0a, 0x03, 0x62, 0x61, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x04, 0x2e, 0x42, 0x61, + 0x72, 0x52, 0x03, 0x62, 0x61, 0x72, 0x22, 0x30, 0x0a, 0x03, 0x42, 0x61, 0x72, 0x12, 0x15, 0x0a, + 0x06, 0x62, 0x61, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, + 0x61, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x2a, 0x1f, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x6e, 0x65, 0x10, 0x00, + 0x12, 0x07, 0x0a, 0x03, 0x54, 0x77, 0x6f, 0x10, 0x01, 0x42, 0x33, 0x42, 0x06, 0x31, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, + 0x2e, 0x69, 0x6f, 0x2f, 0x74, 0x78, 0x2f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, 0x6c, 0x2f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2151,27 +3572,33 @@ func file__1_proto_rawDescGZIP() []byte { } var file__1_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file__1_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file__1_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file__1_proto_goTypes = []interface{}{ (Enumeration)(0), // 0: Enumeration (*A)(nil), // 1: A - nil, // 2: A.MAPEntry - (*v1beta1.Coin)(nil), // 3: cosmos.base.v1beta1.Coin - (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 5: google.protobuf.Duration + (*Foo)(nil), // 2: Foo + (*Bar)(nil), // 3: Bar + nil, // 4: A.MAPEntry + (*v1beta1.Coin)(nil), // 5: cosmos.base.v1beta1.Coin + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 7: google.protobuf.Duration } var file__1_proto_depIdxs = []int32{ - 3, // 0: A.COIN:type_name -> cosmos.base.v1beta1.Coin - 3, // 1: A.COINS:type_name -> cosmos.base.v1beta1.Coin - 4, // 2: A.TIMESTAMP:type_name -> google.protobuf.Timestamp - 5, // 3: A.DURATION:type_name -> google.protobuf.Duration - 2, // 4: A.MAP:type_name -> A.MAPEntry - 1, // 5: A.MAPEntry.value:type_name -> A - 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 + 5, // 0: A.COIN:type_name -> cosmos.base.v1beta1.Coin + 5, // 1: A.COINS:type_name -> cosmos.base.v1beta1.Coin + 6, // 2: A.TIMESTAMP:type_name -> google.protobuf.Timestamp + 7, // 3: A.DURATION:type_name -> google.protobuf.Duration + 4, // 4: A.MAP:type_name -> A.MAPEntry + 6, // 5: Foo.mtime:type_name -> google.protobuf.Timestamp + 2, // 6: Foo.left:type_name -> Foo + 2, // 7: Foo.right:type_name -> Foo + 3, // 8: Foo.bar:type_name -> Bar + 1, // 9: A.MAPEntry.value:type_name -> A + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file__1_proto_init() } @@ -2192,6 +3619,30 @@ func file__1_proto_init() { return nil } } + file__1_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Foo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file__1_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Bar); 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{ @@ -2199,7 +3650,7 @@ func file__1_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file__1_proto_rawDesc, NumEnums: 1, - NumMessages: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/tx/textual/valuerenderer/message.go b/tx/textual/valuerenderer/message.go new file mode 100644 index 000000000000..e87d304bf898 --- /dev/null +++ b/tx/textual/valuerenderer/message.go @@ -0,0 +1,161 @@ +package valuerenderer + +import ( + "context" + "fmt" + "sort" + "strings" + + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" +) + +type messageValueRenderer struct { + tr *Textual + msgDesc protoreflect.MessageDescriptor + fds []protoreflect.FieldDescriptor +} + +func NewMessageValueRenderer(t *Textual, msgDesc protoreflect.MessageDescriptor) ValueRenderer { + fields := msgDesc.Fields() + fds := make([]protoreflect.FieldDescriptor, 0, fields.Len()) + for i := 0; i < fields.Len(); i++ { + fds = append(fds, fields.Get(i)) + } + sort.Slice(fds, func(i, j int) bool { return fds[i].Number() < fds[j].Number() }) + + return &messageValueRenderer{tr: t, msgDesc: msgDesc, fds: fds} +} + +func (mr *messageValueRenderer) header() string { + return fmt.Sprintf("%s object", mr.msgDesc.Name()) +} + +func (mr *messageValueRenderer) Format(ctx context.Context, v protoreflect.Value) ([]Screen, error) { + fullName := v.Message().Descriptor().FullName() + wantFullName := mr.msgDesc.FullName() + if fullName != wantFullName { + return nil, fmt.Errorf(`bad message type: want "%s", got "%s"`, wantFullName, fullName) + } + + screens := make([]Screen, 1) + screens[0].Text = mr.header() + + for _, fd := range mr.fds { + vr, err := mr.tr.GetValueRenderer(fd) + if err != nil { + return nil, err + } + // Skip default values. + if !v.Message().Has(fd) { + continue + } + + subscreens, err := vr.Format(ctx, v.Message().Get(fd)) + if err != nil { + return nil, err + } + if len(subscreens) == 0 { + return nil, fmt.Errorf("empty rendering for field %s", fd.Name()) + } + + headerScreen := Screen{ + Text: fmt.Sprintf("%s: %s", formatFieldName(string(fd.Name())), subscreens[0].Text), + Indent: subscreens[0].Indent + 1, + Expert: subscreens[0].Expert, + } + screens = append(screens, headerScreen) + + for i := 1; i < len(subscreens); i++ { + extraScreen := Screen{ + Text: subscreens[i].Text, + Indent: subscreens[i].Indent + 1, + Expert: subscreens[i].Expert, + } + screens = append(screens, extraScreen) + } + } + + return screens, nil +} + +// formatFieldName formats a field name in sentence case, as specified in: +// https://github.com/cosmos/cosmos-sdk/blob/b6f867d0b674d62e56b27aa4d00f5b6042ebac9e/docs/architecture/adr-050-sign-mode-textual-annex1.md?plain=1#L110 +func formatFieldName(name string) string { + if len(name) == 0 { + return name + } + return strings.ToTitle(name[0:1]) + strings.ReplaceAll(name[1:], "_", " ") +} + +var nilValue = protoreflect.Value{} + +func (mr *messageValueRenderer) Parse(ctx context.Context, screens []Screen) (protoreflect.Value, error) { + if len(screens) == 0 { + return nilValue, fmt.Errorf("expect at least one screen") + } + + wantHeader := fmt.Sprintf("%s object", mr.msgDesc.Name()) + if screens[0].Text != wantHeader { + return nilValue, fmt.Errorf(`bad header: want "%s", got "%s"`, wantHeader, screens[0].Text) + } + if screens[0].Indent != 0 { + return nilValue, fmt.Errorf("bad message indentation: want 0, got %d", screens[0].Indent) + } + + msgType, err := protoregistry.GlobalTypes.FindMessageByName(mr.msgDesc.FullName()) + if err != nil { + return nilValue, err + } + msg := msgType.New() + idx := 1 + + for _, fd := range mr.fds { + if idx >= len(screens) { + // remaining fields are default + break + } + + vr, err := mr.tr.GetValueRenderer(fd) + if err != nil { + return nilValue, err + } + + if screens[idx].Indent != 1 { + return nilValue, fmt.Errorf("bad message indentation: want 1, got %d", screens[idx].Indent) + } + + prefix := formatFieldName(string(fd.Name())) + ": " + if !strings.HasPrefix(screens[idx].Text, prefix) { + // we must have skipped this fd because of a default value + continue + } + + // Make a new screen without the prefix + subscreens := make([]Screen, 1) + subscreens[0] = screens[idx] + subscreens[0].Text = strings.TrimPrefix(screens[idx].Text, prefix) + subscreens[0].Indent-- + idx++ + + // Gather nested screens + for idx < len(screens) && screens[idx].Indent > 1 { + scr := screens[idx] + scr.Indent-- + subscreens = append(subscreens, scr) + idx++ + } + + val, err := vr.Parse(ctx, subscreens) + if err != nil { + return nilValue, err + } + msg.Set(fd, val) + } + + if idx > len(screens) { + return nilValue, fmt.Errorf("leftover screens") + } + + return protoreflect.ValueOfMessage(msg), nil +} diff --git a/tx/textual/valuerenderer/message_test.go b/tx/textual/valuerenderer/message_test.go new file mode 100644 index 000000000000..ef577784601b --- /dev/null +++ b/tx/textual/valuerenderer/message_test.go @@ -0,0 +1,53 @@ +package valuerenderer_test + +import ( + "context" + "encoding/json" + "fmt" + "os" + "testing" + + "cosmossdk.io/tx/textual/valuerenderer" + "github.com/stretchr/testify/require" + + bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1" + "cosmossdk.io/tx/textual/internal/testpb" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" +) + +func EmptyCoinMetadataQuerier(ctx context.Context, denom string) (*bankv1beta1.Metadata, error) { + return nil, nil +} + +type messageJsonTest struct { + Proto *testpb.Foo + Screens []valuerenderer.Screen +} + +func TestMessageJsonTestcases(t *testing.T) { + raw, err := os.ReadFile("../internal/testdata/message.json") + require.NoError(t, err) + + var testcases []messageJsonTest + err = json.Unmarshal(raw, &testcases) + require.NoError(t, err) + + tr := valuerenderer.NewTextual(EmptyCoinMetadataQuerier) + for i, tc := range testcases { + t.Run(fmt.Sprintf("%d", i), func(t *testing.T) { + rend := valuerenderer.NewMessageValueRenderer(&tr, (&testpb.Foo{}).ProtoReflect().Descriptor()) + + screens, err := rend.Format(context.Background(), protoreflect.ValueOf(tc.Proto.ProtoReflect())) + require.NoError(t, err) + require.Equal(t, tc.Screens, screens) + + val, err := rend.Parse(context.Background(), screens) + require.NoError(t, err) + msg := val.Message().Interface() + require.IsType(t, &testpb.Foo{}, msg) + foo := msg.(*testpb.Foo) + require.True(t, proto.Equal(foo, tc.Proto)) + }) + } +} diff --git a/tx/textual/valuerenderer/string.go b/tx/textual/valuerenderer/string.go new file mode 100644 index 000000000000..b84a68f51af9 --- /dev/null +++ b/tx/textual/valuerenderer/string.go @@ -0,0 +1,28 @@ +package valuerenderer + +import ( + "context" + "fmt" + + "google.golang.org/protobuf/reflect/protoreflect" +) + +type stringValueRenderer struct { +} + +// NewStringValueRenderer returns a ValueRenderer for protocol buffer string values. +// It renders the string as-is without quotation. +func NewStringValueRenderer() ValueRenderer { + return stringValueRenderer{} +} + +func (sr stringValueRenderer) Format(_ context.Context, v protoreflect.Value) ([]Screen, error) { + return []Screen{{Text: v.String()}}, nil +} + +func (sr stringValueRenderer) Parse(_ context.Context, screens []Screen) (protoreflect.Value, error) { + if len(screens) != 1 { + return protoreflect.Value{}, fmt.Errorf("expected single screen: %v", screens) + } + return protoreflect.ValueOfString(screens[0].Text), nil +} diff --git a/tx/textual/valuerenderer/string_test.go b/tx/textual/valuerenderer/string_test.go new file mode 100644 index 000000000000..aba222b4c819 --- /dev/null +++ b/tx/textual/valuerenderer/string_test.go @@ -0,0 +1,55 @@ +package valuerenderer_test + +import ( + "context" + "encoding/json" + "fmt" + "os" + "testing" + + "cosmossdk.io/tx/textual/valuerenderer" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/reflect/protoreflect" +) + +type stringJsonTest struct { + Text string +} + +func TestStringJsonTestcases(t *testing.T) { + raw, err := os.ReadFile("../internal/testdata/string.json") + require.NoError(t, err) + + var testcases []stringJsonTest + err = json.Unmarshal(raw, &testcases) + require.NoError(t, err) + + for i, tc := range testcases { + t.Run(fmt.Sprintf("%d", i), func(t *testing.T) { + rend := valuerenderer.NewStringValueRenderer() + + screens, err := rend.Format(context.Background(), protoreflect.ValueOfString(tc.Text)) + require.NoError(t, err) + require.Equal(t, 1, len(screens)) + require.Equal(t, tc.Text, screens[0].Text) + + val, err := rend.Parse(context.Background(), screens) + require.NoError(t, err) + require.Equal(t, tc.Text, val.String()) + }) + } +} + +func TestStringHighUnicode(t *testing.T) { + // We cannot encode Unicode characters beyond the BMP directly in JSON, + // so this case must be a native Go test. + s := "\U00101234" + rend := valuerenderer.NewStringValueRenderer() + screens, err := rend.Format(context.Background(), protoreflect.ValueOfString(s)) + require.NoError(t, err) + require.Equal(t, 1, len(screens)) + require.Equal(t, s, screens[0].Text) + val, err := rend.Parse(context.Background(), screens) + require.NoError(t, err) + require.Equal(t, s, val.String()) +} diff --git a/tx/textual/valuerenderer/valuerenderer.go b/tx/textual/valuerenderer/valuerenderer.go index 675cc8c75db8..dafbc1fc2f94 100644 --- a/tx/textual/valuerenderer/valuerenderer.go +++ b/tx/textual/valuerenderer/valuerenderer.go @@ -75,6 +75,9 @@ func (r Textual) GetValueRenderer(fd protoreflect.FieldDescriptor) (ValueRendere return NewIntValueRenderer(), nil } + case fd.Kind() == protoreflect.StringKind: + return stringValueRenderer{}, nil + case fd.Kind() == protoreflect.MessageKind: md := fd.Message() fullName := md.FullName() @@ -83,8 +86,14 @@ func (r Textual) GetValueRenderer(fd protoreflect.FieldDescriptor) (ValueRendere if found { return vr, nil } - // TODO default message renderer - return nil, fmt.Errorf("no value renderer for message %s", fullName) + if fd.IsMap() { + return nil, fmt.Errorf("value renderers cannot format value of type map") + } + if fd.IsList() { + // This will be implemented in https://github.com/cosmos/cosmos-sdk/issues/12714 + return nil, fmt.Errorf("repeated field renderer not yet implemented") + } + return NewMessageValueRenderer(&r, md), nil default: return nil, fmt.Errorf("value renderers cannot format value of type %s", fd.Kind()) From ad08ec484a29c752e1b0e364949d3099a39c80e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Oct 2022 18:45:40 +0000 Subject: [PATCH 25/26] build(deps): Bump github.com/spf13/cobra from 1.6.0 to 1.6.1 (#13648) --- client/v2/go.mod | 2 +- client/v2/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- simapp/go.mod | 2 +- simapp/go.sum | 4 ++-- tests/go.mod | 2 +- tests/go.sum | 4 ++-- tools/cosmovisor/go.mod | 2 +- tools/cosmovisor/go.sum | 4 ++-- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/client/v2/go.mod b/client/v2/go.mod index 265459d0d912..4f1704bc264f 100644 --- a/client/v2/go.mod +++ b/client/v2/go.mod @@ -6,7 +6,7 @@ require ( cosmossdk.io/api v0.2.1 github.com/cosmos/cosmos-proto v1.0.0-alpha8 github.com/iancoleman/strcase v0.2.0 - github.com/spf13/cobra v1.6.0 + github.com/spf13/cobra v1.6.1 github.com/spf13/pflag v1.0.5 google.golang.org/grpc v1.50.1 google.golang.org/protobuf v1.28.1 diff --git a/client/v2/go.sum b/client/v2/go.sum index 0c5d65974889..e2b559ef9f4a 100644 --- a/client/v2/go.sum +++ b/client/v2/go.sum @@ -16,8 +16,8 @@ github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47 github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= -github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/go.mod b/go.mod index 625390a4f891..e79cdf64bd61 100644 --- a/go.mod +++ b/go.mod @@ -44,7 +44,7 @@ require ( github.com/prometheus/common v0.37.0 github.com/rakyll/statik v0.1.7 github.com/spf13/cast v1.5.0 - github.com/spf13/cobra v1.6.0 + github.com/spf13/cobra v1.6.1 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.13.0 github.com/stretchr/testify v1.8.1 diff --git a/go.sum b/go.sum index e87cd2f3c55e..8b41accbb156 100644 --- a/go.sum +++ b/go.sum @@ -758,8 +758,8 @@ github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= 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.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= -github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= diff --git a/simapp/go.mod b/simapp/go.mod index 150b9e2017d9..8fb0ba56d150 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -10,7 +10,7 @@ require ( github.com/cosmos/cosmos-sdk v0.0.0-00010101000000-000000000000 github.com/golang/mock v1.6.0 github.com/spf13/cast v1.5.0 - github.com/spf13/cobra v1.6.0 + github.com/spf13/cobra v1.6.1 github.com/spf13/viper v1.13.0 github.com/stretchr/testify v1.8.1 github.com/tendermint/tendermint v0.37.0-alpha.2 diff --git a/simapp/go.sum b/simapp/go.sum index 40952a5ba734..69c04ba7522e 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -746,8 +746,8 @@ github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= 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.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= -github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= diff --git a/tests/go.mod b/tests/go.mod index 40c788fdbe7a..860de9638e54 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -11,7 +11,7 @@ require ( github.com/cosmos/gogoproto v1.4.2 github.com/golang/mock v1.6.0 github.com/google/uuid v1.3.0 - github.com/spf13/cobra v1.6.0 + github.com/spf13/cobra v1.6.1 github.com/stretchr/testify v1.8.1 github.com/tendermint/tendermint v0.37.0-alpha.2 github.com/tendermint/tm-db v0.6.7 diff --git a/tests/go.sum b/tests/go.sum index aeca26103320..5afcf2406bdf 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -748,8 +748,8 @@ github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= 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.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= -github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= diff --git a/tools/cosmovisor/go.mod b/tools/cosmovisor/go.mod index 976dd6be1deb..95db56460dbe 100644 --- a/tools/cosmovisor/go.mod +++ b/tools/cosmovisor/go.mod @@ -7,7 +7,7 @@ require ( github.com/hashicorp/go-getter v1.6.2 github.com/otiai10/copy v1.7.0 github.com/rs/zerolog v1.28.0 - github.com/spf13/cobra v1.6.0 + github.com/spf13/cobra v1.6.1 github.com/stretchr/testify v1.8.1 ) diff --git a/tools/cosmovisor/go.sum b/tools/cosmovisor/go.sum index d235c1bd968e..ee1a2348f48b 100644 --- a/tools/cosmovisor/go.sum +++ b/tools/cosmovisor/go.sum @@ -547,8 +547,8 @@ github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= -github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= From a19c3a60e4efff8dfd9d07b6fe68a4cfd1331b8c Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Tue, 25 Oct 2022 17:35:49 -0400 Subject: [PATCH 26/26] feat(core): add ADR 033 (inter-module communication) Client interface (#13631) Co-authored-by: Marko --- core/intermodule/client.go | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 core/intermodule/client.go diff --git a/core/intermodule/client.go b/core/intermodule/client.go new file mode 100644 index 000000000000..0c6d5f33a4a2 --- /dev/null +++ b/core/intermodule/client.go @@ -0,0 +1,32 @@ +package intermodule + +import ( + "context" + + "google.golang.org/grpc" +) + +// Client is an inter-module client as specified in ADR-033. It +// allows one module to send msg's and queries to other modules provided +// that the request is valid and can be properly authenticated. +type Client interface { + grpc.ClientConnInterface + + // InvokerByMethod resolves an invoker for the provided method or returns an error. + InvokerByMethod(method string) (Invoker, error) + + // InvokerByRequest resolves an invoker for the provided request type or returns an error. + // This only works for Msg's as they are routed based on type name in transactions already. + // For queries use InvokerByMethod instead. + InvokerByRequest(request any) (Invoker, error) + + // DerivedClient returns an inter-module client for the ADR-028 derived + // module address for the provided key. + DerivedClient(key []byte) Client + + // Address is the ADR-028 address of this client against which messages will be authenticated. + Address() []byte +} + +// Invoker is an inter-module invoker that has already been resolved to a specific method route. +type Invoker func(ctx context.Context, request any, opts ...grpc.CallOption) (res any, err error)